2005-01-19 12:06 AM
ST92F150 split code into 2 fash sectors by files
2011-05-17 02:36 AM
Does anyone know how to split code into two flash sectors on a file bases. In other words, instead of specifying flash section for each function, can you do it for all the functions in a file or files?
Instead of: void my function(void) CODE_SECTION (.code_sec2); Can you place all the functions in my_file.c in .code_sec2 with one specification? :o2011-05-17 02:36 AM
Yes You can do this as Following
If you have five files crtbegin.c, crtend.c, main.c, mem.c, timers.c and want to allocate first 3 to one sector and other two in to another sector e.g Flash2 and Flash3 (defined by you ) do the following in the .ld file .text : { crtbegin.o(.text) crtend.o(.text) main.o(.text) } > FLASH2 .text1 : { mem.o(.text) timers.o(.text) } > FLASH3