Hello,

I have been working on a project using a STM32L151CC.
This device, according to its datasheet, is a "Category 3" device, with 1
FLASH bank of 256k and 32k SRAM.

The automatic detection of OpenOCD however reports it as having two banks,
with the first one being 192k long, which is incorrect.

I think that this setting seems to be defined in stm32lx.c, most probably
l.190 ~ 191.
I did not attach a patch because I'm too unfamiliar with the codebase and I
am not confident as to why it is that way, if it's actually the right place
to fix the error, and if there are other things to change as well to
maintain consistency.

Output of
openocd -d 3 -f ../stm32ldiscovery_for_use_with_bootloader.cfg -f
../stm32l151RC.cfg -c "program build/firmware.elf verify reset exit"
can be found here : http://pastebin.com/eij48vSc  (truncated at the point
where it starts actually writing to flash)
The config files are equivalent to using the default stm32ldiscovery.cfg
except for slightly lower adapter speed (240 instead of 300 and 1800
instead of 2000) to remove warnings.


I started to investigate the problem after my code grew over the 192k
limit. In the meantime I tried setting the flash size manually be replacing
(in stm32l1.cfg):

flash bank $_FLASHNAME stm32lx 0x08000000 0 0 0 $_TARGETNAME

with

flash bank $_FLASHNAME stm32lx 0x08000000 0x40000 0 0 $_TARGETNAME

which seems to do the trick. Is that a completely satisfying workaround, or
am I setting myself up for some unforeseen side-effects?

Best,
Nicolas
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to