I am following this guideline to develop and modify existing code:
https://arduino.github.io/arduino-cli/platform-specification/
Folder structure:
Arduino > hardware > vendor > variant
Arduino > hardware > vendor > tools
Before developing my own board, I am testing this for 2 existing vendors with 1 variant each, with folder structure that look like these:
Arduino > hardware > sandeepmistry > nRF5
Arduino > hardware > sandeepmistry > tools > gcc-arm-none-eabi
Arduino > hardware > sandeepmistry > tools > openocd
Arduino > hardware > STM32 > stm32
Arduino > hardware > STM32 > tools > xpack-arm-none-eabi-gcc
Arduino > hardware > STM32 > tools > STM32Tools
I can build the blink sketch for both platform, but I am not able to upload it at all. Arduino IDE does not seem to find the location of the tools.
In platform.txt for nRF5, I had to change the programming tool path like this:
#tools.openocd.path={runtime.tools.openocd-0.10.0-dev.nrf5.path}
tools.openocd.path={runtime.hardware.path}/tools/openocd/0.10.0-dev.nrf5
In platform.txt for STM32, I had to change the programming tool path like this:
#tools.stm32CubeProg.path.linux={runtime.tools.STM32Tools.path}/tools/linux
tools.stm32CubeProg.path.linux={runtime.hardware.path}/tools/STM32Tools/1.4.0/tools/linux
Arduino IDE does see runtime.tools just fine, but something is not working in there when being used by the programmer tool. Instead, pointing it to the absolute path and runtime.hardware, it works perfectly. I think it is a bug in the Arduino IDE. Anyone else experience the same thing? Am I missing anything? What's the temporary workaround for this?
My system is Ubuntu 18.04, Arduino IDE 1.8.13