2016-12-08 11:34 PM
I'm going to write 2 revisions of the same program to flash and make a bootloader which will start one of them, depending on some criterias.
#gcc-position-independend Note: this post was migrated and contained many threaded conversations, some content may be missing.2017-08-15 09:57 PM
Hi
Wagner.Joerg
,request you please share the solution with details of require compiler - linker settings required.
2017-08-15 11:58 PM
Hi
Wagner.Joerg
,request you please share the solution with details of require compiler - linker settings required.
2017-08-16 10:12 AM
Do you understand the concept of the vector table used in the Cortex-Mx parts? You'll need to exclude a sector of RAM (512 byte aligned) into which you will need to create a new vector table, you'll go through the vectors adjusting the addresses to reflect the address you've chosen to place the executable code. After that you'll need to point SCB->VTOR at this new table. If you link the image with a ZERO based address you can add the new offset to each vector.
Work product might not be sharable, especially if you work in a competitive company. Apply your knowledge/appreciation of compilers, linkers and loaders when it comes to creating relocatable objects with the tools you have chosen.
2017-08-28 11:16 AM
In my case:
int main(void)
{
/* USER CODE BEGIN 1 */
SCB->VTOR=0x080C0000; // my app is located at this address in Flash
...