Giter Site home page Giter Site logo

Nucleo L3 programming fails about modm HOT 9 CLOSED

modm-io avatar modm-io commented on May 10, 2024
Nucleo L3 programming fails

from modm.

Comments (9)

salkinium avatar salkinium commented on May 10, 2024 1

HA! This isn't a bug in OpenOCD 🤦‍♂️. #AlwaysBlameOtherSoftwareFirst

This happens when placing the vector table into RAM (which is done by default on F3/F7) and the linkerscript didn't define the .vector_ram sections as (NOLOAD), so OpenOCD tried to verify it, which is of course difficult, since the memory is only copied during startup. PR is in works.

from modm.

strongly-typed avatar strongly-typed commented on May 10, 2024

Ok, seems to be more related to OpenOCD.
Using program instead of flash write_image erase
causes the warning

Warn : no flash bank found for address 0x10000000

and subsequently the verify does not work. 0x10000000 is the CCM SRAM.

from modm.

rleh avatar rleh commented on May 10, 2024

@chris-durand got a similar error on a STM32F7 board some days ago.
I think it was a OpenOCD related bug; programming actually works, only verification fails.

from modm.

strongly-typed avatar strongly-typed commented on May 10, 2024

Yes, can confirm that even with the old command (flash write_image) the verify_image does not work. Now running OpenOCD Open On-Chip Debugger 0.10.0+dev-00527-g724fddcb (2018-09-07-12:21)

from modm.

rleh avatar rleh commented on May 10, 2024

Does the flash verification work with OpenOCD 0.10.0+dev-00527-g724fddcb (2018-09-07-12:21)?

from modm.

strongly-typed avatar strongly-typed commented on May 10, 2024

No, it doesn't. (But the code is on the chip and is doing very well.)

I can program an verify a STM32F103 (on a blue pill)

➜  src git:(master) ✗ scons program
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
.----OpenOCD--- build/release/src.elf
'-------------> stm32f103c8t
Open On-Chip Debugger 0.10.0+dev-00527-g724fddcb (2018-09-07-12:21)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
none separate
program_debug
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.202623
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080018e0 msp: 0x20000be0
** Programming Started **
auto erase enabled
Info : device id = 0x20036410
Info : flash size = 64kbytes
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003a msp: 0x20000be0
wrote 4096 bytes from file build/release/src.elf in 0.294507s (13.582 KiB/s)
** Programming Finished **
** Verify Started **
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20000be0
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20000be0
verified 3952 bytes in 0.138989s (27.767 KiB/s)
** Verified OK **
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000468 msp: 0x20000be0
shutdown command invoked
scons: done building targets.

from modm.

rleh avatar rleh commented on May 10, 2024

Removing the verify argument from the OpenOCD command would fix the issue:

proc modm_program { SOURCE } {
-	program $SOURCE verify
+	program $SOURCE
	reset halt

But we better investigate why OpenOCD is trying to verify (and program?) SRAM at 0x10000000.

from modm.

salkinium avatar salkinium commented on May 10, 2024

Hm, I thought verifying would make programming more safe, but if this is the broken status of OpenOCD, then maybe we should remove it?

from modm.

salkinium avatar salkinium commented on May 10, 2024

I'm closing this, please open a PR if this OpenOCD bug is too annoying.

from modm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.