mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-02-17 12:12:11 +01:00
Created Compiling the Firmware (markdown)
parent
1a236eddc8
commit
2e883e9307
1 changed files with 34 additions and 0 deletions
34
Compiling-the-Firmware.md
Normal file
34
Compiling-the-Firmware.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
I developed this using the painfully awful Arduino IDE v1.8. I originally installed v2.0 then found out you cannot upload the file data to it so use v1.8 and save yourself several hours of searching through forums for functions that are not supported even several years after its release. If you are using VS Code then you are on your own. The good news is that you only need this during the initial install and all follow on work for the module is user friendly.
|
||||
|
||||
Don't waste your time on Arduino IDE v2.0. As of January 2023, it is incomplete, and it exists only for tortured souls in search of a never realized promise. Don't do it you will be disappointed. If this situation improves I will be back to update my recommendations.
|
||||
|
||||
First compile and upload the firmware to the ESP32. Then upload the data using the Sketch Data upload tool. You will be happy to know that once the initial install is done you don't have to go through all these hoops to update the firmware or the LittleFS file system if you are using an ESP32S-WROOM-32 module. I created a utility that is part of the software to do this task but it is a chicken/egg thing where you need the hen on the ESP32 to hatch the egg. You can install the future firmware and the applicaton files remotely. So you can put the ESPSomfy RTS module into a remote location.
|
||||
|
||||
# Prerequisites
|
||||
You must first install the Arduino IDE v1.8 which you will find on the [Arduino Software Site](https://www.arduino.cc/en/software). Install what they call the `Legacy IDE` for the platform you are developing on. Then follow the instructions to configure it for your ESP32 board. Make sure you use a USB data cable not one of the ones that is only for charging. If you cannot connect to your ESP32 then this is likely the problem.
|
||||
|
||||
To compile the firmware you will need to include four libraries. To install them, navigate to `Sketch` -> `Install Library`. Some of these libraries may be installed by default when you installed the Arduino IDE. They are listed below in the least likelihood of being installed already.
|
||||
|
||||
The libraries include:
|
||||
SmartRC-CC1101-Driver-Lib - Used to configure the transceiver.
|
||||
PubSubClient - Used to provide the MQTT interface for integration.
|
||||
WebSockets - Used to communicate the state of the shades over a websocket connection.
|
||||
ArduinoJson - JSON serializer and deserializer.
|
||||
|
||||
# LittleFS
|
||||
This project uses the file system on the ESP32. Follow the instructions found here to set up your Arduino IDE so it can upload the files to your board. Why this isn't just part of the Arduino development suite is a mystery but I guess that is why it is called hacking.
|
||||
|
||||
[LittleFS Plugin](https://github.com/lorol/arduino-esp32littlefs-plugin)
|
||||
|
||||
|
||||
# Compile and Upload
|
||||
Once you have set up the environment press the arrow button at the top left of the Arduino IDE and it will begin compiling the software then upload when it is done. If it is successful it will show in the console area at the bottom of the IDE.
|
||||
|
||||
# Upload the File System
|
||||
All of the files required to build the file system are included in the `/data/` directory of the repository. When you click on the menu `Tool` -> `ESP32 Sketch Data Upload` it will compress these files into the file system layout and upload it to the ESP32. If you have the Serial Monitor open, close it before you perform this operation as it will fail if it is open.
|
||||
|
||||
Once you have completed compiling and uploading the sketch you are done with the arduous part. Hopefully you have not spent all your F-Bombs on this process and have some left for bombing other targets. I am seeking easier ways so if you have a suggestion feel free to open an issue describing it.
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue