Working C3 build

This commit is contained in:
2025-12-28 23:27:40 +11:00
parent 95d83b492a
commit 8e5eba47d7
2 changed files with 66 additions and 3 deletions

View File

@@ -26,16 +26,74 @@ platform = espressif32
board = esp32-s3-devkitc-1 board = esp32-s3-devkitc-1
framework = arduino framework = arduino
monitor_speed = 115200 monitor_speed = 115200
monitor_filters = esp32_exception_decoder
build_flags = build_flags =
-DCORE_DEBUG_LEVEL=3 # -DCORE_DEBUG_LEVEL=3
[env:esp32-s3-debug]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
#monitor_speed = 115200
#monitor_filters = esp32_exception_decoder
upload_protocol = esp-builtin
; Debug configuration for GDB
debug_tool = esp-builtin
debug_init_break = tbreak setup
debug_speed = 5000
debug_load_mode = always
; Build flags for debugging
build_flags =
-DCORE_DEBUG_LEVEL=5 ; Maximum ESP32 debug level
-O0 ; Disable optimization for debugging
-g3 ; Maximum debug information
build_type = debug
[env:esp32-c3] [env:esp32-c3]
platform = espressif32 platform = espressif32
framework = arduino
board = esp32-c3-devkitm-1
board_build.mcu = esp32c3
board_build.f_cpu = 160000000L
board_build.flash_mode = dio
board_build.partitions = default.csv
monitor_speed = 115200
monitor_filters = time, default, esp32_exception_decoder
upload_speed = 921600
# NOTE: Need these two ARDUIO_USB modes to work with serial
build_flags =
-Os
-I src
-D ARDUINO_ESP32C3_DEV
-D CONFIG_IDF_TARGET_ESP32C3
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
lib_deps =
elapsedMillis
[env:esp32-c3-debug]
platform = espressif32
board = esp32-c3-devkitc-02 board = esp32-c3-devkitc-02
framework = arduino framework = arduino
monitor_speed = 115200 monitor_speed = 115200
; Upload configuration
upload_protocol = esp-builtin
; Debug configuration for GDB
debug_tool = esp-builtin
debug_init_break = tbreak setup
debug_speed = 5000
debug_load_mode = always
; Build flags for debugging
build_flags = build_flags =
-DCORE_DEBUG_LEVEL=3 -DCORE_DEBUG_LEVEL=5 ; Maximum ESP32 debug level
-O0 ; Disable optimization for debugging
-g3 ; Maximum debug information
build_type = debug
[env:m5stick] [env:m5stick]
platform = espressif32 platform = espressif32

View File

@@ -143,7 +143,7 @@ MyVictronCallback callback;
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
delay(1000); delay(2000);
Serial.println("\n\n================================="); Serial.println("\n\n=================================");
Serial.println("VictronBLE Multi-Device Example"); Serial.println("VictronBLE Multi-Device Example");
@@ -155,12 +155,14 @@ void setup() {
Serial.println(victron.getLastError()); Serial.println(victron.getLastError());
while (1) delay(1000); while (1) delay(1000);
} }
delay(1000);
// Enable debug output (optional) // Enable debug output (optional)
victron.setDebug(true); victron.setDebug(true);
// Set callback for data updates // Set callback for data updates
victron.setCallback(&callback); victron.setCallback(&callback);
delay(1000);
// Add your devices here // Add your devices here
// Replace with your actual MAC addresses and encryption keys // Replace with your actual MAC addresses and encryption keys
@@ -187,6 +189,7 @@ void setup() {
"0ec3adf7433dd61793ff2f3b8ad32ed8", // Encryption key (32 hex chars) "0ec3adf7433dd61793ff2f3b8ad32ed8", // Encryption key (32 hex chars)
DEVICE_TYPE_SOLAR_CHARGER // Device type DEVICE_TYPE_SOLAR_CHARGER // Device type
); );
delay(1000);
/* /*
* *
@@ -237,8 +240,10 @@ void setup() {
DEVICE_TYPE_INVERTER DEVICE_TYPE_INVERTER
); );
delay(1000);
Serial.println("Configured " + String(victron.getDeviceCount()) + " devices"); Serial.println("Configured " + String(victron.getDeviceCount()) + " devices");
Serial.println("\nStarting BLE scan...\n"); Serial.println("\nStarting BLE scan...\n");
delay(1000);
} }
void loop() { void loop() {