Hi,
I am developing an application for the RT1170 using MCUXpresso and it's SDK.
The sample projects provided all seem to have been built to use 'DTC' RAM. As with a number of other users my application is too large to fit there so I am trying to use the 'external SDRAM'.
Having tried the solutions proposed in a number of other forum posts (most notably https://community.nxp.com/t5/i-MX-RT/MCUXpresso-and-RT1050-download-and-debug-in-SDRAM/m-p/896979) I can now execute my program and, if the application is flashed, I can debug the program.
However if I build and execute with 'Link application to RAM' then, once a break point is hit the application usually get stuck there.
My presumption is that this is due to my not having initialised the SDRAM correctly. The aforementioned post uses at 'RT1050_SDRAM_Init.scp as a connect script for the debugger to init SDRAM controller'. If I use this file then not surprisingly it fails.
I have no idea how to adapt this script to work on an RT1170. Has anyone done this, or can give advice on how to generate it?
Thank you for any help you can provide.
Solved! Go to Solution.
Hi @robert_s ,
This script is fit for RT1050/60, but not for RT1170/60. You can use attached script. Besides the script file, there is other steps you should do.
Move the BOARD_SDRAM above SRAM_DTC_m7 in Memory details in C/C++ Build > MCU settings of properties.
Regards,
Jing
Hi @robert_s ,
This script is fit for RT1050/60, but not for RT1170/60. You can use attached script. Besides the script file, there is other steps you should do.
Move the BOARD_SDRAM above SRAM_DTC_m7 in Memory details in C/C++ Build > MCU settings of properties.
Regards,
Jing
Thanks @jingpan ,
I just needed to add the .scp file and it worked.
I already had steps 5, 6 and 8, but I will give the others a go.
In case it is of help I had also made the following change in board.c, I think is equivalent to the one described in <https://community.nxp.com/t5/i-MX-RT/MCUXpresso-and-RT1050-download-and-debug-in-SDRAM/m-p/896979> - with RT1170_SDRAM_NOT_CACHED defined:
#ifdef USE_SDRAM
#ifndef RT1170_SDRAM_NOT_CACHED
/* Region 9 setting: Memory with Normal type, not shareable, outer/inner write back */
MPU->RBAR = ARM_MPU_RBAR(9, 0x80000000U);
MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_64MB);
#else
MPU->RBAR = ARM_MPU_RBAR(9, 0x80000000U);
MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 1, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_64MB);
#endif /* RT1170_SDRAM_NOT_CACHED */
#endif