Compiling Firmware for the SovolSV04

I recently rebuilt my hobby room laptop. Installing Linux Mint, my preferred OS other than MacOS. So I had to reinstall Visual Studio Code and configure Platformio after this all configured I was getting errors about the arduino.h not being found. Wasn’t sure if I missed something so I double checked it all. Still got the same error. I then tried compiling Unified2 from TH3DStudio and it compiles fine. I checked the platforio.ini file on both and they both have the same call to arduino.h. Downloaded the version of firmware from October from Sovol, same error trying to compile it.

I don’t want to contact Sovol just yet with the issue. I want to wait until they ship my bed kit and BLTouch then I’ll stir the pot. There are absolutely no instructions for compiling the firmware, I thinking maybe they don’t want you compiling your own firmware, but make it available to comply with the license. The odd thing is I see reference to what looks like and Ender3 v2 which is one that is error looking for the aduino.h

I contacted Sovol and sent them a copy of the terminal readout when I tried to compile Solo’s source code. Their reply was their engineers have no idea what is wrong that I should go on FB and ask there. That ain’t gonna happen, don’t do FB and don’t intend to either.

Make that 3. I have never had a FB acct. and never will.

And I thought I was the only breathing person who didn’t have a Fakebook account

Here’s the error I’m getting when trying to compile. I have went through the code and arduino.h is there. ???

Compiling .pio/build/STM32F103RET6_creality/src/src/HAL/shared/esp_wifi.cpp.o
Compiling .pio/build/STM32F103RET6_creality/src/src/HAL/shared/servo.cpp.o
Compiling .pio/build/STM32F103RET6_creality/src/src/MarlinCore.cpp.o
Compiling .pio/build/STM32F103RET6_creality/src/src/core/serial.cpp.o
Compiling .pio/build/STM32F103RET6_creality/src/src/core/utility.cpp.o
Compiling .pio/build/STM32F103RET6_creality/src/src/feature/ammeter.cpp.o
Compiling .pio/build/STM32F103RET6_creality/src/src/feature/babystep.cpp.o
Compiling .pio/build/STM32F103RET6_creality/src/src/feature/bedlevel/abl/abl.cpp.o
Compiling .pio/build/STM32F103RET6_creality/src/src/feature/bedlevel/bedlevel.cpp.o
Compiling .pio/build/STM32F103RET6_creality/src/src/feature/bltouch.cpp.o
Compiling .pio/build/STM32F103RET6_creality/src/src/feature/powerloss.cpp.o
In file included from Marlin/src/MarlinCore.cpp:76:
Marlin/src/lcd/e3v2/creality/LCD_RTS.h:5:10: fatal error: arduino.h: No such file or directory

************************************************** ***************
* Looking for arduino.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:arduino.h"
* Web > https://registry.platformio.org/search?q=header:arduino.h
*
************************************************** ***************

5 | #include <arduino.h>
| ^~~~~~~~~~~
compilation terminated.
*** [.pio/build/STM32F103RET6_creality/src/src/MarlinCore.cpp.o] Error 1
In file included from Marlin/src/feature/powerloss.cpp:57:
Marlin/src/feature/../lcd/e3v2/creality/LCD_RTS.h:5:10: fatal error: arduino.h: No such file or directory

************************************************** ***************
* Looking for arduino.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:arduino.h"
* Web > https://registry.platformio.org/search?q=header:arduino.h
*
************************************************** ***************

5 | #include <arduino.h>
| ^~~~~~~~~~~
compilation terminated.
*** [.pio/build/STM32F103RET6_creality/src/src/feature/powerloss.cpp.o] Error 1
================================================== ============= [FAILED] Took 16.01 seconds ================================================== =============

Environment Status Duration
---------------------- -------- ------------
STM32F103RET6_creality FAILED 00:00:16.010
================================================== ======== 1 failed, 0 succeeded in 00:00:16.010 ================================================== ========
The terminal process "platformio 'run'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.


My 1st thought is that maybe arduino.h isn’t in the directory where it’s expected to be but, as a programmer, I assume you’ve checked that.

I’ve been looking around at IDEX printers trying to remember all the potential problems each has and their strong points. I was wondering what @Gramps thinks of his SOVOL IDEX these days.

I assume you compile marlin? If so, just install VisualStudioCode and install the arduino-ide plugin as well as the marlinbuild or buildmarlin (no clue which way around it was). All you need to do is to fetch the latest marlin and dump in the configuration.h for your printer.

You don´t need to change any configuration of arduino-ide or any other files. The BuildMarlin-Plugin will scan the configuration file and select the matching processor and setup the required flash information automagically.

Now click on the BuildMarlin plugin (left panel) and there should be a UI appearing where usually your source files are displayed. There you usually find just a button “build” and some information the plugin gathered from the configuration.h file. Click it and it should work. Sometimes the script has multiple choices. e.g. if a board comes with 8mb or 16mb flash. Those appear in the build marlin plug in UI.

There is no source file configuration required and plain marlin will build. Once it builds. Open the configuration.h and setup your sensor.

The only Marlin I have compiled was the Unified2 firmware from TH3DStudio which has all the setting in it for their EZABL. It will compile without issues. I contacted Sovol and they were no help at all they said it had to be the VS environment. Anyway I’ll definitely try your suggestion @Geit I already have the Marlin extension installed.

But you need to actively use it to start the build. :slight_smile: installing is not enough.

I just read your 1st answer a little closer. I get it now use the configuration.h file for my printer and the rest of the files from Marlin and not the ones from Sovol. I will definitely give that a try and see what happens.