Sketch uses 15416 bytes (23%) of program storage space. Maximum is 65536 bytes.
Global variables use 3088 bytes of dynamic memory.
java.lang.NullPointerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingProgrammer(SerialUploader.java:314)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:89)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:82)
at processing.app.SketchController.upload(SketchController.java:736)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$DefaultExportAppHandler.run(Editor.java:2125)
at java.lang.Thread.run(Thread.java:748)
I’m using an ST-Link V2 (chinese clone) for this. The settings are
Board: Generic STM32F103 series
Variant: STM32F103C8 (20k RAM, 64k Flash)
Upload method: STLink
CPU speed: 72 MHZ
I suspect my settings are wrong in Arduino IDE, because PlatformIO (VScode plugin) uploads just fine.
Anyone knows what’s wrong?
Try 1.8.5.
Which core?……
Please read again this thread:
viewtopic.php?f=2&t=3111
[Miscellaneous
When posting questions or requesting assistance; please respect the user’s time and provide as much information as possible about:
– I am attempting to…
– I based my design off of this/these resources…(please provide links)
– I have referred to this manufacturer document(s)…(please provide links)
– I have attached my full-code-to-date and I am having these specific concerns/issues…
– My computer development environment is: OS, IDE version, used core, library version, library source, etc. (if possible, provide screenshot of IDE)
Here is how the error looks like in the IDE:
https://imgur.com/a/t1qcmfS
Global variables use 7488 bytes (36%) of dynamic memory, leaving 12992 bytes for local variables. Maximum is 20480 bytes.
STM32 ST-LINK CLI v2.1.0
STM32 ST-LINK Command Line Interface[madias – Wed Sep 26, 2018 9:48 pm] –
Your Java is outdated
I have just updated my Java to latest version.
[madias – Wed Sep 26, 2018 9:48 pm] –
Did you everything installed as default:
So like:
C:\Users\Administrator\Documents\Arduino
and (my example)
C:\Users\Administrator\Documents\Arduino\hardware\Arduino_STM32_18_09_12
Important are following files:
C:\Users\Administrator\Documents\Arduino\hardware\Arduino_STM32_18_09_12\tools\win (like stlink…)Did you installed the STM driver for the STLink? https://www.st.com/en/development-tools … nk009.html
Yes, I have re-installed Arduino with the default paths. The whole Arduino folder with libraries and hardware is present under C:\..\Documents
The STM driver are installed, the device is also recognized when I plug it in my laptop. ST-LINK should be fine though, because I use ST-LINK with PlatformIO and it uploads fine with that. I’m not sure why I get a Java error in Arduino.
[skematic – Wed Sep 26, 2018 10:24 pm] –
….
The STM driver are installed, the device is also recognized when I plug it in my laptop. ST-LINK should be fine though, because I use ST-LINK with PlatformIO and it uploads fine with that. I’m not sure why I get a Java error in Arduino.
You have two (2) versions of Java… one for the host machine (win in your case) and an “encapsulated” version for the Arduino IDE.
Open a Command Prompt, follow https://www.java.com/en/download/help/v … manual.xml
Java is such a p.o.s.
(my opinion) In my “UNIX Platform Architecture” days, JAVA could take down the Enterprise if the class-path got screwed.
So, the machine version should be in the PATH while the encapsulated Arduino version is called relative to the Arduino installation. In my view, Arduino “base” code should never be under …\Documents although it could be under \Users\<you>\…
Arduino has a real install based on Windows Installer … clean up everything and try that, maybe.
Ray
[mrburnette – Wed Sep 26, 2018 11:31 pm] –
You have two (2) versions of Java… one for the host machine (win in your case) and an “encapsulated” version for the Arduino IDE.Open a Command Prompt, follow https://www.java.com/en/download/help/v … manual.xml
Are you looking for the version of the installed JRE? Here it is
$ java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
I’m fairly certain the issue is JAVA… or as we say, … in the context of the ST-link utility…
I’m using an ST-Link V2 (chinese clone) for this. The settings are
Board: Generic STM32F103 series
Variant: STM32F103C8 (20k RAM, 64k Flash)
Upload method: STLink
You know your clone ST-link V2 works with one IDE.
You know it does not work with Arduino IDE.
IF you just compile without uploading, the Arduino JAVA runs the IDE correctly.
The issue seems be in the environment… Platform.txt
The relevant section :
# stlink upload
tools.stlink_upload.cmd=stlink_upload
tools.stlink_upload.cmd.windows=stlink_upload.bat
tools.stlink_upload.path.windows={runtime.hardware.path}/tools/win
tools.stlink_upload.path.macosx={runtime.hardware.path}/tools/macosx
tools.stlink_upload.path.linux={runtime.hardware.path}/tools/linux
tools.stlink_upload.path.linux64={runtime.hardware.path}/tools/linux64
tools.stlink_upload.upload.params.verbose=-d
tools.stlink_upload.upload.params.quiet=
tools.stlink_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
Arduino use its standalone JRE so I don’t think the issue came from the host JRE.

