Remote agent test: Raspberry PI: STlink-v2 "Runtime Find error"

Hi there,

We are experimenting with the platformio platform to see if we can use this for our development platform and everything works great with the exception of one thing, i.e. described in the subject.

We want to create remote runners for unit testing and CI that runs on Raspberry PI’s that have a serial and STLink-v2 connection.
When i upload the application and run the test locally on the Raspberry PI everything is fine, but as soon as i set the PI up as agent and try to run the test on the remote agent from my development station it does not work because somehow it is unable to find configuration files.

Output on the Raspberry PI:

pi@raspberrypi:~ $ pio remote agent start --name PI
2019-04-16 14:25:05 [info] Name: PI
2019-04-16 14:25:05 [info] Connecting to PIO Remote Cloud
2019-04-16 14:25:05 [info] Successfully connected
2019-04-16 14:25:05 [info] Authenticating
2019-04-16 14:25:05 [info] Successfully authorized

Output on the host machine:

> pio remote --agent PI test -v
Building project locally
Verbose mode can be enabled via `-v, --verbose` option
Collected 1 items

============================================== [test/*] Building... (1/3) ==============================================
Processing nucleo_f070rb (framework: mbed; platform: ststm32@5.1.0; board: nucleo_f070rb)
------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/nucleo_f070rb.html
PLATFORM: ST STM32 > ST Nucleo F070RB
HARDWARE: STM32F070RBT6 48MHz 16KB RAM (128KB Flash)
DEBUG: CURRENT(stlink) ON-BOARD(stlink) EXTERNAL(blackmagic, jlink)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 5 compatible libraries
Scanning dependencies...
No dependencies
Checking size .pioenvs/nucleo_f070rb/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [===       ]  26.3% (used 4312 bytes from 16384 bytes)
PROGRAM: [====      ]  44.8% (used 58776 bytes from 131072 bytes)
Testing project remotely
Verbose mode can be enabled via `-v, --verbose` option
Collected 1 items

============================================= [test/*] Uploading... (2/3) =============================================
Processing nucleo_f070rb (framework: mbed; platform: ststm32@5.1.0; board: nucleo_f070rb)
------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Configuring upload protocol...
AVAILABLE: blackmagic, jlink, mbed, stlink
CURRENT: upload_protocol = stlink
Uploading .pioenvs/nucleo_f070rb/firmware.elf
Open On-Chip Debugger 0.9.0-g932ec70 (2017-02-15-11:42)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Runtime Error: /home/pi/.platformio/packages/tool-openocd/scripts/board/st_nucleo_f0.cfg:9: Can't find interface/stlink-v2-1.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 60
at file "/home/pi/.platformio/packages/tool-openocd/scripts/board/st_nucleo_f0.cfg", line 9

Platformio version used: 3.6.6

The project ini file:
[env:nucleo_f070rb]
platform = ststm32@5.1.0
board = nucleo_f070rb
framework = mbed
test_transport = custom
upload_protocol = stlink

Does this file exist on the Pi somewhere in /home/pi/.platformio/packages/tool-openocd/scripts/?

Yes it does, it is in “/home/pi/.platformio/packages/tool-openocd/scripts/interface/stlink-v2-1.cfg”.
Could it be something related to a search path, since in the config files it seems to ‘find’ files before they are sourced?

We had an old version of openOCD for ARM architecture. Please use the latest ststm32 dev/platform (remove “@5.1.0”) and re-run pio update.

I’ve just compiled the latest openOCD for ARMv6l+ and deployed to CDN. Does it work now?