We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I'm working on Cortex-M0. The goal is to execute the program in SDRAM after copying from flash. The system will boot from ROM, copy the program from flash to SDRAM, then execute from SDRAM afterwards.
I'm new to Cortex-M0 and have two questions:
1) Do I need to implement two programs? One program in ROM is to perform copying of the second program from flash to SDRAM. And the second program will execute from SDRAM.
2) Can I create a program with assembly codes only? The program in ROM has to be very small because of ROM size limitation (512 bytes only). I tried but the linker shows the following error message. I must miss something here...
armlink --cpu Cortex-M0 --entry Reset_Handler startup_rom.o -o startup_rom.axf
Warning: L6665W: Neither Lib$$Request$$armlib Lib$$Request$$cpplib defined, not searching ARM libraries.
Error: L6218E: Undefined symbol __use_two_region_memory (referred from startup_rom.o).
Thanks for any help in advance.
According to your solution,
1) you have to implement two programs.
2) you can use assembly or C language, but you can only implement the simple copy function as the ROM size limitation.
Actually, I suggest you another solution: you can divide the flash into two parts, one is for boot program, and another is for App program.
Anyway, the two solutions are both feasible.