2001031_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2001031_en-US

2001031_en-US

How to convert MCUXpresso project into cmake project

Hi, 

Currenlty i am trying to convert MXRT1050 led blink SDK example into cmake project. I've got everything compiling and linking, but the code fails to run properly. i cant able to see any led blinks on my MXRT1050 evk board. Please find the attached cmake template project. And help me to solve this issue. When i flash example project console output looks below, starting address was 0x60000000.

ganes_rames_0-1732532842864.png

 when i flash my cmake generated axf file, its starting address shows 0x60002000.

ganes_rames_1-1732532986979.png




#MXRT1050 #CMAKE

Re: How to convert MCUXpresso project into cmake project

Hi @ganes_rames 

My apologies for the delayed response. 

I have been checking your source code, and it seems that the IVT is not placed at 0x6000_1000 as the bootROM requires

I comparted the .map file from your project to the .map  file from the RT1060 led_blinky SDK example (  image configuration is the same for RT1050) .

Tdiego_charles_0-1734125372395.png

Here is how a map file with the  IVT and the bootheaders well defined look like

diego_charles_2-1734128174515.png

By inspecting closely with a map file viewer, I did not saw the IVT or FCB defined somewhere or the FCB.

diego_charles_0-1734127980420.png

I

I hope this explains the issue. 

Diego



Re: How to convert MCUXpresso project into cmake project

Hi @diego_charles,
                 Thanks for response. Actually your correct. The issue is XIP related object files contents are not linked, while inspecting my genrated map file i found XIP related object files contents are not placed in .boot_hdr section.

ganes_rames_0-1732686387688.png


Here i am sharing my build folder also, hope it will be more helpful to understand the issue.

The reason I suspect I'm doing something wrong with XIP, is because I include the xip-directory & source files in the build, but I fail to see how they are used or referenced in the code or linker file.

In my main cmakelist.txt i have added compile definitions related XIP folders,
-DXIP_EXTERNAL_FLASH=1
-DXIP_BOOT_HEADER_ENABLE=1

am i missing anything ??

Can someone clarify this for me?
Any ideas?

xip folder contains:
- fsl_flexspi_nor_boot.c & .h
- evkbimxrt1050_flexspi_nor_config.c & .h

Re: How to convert MCUXpresso project into cmake project

Hi @ganes_rames ,

Thank you for your interest in our products.

Could you check the images created in the debug folder? I did not saw them in your rar file, let me explain what I mean below. 

A bootable image generated by the MCUXpresso should contain the FCB ( for the FlexSPI and flash configuration ) at 0x6000_0000, the IVT (  image vector table to let the bootROM know where is the image entry: vector table or resetISR address) and the code, starting at 0x6000_2000, at least. The bootROM does need those contents in order to boot an  XIP image from FlexSPI NOR flash, if not it will not boot anything. 

Based on the above, it migth be the that your image at 0x6000_2000 does not contain the FCB and IVT. If it does not  you will need to add them to your image, in a tipical RT1050 MCUXpresso IDE project they are contained in the XIP folder. 

I recommend  you using an hexadecimal editor or viewer, I use hexedit a lot.

Another suggestion is to use our MCUXpresso Secure Provisioning Tool to create a bootable image with the IVT at 0x6000_1000 and program the FCB too at 0x6000_0000. This is quick way to create a bootable image without having to worry about the XIP folder contents. Plus making code more generic without having a dedicated flash configuration or FCB for an specific memory. 

I hope this could help you!

Diegom


Re: How to convert MCUXpresso project into cmake project

Here i am sharing my cmake template project

Tags (1)
No ratings
Version history
Last update:
‎11-21-2025 02:46 PM
Updated by: