How can I define empty function to specify address for new program ? I have written a simple bootloader (IAP).
my ''main.c'' file: void main(void) { ... IO_Init(); //General initialization ... while(1) Loop(); } // and function Loop() : #pragma section (Loop) void Loop(void) { //Nothing at first reset } Can I write in the linker file something like this ? : +seg .Loop -b 0x1000 Is it right?
Posted on January 13, 2006 at 05:22Hi, yes, the general idea of redirecting compiler output to a specific section and then place this section at the address you want in the linker is correct. Regards, Luca (Cosmic)
Can I do just something like this (if I want to put function ''LOOP'' at beginning of sector2(0x1000 to 0xE000) ?: (Metrowerks Codewarrior, HIWARE compiler, st72f561) My linker.prm file: NAMES END SECTIONS .. MY_ROM2 = READ_ONLY 0x1000 TO 0xDFFF; // sector 2 .. END PLACEMENT .. LOOP INTO MY_ROM2; .. END Regards, Sergey