Starting to use platformio on a pi4. Project compiles okay, but during upload got:
Error: Could not find the package with ‘platformio/tool-jlink @ ^1.63208.0’
On a raspberry pi4, vscode 1.50.1, platformio IDE 2.1.3,
mcu Nordic nrf52832, board EBYTE E73-TBM-01 V1.0
probe: J-Link edu mini (same error with a J-Link clone)
A “pio update” did not help.
JLinkExe on the command line uploads hex files fine.
Had similar error message that was resolved with:
platform_packages =
toolchain-gccarmnoneeabi@~1.90301.0
That solution did not work for platformio/tool-jlink@~1.63208.0
Same project compiles, uploads, and runs on ubuntu 20.04.1 with vscode 1.50.1, platformio IDE 2.1.3
The tool-jlink package is not available for the ARM64 or ARMv6l / ARM32 architecture, at least in PlatformIO repositories (Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog). Only Mac/Windows/Linux on x86/x64. Same also goes for the alternative tool-nrfjprog that I would have otherwise recommended.
Segger lists “J-Link Software and Documentation pack for Linux ARM, DEB installer, 64-bit” (and 32-bit) as being available on their website, so it’s possible to create this package. What is the output of uname -a for the Pi?
“”"
pi@pi3a ~/nrf52/blink_mbed $ uname -a
Linux pi3a 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l GNU/Linux
(my hostname is pi3a, but it really is a pi4b)
Your change causes upload to be successfully and program runs, but debug fails with the old error:
Error: Could not find the package with ‘platformio/tool-jlink @ ^1.63208.0’ requirements for your system ‘linux_armv7l’
The terminal process “platformio ‘debug’” terminated with exit code: 1.
It could be a related problem that both compilation and compilation+upload are very slow (3 min on pi4, 40 sec on ubuntu) even when nothing has been changed. There is little output - as if the comparison of *.cpp to *.o is being done very slowly. Possibly related is the ide edit panel shows a problem with #include <mbed.h> although compilation succeeds.
Try upgrading to the latest development core (pio upgrade --dev) and see if the problem still occurs. How are you starting the debugging on the Pi? In a VSCode GUI? Does that have the latest extension version? (If it has, can you also try this on version 2.1.0 of the extension, and not the latest)?
Using the latest development core gave the same results.
Upload works, but debugging (on pi4 in vscode GUI, platformio ext. 2.1.3) fails with:
Dialog box comes up: "Errors exist after running preLaunchTask ‘undefined’
And in the task output:
Error: Could not find the package with ‘platformio/tool-jlink @ ^1.63208.0’ requirements for your system ‘linux_armv7l’
The terminal process “platformio ‘debug’” terminated with exit code: 1.
The VSCode extension is separate from the used core. Just the core is upgrade with pio upgrade --dev.
It seems to me that the pio debug doesn’t care about platform_package overrides then and still wants to use the original version, dictated by the platform.json of the platform. In that case there are 2 paths available:
Debugger now works! That was fixed very quickly. All on a pi4, mbed, nrf52832 on a EBYTE E73-TBM-01 V1.0 board.
Thanks.
I do have problems with long delays - stopping then restarting debugger (7 minutes), recompiling ( 3 minutes) even when there are no changes. I will cleanout everything and start from scratch to get a better idea if it just my setup that is is messed up.
I’ve also noticed that restarting the debugger will recompile the project in debug mode, even if no changes occur; In case of running on a Pi, that’s extra punishing of course. I’m marking this thread as solved since the package is now published and debugging is possible.