Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download two short videos (registration required) highlighting:

System Workbench for STM32


Problem verifing and downloading code

Hello.

I have used system workbench with eclipse for years now, but couple of days ago something weird started that I haven’t figured out. If I try to load code onto my STM microcontroller, I get a checksum mismatch error.
It all looks like this in console:

Open On-Chip Debugger 0.10.0-dev-00019-g5352c55 (2019-02-14-15:45)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 4000 kHz
adapter_nsrst_delay: 100
Info : clock speed 4000 kHz
Info : STLINK v2 JTAG v27 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : vid/pid are not identical: 0x0483/0x374B 0x0483/0x3748
Info : using stlink api v2
Info : Target voltage: 2.899586
Info : Stlink adapter speed set to 4000 kHz
Info : STM32F407VGTx.cpu: hardware has 6 breakpoints, 4 watchpoints
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08003018 msp: 0x20020000
configuring PLL

    • Programming Started **

auto erase enabled
Info : device id = 0x10076413
Info : flash size = 1024kbytes
Warn : no flash bank found for address 0
wrote 0 bytes from file Debug/hcsr04.elf in 0.000000s (nan KiB/s)

    • Programming Finished **
    • Verify Started **

Error: checksum mismatch - attempting binary compare
diff 0 address 0x00000000. Was 0x00 instead of 0xf8
diff 1 address 0x00000001. Was 0x00 instead of 0xb5
diff 2 address 0x00000002. Was 0x02 instead of 0x00
diff 3 address 0x00000003. Was 0x20 instead of 0xbf
diff 4 address 0x00000004. Was 0x19 instead of 0xf8
diff 5 address 0x00000005. Was 0x30 instead of 0xb5
diff 6 address 0x00000007. Was 0x08 instead of 0xbf
No more differences found.

    • Verify Failed **

shutdown command invoked

I have always kept my software up-to-date and if I am not wrong, there were some updates lately. May it have something to do with it?
I would be grateful for any kind of help.

Elvar

Your program is not downloaded:

Warn : no flash bank found for address 0
wrote 0 bytes from file Debug/hcsr04.elf in 0.000000s (nan KiB/s)

It’s seems that there is error in your linker script.


Hi,

I had the same problem, but I think, it is solved.
My goal is programming a STM32F407 embedded in the STM32F407G-DISC1 by using STM32CubeMX and openSTM32.
First, I tried it with board selector in CubeMX, it didn’t work and the same error as above occurred. With MCU selector and only a simple program (blinking LED -> pin settings in CubeMX), it was working. After using extended functionality (e.g. timer -> settings in CubeMX), the error occurred again. But the real trigger for the problem, I did not find.
I had googled at lot, with much of solution approachs, but nothing was solving my problem. The hint with the error in the linker script was really helpful.
By comparing a working project with a not working project, I detect an empty linker file STM32F407VGTx_FLASH.ld in the not working project. I copy the one from the working project, and the MCU is programmed and verified without errors.
I hope it will continue to work in the future and it solves your problem as well.
Maybe it is a bug by converting the project from CubeMX to openSTM32.

Good luck,
Thomas


Hi!
Also had the same problem.
Checking linker script was the solution, because my linker script was empty in this project.
Copying the same script from different project (of the same MCU) apparently solved the problem (I’m still not sure, that project is literally an hour old. But it definitely runs without checksum or verification errors now).

I’m pretty new in STM32 programming and I have further question - what tool is supposed to generate “.ld” files and how can I avoid this problem in future?


Hey.

Well, I found an pretty easy solution to my problem at the end. It is a temporary solution, but it works. What I did was that I degraded my STM32CubeMX from 5.1.0 to 5.0.1. Something must have changed in the last version of STM32CubeMx.

All the best,
Elvar


Hi,
The problem exists when STM32F407VGTx_FLASH.ld file is empty. You can double click on it to open and to watch what is inside.

If file is empty, I do next to solve the problem:

- Right click over “STM32F407VGTx_FLASH.ld” in the project tree at eclipse and select “delete” file.
- Now go to CubeMX and GENERATE CODE again.
- Right boton in our project and “Refresh”.
Now, new STM32F407VGTx_FLASH.ld file appears with correct content.

Best regards,
Asier.


Ty, asierdo for your answer.

I am now using the newst version of STM32CubeMX (v 5.2.0) and the issuses are gone. So no worries with upgrading the Cube atm.


 

Newest Forum Posts

  1. Building project - subdir.mk error by nupurkohadkar1997, 2019-12-06 18:10
  2. openOCD Wrong device detected by maxim221, 2019-12-06 12:32
  3. STM32429I_Discovery board with printf float support problem by johannes.visser@msc-technologies.eu, 2019-12-05 16:08
  4. malloc heap issue with CubeMX Project by johannes.visser@msc-technologies.eu, 2019-12-05 16:04
  5. Debugger not working by Daniel Jack Morley, 2019-11-27 21:46
  6. Compiler change problem by Lucian Pop, 2019-11-20 17:41
  7. Sample programs and compiling by jjtimer, 2019-11-20 10:31
  8. Unit test issues for STM32 by Rinkedevries, 2019-11-18 10:32
  9. Ubuntu 19.04 Debug problems by costantino, 2019-11-17 19:17
  10. Compile without eclipse by JSStabl, 2019-11-14 15:55

Last-Modified Blogs