From 1d7753feac590365aab8ad68665fd1b29e77d03d Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Tue, 1 Nov 2022 21:51:19 +0100 Subject: [PATCH 1/3] fix m5fire.h RGB_LED_COUNT build error --- src/hal/m5fire.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hal/m5fire.h b/src/hal/m5fire.h index 81f35454..1536f137 100644 --- a/src/hal/m5fire.h +++ b/src/hal/m5fire.h @@ -31,9 +31,7 @@ #define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature #define HAS_LED NOT_A_PIN // no on board LED (?) -#define RGB_LED_COUNT 10 - -#define RGB_LED_COUNT 1 // we have 1 LED +#define RGB_LED_COUNT 10 // M5fire has a stripe of 10 RGB Pixels #define HAS_RGB_LED FastLED.addLeds(leds, RGB_LED_COUNT); #define HAS_BUTTON (39) // on board button A From 977d482676d047e50d6c3e89baab1aa6c6f5c713 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Wed, 2 Nov 2022 11:04:18 +0100 Subject: [PATCH 2/3] m5fire.h: workaround for IRAM0 shortage --- src/hal/m5fire.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hal/m5fire.h b/src/hal/m5fire.h index 1536f137..60135498 100644 --- a/src/hal/m5fire.h +++ b/src/hal/m5fire.h @@ -10,7 +10,7 @@ #include -#define HAS_LORA 1 // comment out if device shall not send data via LoRa or has no M5 RA01 LoRa module +//#define HAS_LORA 1 // comment out if device shall not send data via LoRa or has no M5 RA01 LoRa module #define LORA_SCK SCK #define LORA_CS SS #define LORA_MISO MISO @@ -21,7 +21,7 @@ #define LORA_IO2 LMIC_UNUSED_PIN // enable only if you want to store a local paxcount table on the device -#define HAS_SDCARD 1 // this board has an SD-card-reader/writer +//#define HAS_SDCARD 1 // this board has an SD-card-reader/writer #define SDCARD_CS GPIO_NUM_4 #define SDCARD_MOSI MOSI #define SDCARD_MISO MISO @@ -32,8 +32,8 @@ #define HAS_LED NOT_A_PIN // no on board LED (?) #define RGB_LED_COUNT 10 // M5fire has a stripe of 10 RGB Pixels -#define HAS_RGB_LED FastLED.addLeds(leds, RGB_LED_COUNT); -#define HAS_BUTTON (39) // on board button A +//#define HAS_RGB_LED FastLED.addLeds(leds, RGB_LED_COUNT); +//#define HAS_BUTTON (39) // on board button A // power management settings #define HAS_IP5306 1 // has IP5306 chip @@ -48,7 +48,7 @@ //#define GPS_INT GPIO_NUM_36 // 30ns accurary timepulse, to be external wired on pcb: shorten R12! // Display Settings -#define HAS_DISPLAY 2 // TFT-LCD +//#define HAS_DISPLAY 2 // TFT-LCD //#define MY_DISPLAY_FLIP 1 // use if display is rotated #define MY_DISPLAY_WIDTH 320 #define MY_DISPLAY_HEIGHT 240 From 7eeb760c137e398b21cc45b2a36d9875e3e076a7 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Wed, 2 Nov 2022 13:15:15 +0100 Subject: [PATCH 3/3] workarounds to prevent IRAM0 shortage --- .github/workflows/build.yml | 1 + src/hal/generic.h | 2 +- src/hal/m5fire.h | 13 +++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02fcccaa..7551c2fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,7 @@ jobs: # platformio-path: ~\AppData\Local\platformio\Cache board: [ + generic.h, ebox.h, eboxtube.h, ecopower.h, diff --git a/src/hal/generic.h b/src/hal/generic.h index ef691330..c753ba8d 100644 --- a/src/hal/generic.h +++ b/src/hal/generic.h @@ -62,7 +62,7 @@ #define CFG_sx1276_radio 1 // select LoRa chip //#define CFG_sx1272_radio 1 // select LoRa chip -#define BOARD_HAS_PSRAM // use if board has external PSRAM +//#define BOARD_HAS_PSRAM // use if board has external SPIRAM, note: this will reduce IRAM0 by 64KB for SPIRAM cache #define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature #define HAS_DISPLAY 1 diff --git a/src/hal/m5fire.h b/src/hal/m5fire.h index 60135498..c4e25e1d 100644 --- a/src/hal/m5fire.h +++ b/src/hal/m5fire.h @@ -1,6 +1,7 @@ // clang-format off // upload_speed 921600 -// board m5stack-fire +// board m5stack-core-esp32 +// b0ard m5stack-fire -> does not compile due to IRAM0 shortage, because 64KB of 192KB used for caching external SPIRAM // note use of GPIO16/17 // https://www.bjoerns-techblog.de/2019/03/m5stack-fire-eine-uebersicht/ @@ -10,7 +11,7 @@ #include -//#define HAS_LORA 1 // comment out if device shall not send data via LoRa or has no M5 RA01 LoRa module +#define HAS_LORA 1 // comment out if device shall not send data via LoRa or has no M5 RA01 LoRa module #define LORA_SCK SCK #define LORA_CS SS #define LORA_MISO MISO @@ -21,7 +22,7 @@ #define LORA_IO2 LMIC_UNUSED_PIN // enable only if you want to store a local paxcount table on the device -//#define HAS_SDCARD 1 // this board has an SD-card-reader/writer +#define HAS_SDCARD 1 // this board has an SD-card-reader/writer #define SDCARD_CS GPIO_NUM_4 #define SDCARD_MOSI MOSI #define SDCARD_MISO MISO @@ -32,8 +33,8 @@ #define HAS_LED NOT_A_PIN // no on board LED (?) #define RGB_LED_COUNT 10 // M5fire has a stripe of 10 RGB Pixels -//#define HAS_RGB_LED FastLED.addLeds(leds, RGB_LED_COUNT); -//#define HAS_BUTTON (39) // on board button A +#define HAS_RGB_LED FastLED.addLeds(leds, RGB_LED_COUNT); +#define HAS_BUTTON (39) // on board button A // power management settings #define HAS_IP5306 1 // has IP5306 chip @@ -48,7 +49,7 @@ //#define GPS_INT GPIO_NUM_36 // 30ns accurary timepulse, to be external wired on pcb: shorten R12! // Display Settings -//#define HAS_DISPLAY 2 // TFT-LCD +#define HAS_DISPLAY 2 // TFT-LCD //#define MY_DISPLAY_FLIP 1 // use if display is rotated #define MY_DISPLAY_WIDTH 320 #define MY_DISPLAY_HEIGHT 240