cancel
Showing results for 
Search instead for 
Did you mean: 

Can I change the Register address of Flash Memory of a Microcontroller?

AKuma.45
Associate II

Ex.: - Original start address of Flash Memory is 0x08000 0000

     But I want to Change it to some random address like 01h.

6 REPLIES 6

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Javier1
Principal

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))

we dont need to firmware by ourselves, lets talk

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.

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?

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

The address spaces are unrelated, suggest you don't try to relate them.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..