Menu

#113 stm32l4: assert failure in flash size checking

0.9.0
closed
nobody
None
stm32l4
2017-01-11
2015-11-13
Karl P
No

An assert is totally the wrong behaviour here. It should be failing the flash probe, not asserting and crashing out :(

openocd: stm32l4x.c:639: stm32l4_probe: Assertion `(flash_size_in_kb != 0xffff) && flash_size_in_kb' failed.
Aborted (core dumped)

replacing the assertion with a fixed assignemtn of "flash_size_in_kb = 1024"

Discussion

  • Karl P

    Karl P - 2015-11-13

    gack, this got posted before I'd finished writing :(

    It detects perfectly ok, but crashes when gdb connects, as shown in the attached -d3 log. replacing the assert with a hard size as mentioned works, and flashing and debugging and stepping all work ok.

    Indeed, at first I can also see via gdb that reading the flash size (and unique id and package code and temperature sensor calibration values are all zero. however after running some code, and checking later, I can see the "correct" values there.

    I guess there's some init that isn't happening at some stage? Either way, it should totaly not be an assertion failure!

     
  • Uwe Bonnes

    Uwe Bonnes - 2015-11-20

    Hello,

    patchset 3114 removes both asserts. I run the whole day code, compile, upload, debug, code, ... with the changed setup and things worked as expected.

    Please review an apply.

     
  • Spencer Oliver

    Spencer Oliver - 2017-01-11
    • status: new --> closed
     
  • Spencer Oliver

    Spencer Oliver - 2017-01-11

    gerrit patch merged.

     

Log in to post a comment.