IzzyBonds
I was trying to set up an esp 32 as a slave device. I downloaded the "Blank" arduino sketch, while trying to upload the sketch I got this error.
[203128%2F9348966%2Fmceclip0]
Reply 0 0
thiagoralves
Can I get the full bug report that was generated please?
Reply 0 0
IzzyBonds
app-title:
beremiz
app-version:
3.0
Release: 2025-05-22
cwd:
C:\Users\admin\OpenPLC_Editor
date:
Mon Jun 9 07:45:03 2025
e-type:
<class 'json.decoder.JSONDecodeError'>
e-value:
Expecting value: line 1 column 1 (char 0)
locals:
self: <json.decoder.JSONDecoder object at 0x0000027CFFC08370>
s: ''
idx: 0
platform:
Windows-10-10.0.19045-SP0
python-version:
3.9.10
self:
object_hook: None
parse_float: <class 'float'>
parse_int: <class 'int'>
parse_constant: <built-in method __getitem__ of dict object at 0x0000027CFFC21700>
strict: True
object_pairs_hook: None
parse_object: <function JSONObject at 0x0000027CFFC1E9D0>
parse_array: <function JSONArray at 0x0000027CFFC1EA60>
parse_string: <built-in function scanstring>
memo: {}
scan_once: <_json.Scanner object at 0x0000027CFFC2D220>
traceback:
File "C:\Users\admin\OpenPLC_Editor\.\editor\BeremizIDE.py", line 836, in OnMenu
getattr(self.CTR, method)()
File "C:\Users\admin\OpenPLC_Editor\.\editor\ProjectController.py", line 2371, in _generateArduino
dialog = ArduinoUploadDialog.ArduinoUploadDialog(self.AppFrame, program, arduino_ext_contents, MD5, self)
File "C:\Users\admin\OpenPLC_Editor\.\editor\dialogs\ArduinoUploadDialog.py", line 92, in __init__
self.loadHals()
File "C:\Users\admin\OpenPLC_Editor\.\editor\dialogs\ArduinoUploadDialog.py", line 1133, in loadHals
self.hals = json.load(f)
File "C:\Users\admin\OpenPLC_Editor\python\lib\json\__init__.py", line 293, in load
return loads(fp.read(),
File "C:\Users\admin\OpenPLC_Editor\python\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\admin\OpenPLC_Editor\python\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\admin\OpenPLC_Editor\python\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
<class 'json.decoder.JSONDecodeError'>: Expecting value: line 1 column 1 (char 0)
wx-platform:
__WXMSW__
wx-version:
4.2.0
 
Reply 0 0
thiagoralves
There seems to be a problem with your hals.json file. Did you try to modify this file? Could you upload your hals.json so I can take a look? The file is at /editor/arduino/examples/Baremental/hals.json
Reply 0 0
IzzyBonds
I have not modified the file. when I tried to transfer to PLC I think it tried to install the proper libraries and failed. I can not upload hals.json file. I get a pop up saying its not supported here. I tried to open it, and it was blank. I went to a .josn viewer and this is what it showed.
[203128%2F9349043%2Fmceclip0]
Reply 0 0
IzzyBonds
When I try to install dependencies, It fails. I noticed it says not enough space. I have 2gb of space available. How much space is needed for the dependencies?
 
$ C:\Users\admin\OpenPLC_Editor\editor\arduino\bin\iec2c.exe -v
matiec version 0.1
changeset id:
$? = 0
$ C:\Users\admin\OpenPLC_Editor\editor\arduino\bin\arduino-cli-w64.exe --no-color version
arduino-cli Version: 1.0.3 Commit: 8b6ad258 Date: 2024-07-23T08:45:25Z
$? = 0
Checking Core and Board installation...
Core esp32:esp32 is not installed
$ C:\Users\admin\OpenPLC_Editor\editor\arduino\bin\arduino-cli-w64.exe --no-color core update-index
Downloading index: package_index.tar.bz2 0 B / 80.75 KiB 0.00%
Downloading index: package_index.tar.bz2 downloaded
Downloading index: package_esp8266com_index.json 0 B / ? 0.00%
Downloading index: package_esp8266com_index.json downloaded
Downloading index: package_esp32_index.json 0 B / ? 0.00%
Downloading index: package_esp32_index.json downloaded
Downloading index: package_stmicroelectronics_index.json 0 B / ? 0.00%
Downloading index: package_stmicroelectronics_index.json downloaded
Downloading index: package_ControllinoHardware_index.json 0 B / ? 0.00%
Downloading index: package_ControllinoHardware_index.json downloaded
Downloading index: package_rp2040_index.json 0 B / 936.82 KiB 0.00%
Downloading index: package_rp2040_index.json downloaded
Downloading index: package_productivity-P1AM_200-boardmanagermodule_index.json 0 B / 16.55 KiB 0.00%
Downloading index: package_productivity-P1AM_200-boardmanagermodule_index.json downloaded
Downloading index: package_productivity-P1AM-boardmanagermodule_index.json 0 B / ? 0.00%
Downloading index: package_productivity-P1AM-boardmanagermodule_index.json downloaded
Downloading index: package_vea_index.json 0 B / ? 0.00%
Downloading index: package_vea_index.json downloaded
$? = 0
$ C:\Users\admin\OpenPLC_Editor\editor\arduino\bin\arduino-cli-w64.exe --no-color core install esp32:esp32
Tool esp32:esp32-arduino-libs@idf-release_v5.4-2f7dcd86-v1 already installed
Tool esp32:esp-x32@2411 already installed
Tool esp32:xtensa-esp-elf-gdb@14.2_20240403 already installed
Downloading packages...
esp32:esp-rv32@2411 esp32:esp-rv32@2411 already downloaded
esp32:riscv32-esp-elf-gdb@14.2_20240403 esp32:riscv32-esp-elf-gdb@14.2_20240403 already downloaded
esp32😮penocd-esp32@v0.12.0-esp32-20241016 esp32😮penocd-esp32@v0.12.0-esp32-20241016 already downloaded
esp32:esptool_py@4.9.dev3 esp32:esptool_py@4.9.dev3 already downloaded
esp32:mkspiffs@0.2.3 esp32:mkspiffs@0.2.3 already downloaded
esp32:mklittlefs@3.0.0-gnu12-dc7f933 esp32:mklittlefs@3.0.0-gnu12-dc7f933 already downloaded
arduino😃fu-util@0.11.0-arduino5 arduino😃fu-util@0.11.0-arduino5 already downloaded
esp32:esp32@3.2.0 esp32:esp32@3.2.0 already downloaded
Installing esp32:esp-rv32@2411...
Error during install: Cannot install tool esp32:esp-rv32@2411: extracting archive: Create file C:\Users\admin\AppData\Local\Arduino15\tmp\package-1523619265\riscv32-esp-elf\riscv32-esp-elf\lib\rv32imc_zicsr_zifencei\ilp32\libc.a: write C:\Users\admin\AppData\Local\Arduino15\tmp\package-1523619265\riscv32-esp-elf\riscv32-esp-elf\lib\rv32imc_zicsr_zifencei\ilp32\libc.a: There is not enough space on the disk.
$? = 1
Initial core installation failed.
Build phase <function build.<locals>.handle_board_installation at 0x00000212395C1790> failed
  
Reply 0 0
thiagoralves
I'm not sure how much space is needed. Each vendor (AVR, ESP32, STM32, etc) has its own toolchain with different size requirements. I believe 2GB should be enough, but it seems it isn't. Maybe the best approach would be to remove your Arduino15 folder as your core installations might be messed up, remove the editor, and then install the editor again and try to compile your project. This will force the install of everything again and hopefully if you have enough disk space everything will go out smoothly.
Reply 0 0
IzzyBonds
I think part of the issue is storage space, I cleared some space got it to download. I was able to connect an Arduino uno as a slave device. I'm trying to add an ESP 32 in addition to the Arduino. Is the process the same? Do I have to upload the "Blank" sketch to the ESP 32? I'm using it as RTU instead of TCP. I was able to download the blank sketch and set the slave id to "1" since the Arduino is on "0". When run my program I'm getting no connection to the ESP 32.
Reply 0 0
thiagoralves
Yes, the process is the same. You can use slave Id 0 for both, as they run on separate ports, so there isn't a chance of conflict. Since the ESP32 template expects Modbus TCP, you will have to create your own device using the "Generic RTU" template. Just make sure that all parameters for your slave (slave id, baud rate, etc) match what you set the ESP32 for on the upload dialog.
Reply 0 0
Write a reply...
Reply