Forum: Compiler & IDEs [gelöst] PlatformIO, STM32 bluepill, Arduino, DFU: Der Befehl "java"


von Blödmann (Gast)


Lesenswert?

Ich hatte das vor ein paar Monaten schonmal:

Der Befehl "java" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.


Java ist frisch installiert und den Umgebungsvariablen, genauer, Path, 
hinzugefügt, VSCode mit PlatformIO neu gestartet und aktualisiert.
Mit CMD kann ich "java" ausführen.

C:\Users\user>java -version
java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)

C:\Users\user>where java
C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe
C:\Program Files\Java\jre1.8.0_261\bin\java.exe

[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
upload_protocol = dfu

Hat wohl etwas mit 
C:\Users\user\.platformio\packages\tool-stm32duino\maple_loader.jar zu 
tun.

Ich weiß nicht mehr, welcher Bootloader auf dem bluepill steckt. Mag der 
hier sein: 
https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/binaries/generic_boot20_pc13.bin

Jedenfalls sehe ich mit dem Board einen COM-Port unter Windows.

Ah, wenn in 
C:\Users\user\.platformio\packages\tool-stm32duino\maple_upload.bat der 
absolute Pfad für Java angegeben wird, geht's weiter:

maple_loader v0.1
Resetting to bootloader via DTR pulse
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007110b5db, 
pid=17288, tid=0x0000000000001528
#
# JRE version: Java(TM) SE Runtime Environment (8.0_261-b12) (build 
1.8.0_261-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.261-b12 mixed mode 
windows-amd64 compressed oops)
# Problematic frame:
# C  [jSSC-2.8_x86_64.dll+0xb5db]


https://java.com/en/download/help/exception_access.html

CAUSE

We are still investigating root cause of this issue.
SOLUTION

This issue could be seen due to User Account Control (UAC) feature 
enabled on Windows Vista or Windows 7 operating system.
...


Lösung:

https://www.stm32duino.com/viewtopic.php?t=604


Mit dem mit der Arduino-IDE kommenden Java geht es:

"C:\Program Files (x86)\Arduino\java\bin\java.exe"


C:\Users\user>"C:\Program Files (x86)\Arduino\java\bin\java.exe" 
-version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) Client VM (build 25.191-b12, mixed mode)

von Blödmann (Gast)


Lesenswert?

Naja. Upload hat einmal funktioniert, jetzt bekomme ich keinen COM-Port 
mehr sondern nur ein "Maple 003".

Looking for upload port...
Error: Please specify `upload_port` for environment or use global 
`--upload-port` option.
For some development platforms it can be a USB flash drive (i.e. 
/media/<user>/<device name>)
*** [upload] Explicit exit, status 1

von Blödmann (Gast)


Lesenswert?

Mit der Arduino-IDE kann ich das Blink flashen (RESET-Taster drücken)

maple_loader v0.1
Resetting to bootloader via DTR pulse
Reset via USB Serial Failed! Did you select the right serial port?
Searching for DFU device [1EAF:0003]...
Assuming the board is in perpetual bootloader mode and continuing to 
attempt dfu programming...

Found it!

Opening USB Device 0x1eaf:0x0003...
Found Runtime: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=1, 
name="STM32duino bootloader v1.0  Upload to Flash 0x8005000"
Setting Configuration 1...
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
bytes_per_hash=423
Starting download: [##################################################] 
finished!
error resetting after download: usb_reset: could not reset device, win 
error: Ein nicht vorhandenes Ger�t wurde angegeben.
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is 
present

Done!

Resetting USB to switch back to runtime mode
timeout waiting for COM21 serial

Dann taucht auch wieder ein COM-Port auf.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.