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

My code is not working if i change the address of flash memory , where the code can be loaded and if change the address back to the base address 0x80000000 then it works. Why?

I am trying to make a custom bootloader, and for that i need to change the flash memory address of the user code (the code which i will upload through the bootloader). So , i made a GPIO Toggle code with no delay, and in the target dialogue box i am changing the IROM1 address to 0x8009000 and also in the linker dialogue i am changing the R/O address to 0x8009000. But after changing the address my code is not working/executing, and i don't know why!

Parents
  • Hello Aarushi,

    There are many unknowns in the above, so I can only suggest my thoughts on what could be wrong...

    Does the bootloader 'know' of this change? Is it still relocating this code to 0x80000000? Arm code is, in general, position dependent.

    You change the load address, but have you also changed the execution address? Check the scatter description file used to ensure the execution address is correct?

    Is 0x8009000 writable? It is likely a mistake here rather than in your code, but are you moving from 0x80000000 to 0x08009000?

Reply
  • Hello Aarushi,

    There are many unknowns in the above, so I can only suggest my thoughts on what could be wrong...

    Does the bootloader 'know' of this change? Is it still relocating this code to 0x80000000? Arm code is, in general, position dependent.

    You change the load address, but have you also changed the execution address? Check the scatter description file used to ensure the execution address is correct?

    Is 0x8009000 writable? It is likely a mistake here rather than in your code, but are you moving from 0x80000000 to 0x08009000?

Children