After I update stm32duino to V10.0 use jlink there is dialog appear?


I use it with vscode under the MAC and update to big sur

and often down failed like thie:
Downloading file [.pio/build/nucleo_l476rg/firmware.bin]…

****** Error: Failed to erase sectors 27 @ address 0x0800D800 (Algo87: Unspecified error #1)
Failed to erase sectors.

Unspecified error -1

Might be that the chip’s flash is protected. At least that’s what I read when going through [SOLVED] STM32L052 failed to erase sectors - J-Link/Flasher related - SEGGER - Forum and Unlocking and Erasing FLASH with Segger J-Link | MCU on Eclipse. You might want to try to erase / unlock the tool with JLink on the command line or some other tool (e.g., openocd can do that, and probably also STM32CubeProgrammer from STMicroelectronics themselves).

The update to platform-ststm32 v10.0.0 also updated JLink to v6.88b because a user asked for it since there was a bug in the old version and confirmed the new working (Updating JLink version).You might want to try adding

platform_packages = 
   tool-jlink@1.65200.0

to the platformio.ini to revert back to JLink 6.52. That is, if the new JLink version hasn’t already locked your chip, then you absolutely need to unlock it.

1 Like

We updated JLink tool to the latest version

Could it be an issue?

how can I use it as before, without a dialog ,but just in the command windows .
Now as a click the upload the program the jlink window will show automatically.

I don’t know why upload_protocol = jlink invokes the GUI now and the inline CLI version before for you… maybe @ivankravets knows?

would you like to help me and i also install the segger 6.88b in my computer mac

after a days work I still not slove this problem.
so sad

this is my pio update
kiraversace@KiraVerSacedeMacBook-Pro LTE-Cat1 % pio update
Updating platformio/contrib-piohome 3.3.1 @ ~3.3.1 [Up-to-date]
Updating platformio/contrib-pysite 2.38.201019 @ ~2.38.0 [Incompatible 2.39.201019]
Updating platformio/tool-unity 1.20500.200612 @ ~1.20500.0 [Up-to-date]
Updating platformio/tool-scons 4.40001.0 @ ~4.40001.0 [Up-to-date]
Updating platformio/tool-cppcheck 1.210.0 @ ~1.210.0 [Up-to-date]

Platform Manager
================
Platform ststm32
--------
Updating platformio/ststm32                   10.0.0                             [Up-to-date]
Updating platformio/toolchain-gccarmnoneeabi  1.70201.0 @ >=1.60301.0,<1.80000.0 [Up-to-date]
Updating platformio/framework-cmsis           2.50501.200527 @ ~2.50501.0        [Up-to-date]
Updating platformio/framework-arduinoststm32  4.10900.200819 @ ~4.10900.0        [Up-to-date]
Updating platformio/tool-stm32duino           1.0.1 @ ~1.0.1                     [Up-to-date]
Updating platformio/tool-openocd              2.1000.200630 @ ~2.1000.0          [Up-to-date]
Updating platformio/tool-jlink                1.68801.0 @ ^1.63208.0             [Up-to-date]
Updating platformio/tool-dfuutil              1.9.200310 @ ~1.9.190708           [Up-to-date]
Tool Manager: Removing toolchain-gccarmnoneeabi @ 1.90201.191206
Tool Manager: toolchain-gccarmnoneeabi @ 1.90201.191206 has been removed!

So have you tried this?

I tried as your tips ok, it will be normal as usual, but if I uncommet

and excute pio update, the problem will appear again.
is a bug from you or the segger jlink?

and I use pio run is no effect so I must use sudo pio run?
I dont know why

that means I cannot do upload my program,How to opearte not as a root?
this is wrong information?
PermissionError: [Errno 13] Permission denied: '/Users/kiraversace/.platformio/packages/tool-jlink'

Hi @kiraversace! It should be fixed in the latest platform version, please update via pio platform update.

2 Likes

thank you very much it seems to slove, I install jlink 6.68c in my mac computer then excute pio update, it’s ok.
but do you know the reason why cause it, it can help me to find the problem?

another problem, every time I use pio update, the log is here

Platform ststm32
--------
Updating platformio/ststm32                   10.0.1                             [Up-to-date]
Updating platformio/toolchain-gccarmnoneeabi  1.70201.0 @ >=1.60301.0,<1.80000.0 [Up-to-date]
Updating platformio/framework-cmsis           2.50501.200527 @ ~2.50501.0        [Up-to-date]
Updating platformio/framework-arduinoststm32  4.10900.200819 @ ~4.10900.0        [Up-to-date]
Updating platformio/tool-stm32duino           1.0.1 @ ~1.0.1                     [Up-to-date]
Updating platformio/tool-openocd              2.1000.200630 @ ~2.1000.0          [Up-to-date]
Updating platformio/tool-jlink                1.68801.0 @ ^1.63208.0             [Up-to-date]
Updating platformio/tool-dfuutil              1.9.200310 @ ~1.9.190708           [Up-to-date]
Tool Manager: Removing toolchain-gccarmnoneeabi @ 1.90201.191206
Tool Manager: toolchain-gccarmnoneeabi @ 1.90201.191206 has been removed!

note the toolchain-gccarmnoneeabi

then I build the program
always show


Tool Manager: Installing platformio/toolchain-gccarmnoneeabi @ ~1.90201.0
Unpacking [####################################] 100%

every time, why? Am I install failure, when I use pio update?

THank you !

The newset jlink firmware is release, would you like to update it in PIO, the dialog appear again.
MACOS/bigsur

Thank you!