This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex-M0: Execute in RAM after copying from flash

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.

0