mirror of
https://github.com/liberatedsystems/RNode_Firmware_CE.git
synced 2024-12-25 07:29:25 -05:00
Initial commit
This commit is contained in:
parent
60c7cde74d
commit
221eeeb628
15
Config.h
15
Config.h
@ -35,6 +35,7 @@
|
||||
#define BOARD_GENERIC_ESP32 0x35
|
||||
#define BOARD_LORA32_V2_0 0x36
|
||||
#define BOARD_LORA32_V2_1 0x37
|
||||
#define BOARD_LORA32_V1_0 0x38
|
||||
#define BOARD_HELTEC32_V2 0x38
|
||||
#define BOARD_RNODE_NG_20 0x40
|
||||
#define BOARD_RNODE_NG_21 0x41
|
||||
@ -156,6 +157,20 @@
|
||||
const int pin_led_rx = 14;
|
||||
const int pin_led_tx = 32;
|
||||
#define HAS_BLUETOOTH true
|
||||
#define HAS_CONSOLE true
|
||||
#elif BOARD_MODEL == BOARD_LORA32_V1_0
|
||||
const int pin_cs = 18;
|
||||
const int pin_reset = 12;
|
||||
const int pin_dio = 26;
|
||||
#if defined(EXTERNAL_LEDS)
|
||||
const int pin_led_rx = 25;
|
||||
const int pin_led_tx = 2;
|
||||
#else
|
||||
const int pin_led_rx = 2;
|
||||
const int pin_led_tx = 2;
|
||||
#endif
|
||||
#define HAS_DISPLAY true
|
||||
#define HAS_BLUETOOTH true
|
||||
#define HAS_CONSOLE true
|
||||
#elif BOARD_MODEL == BOARD_LORA32_V2_0
|
||||
const int pin_cs = 18;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#define DISP_RST 13
|
||||
#define DISP_ADDR 0x3D
|
||||
// #define DISP_ADDR 0x3C
|
||||
#elif BOARD_MODEL == BOARD_HELTEC32_V2
|
||||
#elif BOARD_MODEL == BOARD_HELTEC32_V2 || BOARD_MODEL == BOARD_LORA32_V1_0
|
||||
#define DISP_RST 16
|
||||
#define DISP_ADDR 0x3C
|
||||
#define SCL_OLED 15
|
||||
@ -87,7 +87,7 @@ void set_contrast(Adafruit_SSD1306 *display, uint8_t contrast) {
|
||||
|
||||
bool display_init() {
|
||||
#if HAS_DISPLAY
|
||||
#if BOARD_MODEL == BOARD_RNODE_NG_20 || BOARD_MODEL == BOARD_LORA32_V2_0
|
||||
#if BOARD_MODEL == BOARD_RNODE_NG_20 || BOARD_MODEL == BOARD_LORA32_V2_0 || BOARD_LORA32_V1_0
|
||||
int pin_display_en = 16;
|
||||
digitalWrite(pin_display_en, LOW);
|
||||
delay(50);
|
||||
|
33
Makefile
33
Makefile
@ -58,6 +58,12 @@ firmware-mega2560:
|
||||
firmware-tbeam:
|
||||
arduino-cli compile --fqbn esp32:esp32:t-beam -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x33\""
|
||||
|
||||
firmware-lora32_v10:
|
||||
arduino-cli compile --fqbn esp32:esp32:ttgo-lora32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x38\""
|
||||
|
||||
firmware-lora32_v10_extled:
|
||||
arduino-cli compile --fqbn esp32:esp32:ttgo-lora32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x38\" \"-DEXTERNAL_LEDS=true\""
|
||||
|
||||
firmware-lora32_v20:
|
||||
arduino-cli compile --fqbn esp32:esp32:ttgo-lora32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x36\" \"-DEXTERNAL_LEDS=true\""
|
||||
|
||||
@ -99,6 +105,13 @@ upload-tbeam:
|
||||
@sleep 3
|
||||
python ./Release/esptool/esptool.py --chip esp32 --port /dev/ttyUSB1 --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
|
||||
|
||||
upload-lora32_v10:
|
||||
arduino-cli upload -p /dev/ttyUSB0 --fqbn esp32:esp32:ttgo-lora32
|
||||
@sleep 1
|
||||
rnodeconf /dev/ttyUSB0 --firmware-hash $$(./partition_hashes ./build/esp32.esp32.ttgo-lora32/RNode_Firmware.ino.bin)
|
||||
@sleep 3
|
||||
python ./Release/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --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
|
||||
|
||||
upload-lora32_v20:
|
||||
arduino-cli upload -p /dev/ttyUSB1 --fqbn esp32:esp32:ttgo-lora32
|
||||
@sleep 1
|
||||
@ -144,7 +157,7 @@ upload-featheresp32:
|
||||
|
||||
release: release-all
|
||||
|
||||
release-all: console-site spiffs-image release-rnode release-mega2560 release-tbeam release-lora32_v20 release-lora32_v21 release-lora32_v20_extled release-lora32_v21_extled release-featheresp32 release-genericesp32 release-heltec32_v2 release-heltec32_v2_extled release-rnode_ng_20 release-rnode_ng_21 release-hashes
|
||||
release-all: console-site spiffs-image release-rnode release-mega2560 release-tbeam release-lora32_v10 release-lora32_v20 release-lora32_v21 release-lora32_v10_extled release-lora32_v20_extled release-lora32_v21_extled release-featheresp32 release-genericesp32 release-heltec32_v2 release-heltec32_v2_extled release-rnode_ng_20 release-rnode_ng_21 release-hashes
|
||||
|
||||
release-hashes:
|
||||
python ./release_hashes.py > ./Release/release.json
|
||||
@ -163,6 +176,15 @@ release-tbeam:
|
||||
zip --junk-paths ./Release/rnode_firmware_tbeam.zip ./Release/esptool/esptool.py ./Release/console_image.bin build/rnode_firmware_tbeam.boot_app0 build/rnode_firmware_tbeam.bin build/rnode_firmware_tbeam.bootloader build/rnode_firmware_tbeam.partitions
|
||||
rm -r build
|
||||
|
||||
release-lora32_v10:
|
||||
arduino-cli compile --fqbn esp32:esp32:ttgo-lora32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x38\""
|
||||
cp ~/.arduino15/packages/esp32/hardware/esp32/2.0.?/tools/partitions/boot_app0.bin build/rnode_firmware_lora32v10.boot_app0
|
||||
cp build/esp32.esp32.ttgo-lora32/RNode_Firmware.ino.bin build/rnode_firmware_lora32v10.bin
|
||||
cp build/esp32.esp32.ttgo-lora32/RNode_Firmware.ino.bootloader.bin build/rnode_firmware_lora32v10.bootloader
|
||||
cp build/esp32.esp32.ttgo-lora32/RNode_Firmware.ino.partitions.bin build/rnode_firmware_lora32v10.partitions
|
||||
zip --junk-paths ./Release/rnode_firmware_lora32v10.zip ./Release/esptool/esptool.py ./Release/console_image.bin build/rnode_firmware_lora32v10.boot_app0 build/rnode_firmware_lora32v10.bin build/rnode_firmware_lora32v10.bootloader build/rnode_firmware_lora32v10.partitions
|
||||
rm -r build
|
||||
|
||||
release-lora32_v20:
|
||||
arduino-cli compile --fqbn esp32:esp32:ttgo-lora32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x36\""
|
||||
cp ~/.arduino15/packages/esp32/hardware/esp32/2.0.?/tools/partitions/boot_app0.bin build/rnode_firmware_lora32v20.boot_app0
|
||||
@ -181,6 +203,15 @@ release-lora32_v21:
|
||||
zip --junk-paths ./Release/rnode_firmware_lora32v21.zip ./Release/esptool/esptool.py ./Release/console_image.bin build/rnode_firmware_lora32v21.boot_app0 build/rnode_firmware_lora32v21.bin build/rnode_firmware_lora32v21.bootloader build/rnode_firmware_lora32v21.partitions
|
||||
rm -r build
|
||||
|
||||
release-lora32_v10_extled:
|
||||
arduino-cli compile --fqbn esp32:esp32:ttgo-lora32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x38\" \"-DEXTERNAL_LEDS=true\""
|
||||
cp ~/.arduino15/packages/esp32/hardware/esp32/2.0.?/tools/partitions/boot_app0.bin build/rnode_firmware_lora32v10.boot_app0
|
||||
cp build/esp32.esp32.ttgo-lora32/RNode_Firmware.ino.bin build/rnode_firmware_lora32v10.bin
|
||||
cp build/esp32.esp32.ttgo-lora32/RNode_Firmware.ino.bootloader.bin build/rnode_firmware_lora32v10.bootloader
|
||||
cp build/esp32.esp32.ttgo-lora32/RNode_Firmware.ino.partitions.bin build/rnode_firmware_lora32v10.partitions
|
||||
zip --junk-paths ./Release/rnode_firmware_lora32v10.zip ./Release/esptool/esptool.py ./Release/console_image.bin build/rnode_firmware_lora32v10.boot_app0 build/rnode_firmware_lora32v10.bin build/rnode_firmware_lora32v10.bootloader build/rnode_firmware_lora32v10.partitions
|
||||
rm -r build
|
||||
|
||||
release-lora32_v20_extled:
|
||||
arduino-cli compile --fqbn esp32:esp32:ttgo-lora32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x36\" \"-DEXTERNAL_LEDS=true\""
|
||||
cp ~/.arduino15/packages/esp32/hardware/esp32/2.0.?/tools/partitions/boot_app0.bin build/rnode_firmware_lora32v20.boot_app0
|
||||
|
@ -67,6 +67,7 @@ The RNode Firmware supports the following boards:
|
||||
- Handheld v2.x RNodes from [unsigned.io](https://unsigned.io/shop/product/handheld-rnode)
|
||||
- Original v1.x RNodes from [unsigned.io](https://unsigned.io/shop/product/rnode)
|
||||
- LilyGO T-Beam v1.1 devices
|
||||
- LilyGO LoRa32 v1.0 devices
|
||||
- LilyGO LoRa32 v2.0 devices
|
||||
- LilyGO LoRa32 v2.1 devices
|
||||
- Heltec LoRa32 v2 devices
|
||||
|
12
Utilities.h
12
Utilities.h
@ -123,6 +123,18 @@ uint8_t boot_vector = 0x00;
|
||||
void led_rx_off() { digitalWrite(pin_led_rx, LOW); }
|
||||
void led_tx_on() { digitalWrite(pin_led_tx, LOW); }
|
||||
void led_tx_off() { digitalWrite(pin_led_tx, HIGH); }
|
||||
#elif BOARD_MODEL == BOARD_LORA32_V1_0
|
||||
#if defined(EXTERNAL_LEDS)
|
||||
void led_rx_on() { digitalWrite(pin_led_rx, HIGH); }
|
||||
void led_rx_off() { digitalWrite(pin_led_rx, LOW); }
|
||||
void led_tx_on() { digitalWrite(pin_led_tx, HIGH); }
|
||||
void led_tx_off() { digitalWrite(pin_led_tx, LOW); }
|
||||
#else
|
||||
void led_rx_on() { digitalWrite(pin_led_rx, HIGH); }
|
||||
void led_rx_off() { digitalWrite(pin_led_rx, LOW); }
|
||||
void led_tx_on() { digitalWrite(pin_led_tx, HIGH); }
|
||||
void led_tx_off() { digitalWrite(pin_led_tx, LOW); }
|
||||
#endif
|
||||
#elif BOARD_MODEL == BOARD_LORA32_V2_0
|
||||
#if defined(EXTERNAL_LEDS)
|
||||
void led_rx_on() { digitalWrite(pin_led_rx, HIGH); }
|
||||
|
Loading…
Reference in New Issue
Block a user