mirror of
https://github.com/okalachev/flix.git
synced 2026-09-06 00:10:58 +00:00
Always use usb cdc by default on s3/c3
This commit is contained in:
@@ -21,13 +21,13 @@ jobs:
|
|||||||
- name: Build firmware for ESP32-C3
|
- name: Build firmware for ESP32-C3
|
||||||
run: make BOARD=esp32:esp32:esp32c3
|
run: make BOARD=esp32:esp32:esp32c3
|
||||||
- name: Build firmware for ESP32-S3
|
- name: Build firmware for ESP32-S3
|
||||||
run: make BOARD=esp32:esp32:esp32s3:CDCOnBoot=cdc
|
run: make BOARD=esp32:esp32:esp32s3
|
||||||
- name: Build firmware for ESP32-S3 with QSPI PSRAM
|
- name: Build firmware for ESP32-S3 with QSPI PSRAM
|
||||||
run: make BOARD=esp32:esp32:esp32s3:CDCOnBoot=cdc,PSRAM=enabled EXTRA=--output-dir=flix/build/esp32.esp32.esp32s3.qspi
|
run: make BOARD=esp32:esp32:esp32s3:PSRAM=enabled EXTRA=--output-dir=flix/build/esp32.esp32.esp32s3.qspi
|
||||||
- name: Build firmware for ESP32-S3 with OPI PSRAM
|
- name: Build firmware for ESP32-S3 with OPI PSRAM
|
||||||
run: make BOARD=esp32:esp32:esp32s3:CDCOnBoot=cdc,PSRAM=opi EXTRA=--output-dir=flix/build/esp32.esp32.esp32s3.opi
|
run: make BOARD=esp32:esp32:esp32s3:PSRAM=opi EXTRA=--output-dir=flix/build/esp32.esp32.esp32s3.opi
|
||||||
- name: Build firmware for Flix2
|
- name: Build firmware for Flix2
|
||||||
run: make BOARD=esp32:esp32:esp32s3:FlashSize=4M,CDCOnBoot=cdc,PSRAM=opi FLAGS=-DFLIX2 EXTRA=--output-dir=flix/build/esp32.esp32.flix2
|
run: make BOARD=esp32:esp32:esp32s3:PSRAM=opi FLAGS=-DFLIX2 EXTRA=--output-dir=flix/build/esp32.esp32.flix2
|
||||||
- name: Upload binaries
|
- name: Upload binaries
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
|
|||||||
+2
-2
@@ -54,7 +54,7 @@ Beginners can [download the sources as a ZIP archive](https://github.com/okalach
|
|||||||
* `MAVLink`, version 2.0.25.
|
* `MAVLink`, version 2.0.25.
|
||||||
5. Open the `flix/flix.ino` sketch from downloaded firmware sources in Arduino IDE.
|
5. Open the `flix/flix.ino` sketch from downloaded firmware sources in Arduino IDE.
|
||||||
6. Connect your ESP32 board to the computer and choose correct board type in Arduino IDE (*WEMOS D1 MINI ESP32* for ESP32 Mini, *ESP32S3 Dev Module* for ESP32-S3 Super Mini) and the port.
|
6. Connect your ESP32 board to the computer and choose correct board type in Arduino IDE (*WEMOS D1 MINI ESP32* for ESP32 Mini, *ESP32S3 Dev Module* for ESP32-S3 Super Mini) and the port.
|
||||||
7. Set *Tools* ⇒ *Core Debug Level* to *Error* to see the errors in the serial console. Set *Tools* ⇒ *USB CDC on Boot* to *Enabled* for ESP32-S3/ESP32-C3 boards.
|
7. Set *Tools* ⇒ *Core Debug Level* to *Error* to see the errors in the serial console.
|
||||||
8. [Build and upload](https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-uploading-a-sketch) the firmware using Arduino IDE.
|
8. [Build and upload](https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-uploading-a-sketch) the firmware using Arduino IDE.
|
||||||
|
|
||||||
#### Command line (Windows, Linux, macOS)
|
#### Command line (Windows, Linux, macOS)
|
||||||
@@ -89,7 +89,7 @@ Beginners can [download the sources as a ZIP archive](https://github.com/okalach
|
|||||||
For ESP32-S3/ESP32-C3 boards, set the appropriate [FQBN](https://docs.arduino.cc/arduino-cli/FAQ/#whats-the-fqbn-string) using `BOARD` parameter:
|
For ESP32-S3/ESP32-C3 boards, set the appropriate [FQBN](https://docs.arduino.cc/arduino-cli/FAQ/#whats-the-fqbn-string) using `BOARD` parameter:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make BOARD=esp32:esp32:esp32s3:FlashSize=4M,CDCOnBoot=cdc upload
|
make BOARD=esp32:esp32:esp32s3 upload
|
||||||
```
|
```
|
||||||
|
|
||||||
See other available Make commands in [Makefile](../Makefile).
|
See other available Make commands in [Makefile](../Makefile).
|
||||||
|
|||||||
@@ -62,6 +62,19 @@ const char* motd =
|
|||||||
"reset - reset drone's state\n"
|
"reset - reset drone's state\n"
|
||||||
"reboot - reboot the drone\n";
|
"reboot - reboot the drone\n";
|
||||||
|
|
||||||
|
// Always redirect Serial to USB on ESP32-S3/ESP32-C3
|
||||||
|
#if SOC_USB_SERIAL_JTAG_SUPPORTED && ARDUINO_USB_MODE
|
||||||
|
#if !ARDUINO_USB_CDC_ON_BOOT
|
||||||
|
HWCDC HWCDCSerial;
|
||||||
|
#endif
|
||||||
|
#undef Serial
|
||||||
|
#define Serial HWCDCSerial
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void setupConsole() {
|
||||||
|
Serial.begin(115200);
|
||||||
|
}
|
||||||
|
|
||||||
void print(const char* format, ...) {
|
void print(const char* format, ...) {
|
||||||
char buf[3000];
|
char buf[3000];
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ extern bool landed;
|
|||||||
extern float motors[4];
|
extern float motors[4];
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
setupConsole();
|
||||||
print("Initializing Flix\n");
|
print("Initializing Flix\n");
|
||||||
setupParameters();
|
setupParameters();
|
||||||
setupPower();
|
setupPower();
|
||||||
|
|||||||
Reference in New Issue
Block a user