2022-11-07 06:32 AM
Ex.: - Original start address of Flash Memory is 0x08000 0000
But I want to Change it to some random address like 01h.
2022-11-07 06:38 AM
No, and Why?
The MCU boots using a vector table starting at address Zero.
The BOOTx pins typically control what memory maps at Zero, and then execution proceeds to the Initial PC specified in the vector table.
Once code is executing you can set the base vector table to some other address, one that's typically aligned with the size of the table, ie at some 512-byte aligned address.
ARM has Technical Reference Manuals for their MCU cores if the functionality/behaviour is of interest.
2022-11-07 06:55 AM
If you want your code to start from other position other than 0x8000000 you should start messing with the linker script.
There are boundaries to what addresses are corresponding to fLASH, as long as you stay there it should be fine.
(and then as @Community member said you need to change the NVIC vector table to suit your new address offset (flash or ram))
2022-11-07 07:02 AM
Thank you.
Actually, I want to make emulator of an accelerometer on a microcontroller.
That is why I want to change the address as of accelerometer address.
2022-11-07 07:04 AM
Got it. Thank you!!
Actually, I want to make emulator of an accelerometer on a microcontroller.
That is why I want to change the address as of accelerometer address.
Any suggestions?
2022-11-07 07:08 AM
No, the accelerometer register address, in the I2C or SPI sense, doesn't have to directly relate to that of the MCU's internal memory space.
You'd create an array in RAM of the "register file" and index into that based on the Slave level interaction you're having on the bus.
2022-11-07 07:27 AM
The address spaces are unrelated, suggest you don't try to relate them.