i.MX RT1170 copy program to SDRAM at runtime...

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

i.MX RT1170 copy program to SDRAM at runtime...

Jump to solution
779 Views
application_ninja
Contributor III

I've seen mention, but not an implementation on how one can copy a program to run from SDRAM at runtime? The custom bord were using has a hardware flash with Flash / FlexSPI, causing it to run very slowly, how can we copy the program to SDRAM at runtime so we can execute quicker? This is just a temporary solution for a small amount of hardware devices until the hardware flash / FlexSPI is resolved.

Thank you!

0 Kudos
Reply
1 Solution
751 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Please follow the steps so the image is executed on SDRAM. The image is stored on flash but it is moved to SDRAM to be executed.

1. Select Project > Properties - C/C++ Build > Settings > Tool Settings > MCU Linker > Managed Linker Script and check Link application to RAM.

2. Select Project > Properties - C/C++ Build > Settings > Tool Settings > MCU C Compiler > Preprocessor and add defined symbol SKIP_SYSCLK_INIT=1.

3. In Project > Properties > C/C++ Build > MCU settings, delete Flash, and modify BOARD_SDRAM to start at 0x80002000 with size 0x1dfe000. Move BOARD_SDRAM to first position to make it default.

4. Build the image.

The image must have DCD so the SDRAM is already initialized at the moment the ROM boot copies the code to be executed to SDRAM.

Best regards,
Omar

View solution in original post

0 Kudos
Reply
1 Reply
752 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Please follow the steps so the image is executed on SDRAM. The image is stored on flash but it is moved to SDRAM to be executed.

1. Select Project > Properties - C/C++ Build > Settings > Tool Settings > MCU Linker > Managed Linker Script and check Link application to RAM.

2. Select Project > Properties - C/C++ Build > Settings > Tool Settings > MCU C Compiler > Preprocessor and add defined symbol SKIP_SYSCLK_INIT=1.

3. In Project > Properties > C/C++ Build > MCU settings, delete Flash, and modify BOARD_SDRAM to start at 0x80002000 with size 0x1dfe000. Move BOARD_SDRAM to first position to make it default.

4. Build the image.

The image must have DCD so the SDRAM is already initialized at the moment the ROM boot copies the code to be executed to SDRAM.

Best regards,
Omar

0 Kudos
Reply