HOWTO updated
This commit is contained in:
@@ -121,15 +121,17 @@ If we want to add support for a new board we have to add a new section for this
|
||||
|
||||
Let's say we want to add support for the Waveshare ESP32-S3 Pico with an SX1278 LoRa transceiver. First we have to make define both BOARD_MODEL and BOARD_VARIANT. Let's define BOARD_MODEL as 0x61 and BOARD_VARIANT as 0x31 as these numbers are not used yet. Here the 0x31 indicates the use of a SX1278 LoRa transceiver. In the future we can define more transceivers for this board. Then we make entries in the Makefile.
|
||||
|
||||
firmware-waveshare-esp32-s3-pico:
|
||||
arduino-cli compile --fqbn "esp32:esp32:esp32s3:CDCOnBoot=cdc" $(COMMON_BUILD_FLAGS) --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x61\" \"-DBOARD_VARIANT=0x31\""
|
||||
# Added board from Mees Electronics
|
||||
firmware-waveshare-esp32-s3-pico: check_bt_buffers
|
||||
arduino-cli compile --fqbn "esp32:esp32:esp32s3:CDCOnBoot=cdc" $(COMMON_BUILD_FLAGS) --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x61\""
|
||||
|
||||
# Added board from Mees Electronics
|
||||
upload-waveshare-esp32-s3-pico:
|
||||
arduino-cli upload -p $(or $(port), /dev/ttyACM0) --fqbn esp32:esp32:esp32s3
|
||||
@sleep 1
|
||||
rnodeconf $(or $(port), /dev/ttyACM0) --firmware-hash $$(./partition_hashes ./build/esp32.esp32.waveshare-esp32-s3-pico/RNode_Firmware_CE.ino.bin)
|
||||
rnodeconf $(or $(port), /dev/ttyACM0) --firmware-hash $$(./partition_hashes ./build/esp32.esp32.esp32s3/RNode_Firmware_CE.ino.bin)
|
||||
@sleep 3
|
||||
python ./Release/esptool/esptool.py --port $(or $(port), /dev/ttyACM0) --chip esp32-s3 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin
|
||||
python3 ./Release/esptool/esptool.py --port $(or $(port), /dev/ttyACM0) --chip esp32-s3 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin
|
||||
|
||||
release-waveshare-esp32-s3-pico:
|
||||
arduino-cli compile --fqbn "esp32:esp32:esp32s3:CDCOnBoot=cdc" $(COMMON_BUILD_FLAGS) --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x61\" \"-DBOARD_VARIANT=0x31\""
|
||||
@@ -143,74 +145,58 @@ Let's say we want to add support for the Waveshare ESP32-S3 Pico with an SX1278
|
||||
In the file Boards.h make an entry for the new board within the '#if MCU_VARIANT == MCU_ESP32':
|
||||
|
||||
#elif BOARD_MODEL == BOARD_WAVESHARE_ESP32_S3_PICO
|
||||
#define HAS_DISPLAY true
|
||||
#define DISPLAY OLED
|
||||
#define HAS_BLUETOOTH true
|
||||
#define IS_ESP32S3 true
|
||||
#define HAS_DISPLAY false
|
||||
#define HAS_BLUETOOTH false
|
||||
#define HAS_BLE true
|
||||
#define HAS_PMU true
|
||||
#define HAS_CONSOLE true
|
||||
#define HAS_EEPROM true
|
||||
//#define HAS_INPUT true
|
||||
//#define HAS_SLEEP true
|
||||
//#define PIN_WAKEUP GPIO_NUM_0
|
||||
//#define WAKEUP_LEVEL 0
|
||||
#define INTERFACE_COUNT 1
|
||||
#define OCP_TUNED 0x38
|
||||
|
||||
const uint8_t interfaces[INTERFACE_COUNT] = {SX1276};
|
||||
#if HAS_TCXO == true
|
||||
const bool interface_cfg[INTERFACE_COUNT][3] = {
|
||||
// SX127X
|
||||
{
|
||||
true, // DEFAULT_SPI
|
||||
true, // HAS_TCXO
|
||||
false // DIO2_AS_RF_SWITCH
|
||||
},
|
||||
};
|
||||
const int8_t interface_pins[INTERFACE_COUNT][10] = {
|
||||
// SX127X
|
||||
{
|
||||
18, // pin_ss
|
||||
-1, // pin_sclk
|
||||
-1, // pin_mosi
|
||||
-1, // pin_miso
|
||||
-1, // pin_busy
|
||||
26, // pin_dio
|
||||
23, // pin_reset
|
||||
-1, // pin_txen
|
||||
-1, // pin_rxen
|
||||
33 // pin_tcxo_enable
|
||||
}
|
||||
};
|
||||
#endif
|
||||
#if defined(EXTERNAL_LEDS)
|
||||
const int pin_led_rx = 15;
|
||||
const int pin_led_tx = 4;
|
||||
#else
|
||||
const int pin_led_rx = 25;
|
||||
const int pin_led_tx = 25;
|
||||
const int pin_btn_usr1 = 0;
|
||||
|
||||
#define HAS_NP true
|
||||
const int pin_np = 21;
|
||||
#if HAS_NP == false
|
||||
#if defined(EXTERNAL_LEDS)
|
||||
const int pin_led_rx = 16;
|
||||
const int pin_led_tx = 17;
|
||||
#else
|
||||
const int pin_led_rx = 21;
|
||||
const int pin_led_tx = 21;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TCXO == false
|
||||
const uint8_t interfaces[INTERFACE_COUNT] = {SX1278};
|
||||
const bool interface_cfg[INTERFACE_COUNT][3] = {
|
||||
// SX127X
|
||||
// SX1278
|
||||
{
|
||||
true, // DEFAULT_SPI
|
||||
false, // DEFAULT_SPI
|
||||
false, // HAS_TCXO
|
||||
false // DIO2_AS_RF_SWITCH
|
||||
},
|
||||
};
|
||||
|
||||
const int8_t interface_pins[INTERFACE_COUNT][10] = {
|
||||
// SX127X
|
||||
const uint8_t interface_pins[INTERFACE_COUNT][10] = {
|
||||
// SX1278
|
||||
{
|
||||
18, // pin_ss
|
||||
-1, // pin_sclk
|
||||
-1, // pin_mosi
|
||||
-1, // pin_miso
|
||||
10, // pin_ss
|
||||
12, // pin_sclk
|
||||
11, // pin_mosi
|
||||
13, // pin_miso
|
||||
-1, // pin_busy
|
||||
26, // pin_dio
|
||||
23, // pin_reset
|
||||
15, // pin_dio
|
||||
14, // pin_reset
|
||||
-1, // pin_txen
|
||||
-1, // pin_rxen
|
||||
-1 // pin_tcxo_enable
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
Also, in the file Utilities.h add entry. Again, within the '#if MCU_VARIANT == MCU_ESP32'.
|
||||
|
||||
@@ -245,4 +231,4 @@ This will end with error 'This device has not been provisioned yet, cannot set f
|
||||
When the rnode is flashed, it is signed with a key. If you conect the rnode to another system, this key cannot be validated. It is possible to write a new key to the rnode by erasing the eeprom and writing the local key to it.
|
||||
|
||||
$ rnodeconf /dev/ttyACM0 --eeprom-wipe
|
||||
$ rnodeconf /dev/ttyACM0 -r --platform ESP32 --model a9 --product f0 --hwrev 3
|
||||
$ rnodeconf /dev/ttyACM0 -r --platform ESP32 --model a4 --product f0 --hwrev 3
|
||||
|
Reference in New Issue
Block a user