A fatal error has been detected by the Java Runtime Environment:

i want to dump my code into stm32 using the bootloader. Even I am unable to upload the code because I am unable to Maple port please help me.
Sketch uses 12804 bytes (19%) of program storage space. Maximum is 65536 bytes.
Global variables use 2064 bytes (10%) of dynamic memory, leaving 18416 bytes for local variables. Maximum is 20480 bytes.
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=20260, tid=0x0000000000004e98

JRE version: Java(TM) SE Runtime Environment (8.0_401) (build 1.8.0_401-b10)

Java VM: Java HotSpot(TM) 64-Bit Server VM (25.401-b10 mixed mode windows-amd64 compressed oops)

Problematic frame:

C [jSSC-2.8_x86_64.dll+0xb5db]

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

An error report file with more information is saved as:

C:\Users\jrama\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2022.9.26\win\hs_err_pid20260.log

If you would like to submit a bug report, please visit:

Crash Report

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

timeout waiting for COM8 serial

Hi @jvdrc123.

Explanation

Are you using Arduino IDE 2.x (e.g., 2.3.2)?

If so, I think the cause of the error is explained here:

https://github.com/rogerclarkmelbourne/Arduino_STM32/issues/834#issuecomment-1661152147

Since the Arduino IDE 1.x application is written in the Java programming language, the installation of that version of Arduino IDE includes a copy of the Java Runtime Environment.

The "maple_loader" tool that is used to upload sketches to the STM32 board is also written in the Java programming language. The "STM32F1xx/GD32F1xx boards" platform is configured to use the Java Runtime Environment from the Arduino IDE installation to run this maple_loader tool.

Arduino IDE 2.x is a complete rewrite of the Arduino IDE application. This application is written in the TypeScript programming language instead of Java so the Arduino IDE 2.x installation does not include a copy of the Java Runtime Environment. This means that when you use the "STM32F1xx/GD32F1xx boards" platform with Arduino IDE 2.x, it attempts to use your global installation of Java. The problem with that is the maple_loader tool is written specifically for the version of Java provided by Arduino IDE 1.x. Your global system installation is a different Java version that is not compatible with maple_loader.

Solution

The most simple solution would be to use the actively maintained "STM32 MCU based boards" platform instead of the largely abandoned Roger Clark "STM32F1xx/GD32F1xx boards" platform you are using now.

You can learn how to install the STM32 MCU based boards" platform from that project's documentation:

https://github.com/stm32duino/Arduino_Core_STM32?tab=readme-ov-file#getting-started

Alternative solution

In case you have a specific reason for using the Roger Clark platform, the alternative simple solution would be to use Arduino IDE 1.8.19 instead of 2.x. The download links for Arduino IDE 1.8.19 are listed here:

https://www.arduino.cc/en/software#legacy-ide-18x

Installations of Arduino IDE 1.8.19 and 2.x can coexist on your computer without any problems so if you want to continue to use Arduino IDE 2.x for other boards then you are welcome to leave it installed and switch back and forth between the two different IDE versions as you like.

1 Like

Thank you very much for your response. I will try them and get back to you with the result.

I'm working with the STM32F103C8T6. I changed the board manager pack managed by STM32 MCU boards, but now I'm encountering a different error.

Sketch uses 10576 bytes (32%) of program storage space. Maximum is 32768 bytes.
Global variables use 1116 bytes (10%) of dynamic memory, leaving 9124 bytes for local variables. Maximum is 10240 bytes.

+-----------------------------------------------------------------------+
| HID-Flash v2.2.1 - STM32 HID Bootloader Flash Tool |
| (c) 2018 - Bruno Freitas http://www.brunofreitas.com |
| (c) 2018-2019 - Vassilis Serasidis https://www.serasidis.gr |
| Customized for STM32duino ecosystem https://www.stm32duino.com |
+-----------------------------------------------------------------------+

Trying to open the [COM8]...
Toggling DTR...
Searching for [1209:BEBA] device...
##########
Error - [1209:BEBA] device is not found :(> Searching for [COM8] ...
[COM8] is found !
Finish
Failed uploading: uploading error: exit status 1

Have you already installed the HID bootloader on the STM32F103C8T6?

https://github.com/Serasidis/STM32_HID_Bootloader/tree/master?tab=readme-ov-file#installing-the-hid-bootloader-to-stm32-devices

Yes, I tried and one more thing is that i cannot install maple drivers. It is not showing in my port options.

if possible can you tell me where I am lagging because this is my first time working with STM32?

I'm afraid I can't be of further assistance. My limited experience with STM32 boards has only been with the "STM32CubeProgrammer (SWD)" upload method. Hopefully one of the other forum helpers who is more knowledgeable on this subject matter will be able to provide advice for you.

if I try to install STM32 cube I am getting like thiss

Did you download it from the official ST Microelectronics website?

https://www.st.com/en/development-tools/stm32cubeprog.html

yes

If you are certain that you downloaded the file from the st.com website and you trust ST Microelectronics, then you can click the "More info" link in that dialog. After you do that, a "Run anyway" button will appear in the dialog. You can click that button to run the executable even though Windows Defender SmartScreen doesn't recognize it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.