https://review.openocd.org/c/openocd/+/6665


---

** [tickets:#185] Flash bank address in EFM32 driver is always overriden to 
0x0**

**Status:** new
**Milestone:** 0.9.0
**Created:** Wed May 16, 2018 12:25 PM UTC by miceuz
**Last Updated:** Mon Nov 08, 2021 04:33 PM UTC
**Owner:** nobody


I had a task to write into a different flash area in EFM32 microcontroller. 
It's an area containing lock bits and encryption keys / tokens.

To solve this I have created a new flash bank in the configuration file:

~~~
set CHIPNAME efm32
source [find target/efm32.cfg]
flash bank lockbits.flash efm32 0x0FE04000 2048 0 0 $_TARGETNAME
~~~

I could not write to this new bank anyway as bank start address is always 
overriden to 0x0 in the efm32.c:

        uint32_t base_address = 0x00000000;
    ...
    bank->base = base_address;

After I have commented these two lines and recompiled openocd, bank size was 
still overriden to the main flash size, but start address came from cfg file 
and I could write to this bank.

This is pretty critical when using OTA updates and signed firmware - this makes 
it possible to use openocd in this context.


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.


Reply via email to