This document assumes some basic knowledge of programming. Like using code editors to edit source code and using basic commands like `make`. Plus some basic Linux knowledge.
## Dependencies
Make sure *git*, *make*, *python* and *pip* are instaled. Most likely these are already availble on your system. Otherwise do:
Make sure *git*, *make*, *python* and *pip* are installed. Most likely these are already available on your system. Otherwise do:
@ -49,7 +50,7 @@ To test if you can compile the firmware try it:
$ make firmware-heltec32_v3
Fingers crossed!
Be patient, this can take up to 15 minutes to complete. Wait for the command prompt to return. You should not see any errors.
## Define new board, the theory
@ -64,7 +65,7 @@ Every target board has a section 'firmware-<board_name>', 'upload-<board-name>'
### boards.h
Both BOARD_MODEL and BOARD_VARIANT are #defines in this file. They are used to define the pinout of the SPI port and if it has certain perifirals such as a screen BLE etc.
Both BOARD_MODEL and BOARD_VARIANT are #defines in this file. They are used to define the pinout of the SPI port and if it has certain peripherals such as a screen BLE etc.
Let's see an example:
@ -123,13 +124,15 @@ If we want to add support for a new board we have to add a new section for this
## Define new board for real
Let's say we want to add support for the Waveshare ESP32-S3 Pico with an SX1278 LoRa transceiver. First we have to define a BOARD_MODEL. This is a 8 bit value that is used in the source code to select the right code for the hardware. Let's choose 0x61 as the BOARD_MODEL as this number is not used yet.
Go to the directory `~/RNode_Firmware_CE`. This is the source code of the RNode firmware. Here you will find all the files needed to compile the firmware. You can edit these files with any text editor you like.
Let's say we want to add support for the Waveshare ESP32-S3 Pico with an SX1278 LoRa transceiver. First we have to define a BOARD_MODEL. This is an 8 bit value that is used in the source code to select the right code for the hardware. Let's choose 0x61 as the BOARD_MODEL as this number is not used yet.
Now we add the following three entries in the Makefile. The exact place is not critical. But it is good practice to put them allongside the already present sections for firmware, upload and release.
The source code is compiled using `make` and the file called *Makefile*. In this file, the following three entries for our new board have to be added. The exact place is not critical. But it is good practice to put them alongside the already present sections for firmware, upload and release.