Browse Source

support ESP32C3 dev board

Andrew Tridgell 3 years ago
parent
commit
f49069a52b
4 changed files with 25 additions and 7 deletions
  1. 1 1
      .github/workflows/test_build.yml
  2. 9 1
      README.md
  3. 4 1
      RemoteIDModule/Makefile
  4. 11 4
      RemoteIDModule/board_config.h

+ 1 - 1
.github/workflows/test_build.yml

@@ -33,7 +33,7 @@ jobs:
         id: check_files
         uses: andstor/file-existence-action@v1
         with:
-          files: "RemoteIDModule/ArduRemoteID-ESP32S3_DEV.bin, RemoteIDModule/ArduRemoteID-BLUEMARK_DB200.bin, RemoteIDModule/ArduRemoteID-BLUEMARK_DB110.bin"
+          files: RemoteIDModule/ArduRemoteID-*.bin
           allow_failure: true
 
       - name: Archive build

+ 9 - 1
README.md

@@ -8,9 +8,10 @@ ASTM F3586-22 Means of Compliance.
 ## Hardware Supported
 
 The firmware cuttently supports the ESP32-S3 and ESP32-C3 chips. There
-are 3 boards supported so far with more to come:
+are 4 boards supported so far with more to come:
 
  - the ESP32-S3 dev board: https://au.mouser.com/ProductDetail/356-ESP32S3DEVKTM1N8
+ - the ESP32-C3 dev board: https://au.mouser.com/ProductDetail/Espressif-Systems/ESP32-C3-DevKitM-1
  - a Bluemark BD110 from https://bluemark.io/
  - a Bluemark BD200 from https://bluemark.io/
 
@@ -23,6 +24,13 @@ For the ESP32-S3 dev board the pins assumed in this firmware are:
  - CAN TX on pin 47
  - CAN RX on pin 38
 
+For the ESP32-C3 dev board the pins assumed in this firmware are:
+
+ - UART TX on pin 3
+ - UART RX on pin 2
+ - CAN TX on pin 5
+ - CAN RX on pin 4
+
 For CAN a suitable 1MBit bxCAN transceiver needs to be connected to
 the CAN TX/RX pins.
 

+ 4 - 1
RemoteIDModule/Makefile

@@ -14,11 +14,14 @@ export PATH := $(HOME)/.local/bin:$(PATH)
 
 .PHONY: headers
 
-all: headers esp32s3dev bluemark-db200 bluemark-db110
+all: headers esp32s3dev esp32c3dev bluemark-db200 bluemark-db110
 
 esp32s3dev: CHIP=esp32s3
 esp32s3dev: ArduRemoteID-ESP32S3_DEV.bin
 
+esp32c3dev: CHIP=esp32c3
+esp32c3dev: ArduRemoteID-ESP32C3_DEV.bin
+
 bluemark-db200: CHIP=esp32c3
 bluemark-db200: ArduRemoteID-BLUEMARK_DB200.bin
 

+ 11 - 4
RemoteIDModule/board_config.h

@@ -11,12 +11,19 @@
 #define PIN_UART_TX 18
 #define PIN_UART_RX 17
 
+#elif defined(BOARD_ESP32C3_DEV)
+#define PIN_CAN_TX GPIO_NUM_5
+#define PIN_CAN_RX GPIO_NUM_4
+
+#define PIN_UART_TX 3
+#define PIN_UART_RX 2
+
 #elif defined(BOARD_BLUEMARK_DB200)
-#define PIN_CAN_TX GPIO_NUM_4
-#define PIN_CAN_RX GPIO_NUM_18
+#define PIN_CAN_TX GPIO_NUM_5
+#define PIN_CAN_RX GPIO_NUM_4
 
-#define PIN_UART_TX 15
-#define PIN_UART_RX 16
+#define PIN_UART_TX 3
+#define PIN_UART_RX 2
 
 #elif defined(BOARD_BLUEMARK_DB110)
 #define PIN_UART_TX 5