Forum : ST7/STM8
Post Information | Post |
---|---|
October 23, 2012 - 5:00pm
|
Hi, I have the low density STM8S with 8KB. I have learnt that I can use relocation directives (CODE) to set the start address for a group of functions something on the following lines: But this way it is possible that boot-code related functions may run into application region. Thanks and Regards, PS: Thing is that I want to have IAP possibility for the region 0x9200 to 0x9fff. I understand that with single stvd project I will have only one output hex file. So for IAP, I thought I will extract the hex code in the region 0x9200 to 0x9fff from the generated hex file using a script file. |
Hi Pradeep,
You're using the proper directive. You can aggregate all application/boot functions using the CODE directive
CODE(%\?PR\?\?.*BOOT_MAIN(08080h),?PR??FOO?FILE1,?PR??ANY?FILE2)
CODE(%\?PR\?\?.*APPL_MAIN(09200h),?PR??APP?APP1)
But yes, there isn't any "magic" directive, you have to manual check all functions.
Otherwise, you're right, one project means one executable, so you'll have to 'cut' the .hex file.
Stéphane
thank you Stéphane.
To cut your hex file into piece, you can use the command-line copyhex.exe utility provided with Ride7.
The help is available when launched without parameter.
Regards,
Stéphane