AnsweredAssumed Answered

STM32F410 Elf Loader Problem

Question asked by cupery.e._nicholas on Mar 19, 2016
Latest reply on Apr 6, 2016 by cupery.e._nicholas
  I have a brand-new project (with brand-new circuit board) based
on the STM32F410CBT6 chip.  This chip, which I think is relatively
new, supposedly has 128KB of FLASH and 32KB of SRAM.  However, the
default linker script provided by STM incorrectly says the FLASH
is 64KB.  So, I corrected the linker script and I will (try to)
attach a copy.

  Like all of my STM projects, this is a VisualGDB project (and
VisualGDB is the best thing since sliced bread).  Thus, I first
noticed my STM32F410 problem when I tried to load/debug the new
program with VisualGDB.  VisualGDB claims the stack address
0x20007FFC is not writable, yet the data sheet (and the linker
script) say that address is perfectly legal.  When I tried a
much lower value for _estack, I got the same failure but with
the new supposedly illegal address correctly indicated in the
error message.

  So I then tried to load my new program with STM's ST-Link
Utility program.  No joy!  ST-Link Utility connects to the
device and correctly identifies it as an STM32F410xx Rev A,
but when I try to "erase chip" I get a MessageBox saying that
"the elf loader is bigger than the RAM size".  When I explicitly
tell ST-Link Utility to examine SRAM memory addresses, it does
successfully access the addresses from 0x20000000 to 0x20007FFC,
and then fails at 0x20008000 as expected.  Hmmm.  So, how big
is this "elf loader" anyway?  Does anyone know?  I don't really
know anything about elf loaders, but I've written a few "loaders"
in my day and they are all just a coupla hundred bytes of tightly
coded assembly language -- certainly nothing approaching 32KB!

  Ideas?  Note that I've run this problem by the VisualGDB folks
(who provide TOP QUALITY tech support), and they haven't seen
this one before.

  Maybe I've purchased a load of Rev A chips that don't work?  
I'm not fond of that answer. :-)

- eNick

Outcomes