Code: Select all
Sketch uses 14148 bytes (43%) of program storage space. Maximum is 32768 bytes.
Global variables use 2064 bytes (20%) of dynamic memory, leaving 8176 bytes for local variables. Maximum is 10240 bytes.
java.lang.NullPointerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingProgrammer(SerialUploader.java:295)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:90)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
at processing.app.SketchController.upload(SketchController.java:732)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$UploadHandler.run(Editor.java:2061)
at java.lang.Thread.run(Thread.java:748)
.../Arduino/hardware/Arduino_STM32
.../Arduino/hardware/Arduino_STM32-SteveStrong
Years ago, I started with https://github.com/rogerclarkmelbourne/Arduino_STM32, but those files might have been overwritten with another set of files.
Also these lines were added to the 'Additional Boards Manager URLs':
http://dan.drown.org/stm32duino/package ... index.json
https://github.com/stm32duino/BoardMana ... index.json
https://github.com/stm32duino/BoardMana ... index.json
Possibly these lines were added in an attempt to repair the problem. That was at least a year ago, I could not resolve this issue and I gave up and installed STM32Cube and I even bought an original ST-Link programmer.
Apart from my work in Cube, I would like to program some sketches that I've already made.
I found a workaround to do this. By downloading the separate programmer software from the ST website, I am able to use the Arduino generated .elf file from the temp directory and program that into the device with STM32Cube Programmer.
I would like to automate that process. ST included a command line tool to do the job and I can do the programming with this line:
Code: Select all
/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=swd -d /tmp/arduino_build_458370/Blink.ino.elf
with this:
Code: Select all
#!/bin/bash
echo "==========================";
echo "Using .elf instead of .bin"
echo ${1/.bin/".elf"};
echo "==========================";
/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=swd -d ${1/.bin/".elf"} 0x8000000
If anyone can tell how to improve this, please let me know.
I am using version 2.9 of the programmer.
https://www.st.com/en/development-tools ... eprog.html