First try with esp-idf framework
This commit is contained in:
parent
94c2a7e43b
commit
497f8464ad
@ -13,7 +13,7 @@ data_dir = data/build
|
|||||||
|
|
||||||
[env]
|
[env]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
framework = arduino
|
framework = arduino, espidf
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
monitor_filters = esp32_exception_decoder, colorize
|
monitor_filters = esp32_exception_decoder, colorize
|
||||||
@ -22,7 +22,7 @@ build_flags = !python scripts/git_rev.py
|
|||||||
|
|
||||||
[esp32wemos-s3-mini_BW_base]
|
[esp32wemos-s3-mini_BW_base]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
framework = arduino
|
framework = arduino, espidf
|
||||||
board = lolin_s3_mini
|
board = lolin_s3_mini
|
||||||
board_build.partitions = partition.csv
|
board_build.partitions = partition.csv
|
||||||
lib_deps =
|
lib_deps =
|
||||||
@ -37,7 +37,7 @@ build_flags =
|
|||||||
-DLAST_BUILD_TIME=$UNIX_TIME
|
-DLAST_BUILD_TIME=$UNIX_TIME
|
||||||
-D IS_S3
|
-D IS_S3
|
||||||
-D IS_BW
|
-D IS_BW
|
||||||
# -D CONFIG_FREERTOS_USE_TRACE_FACILITY
|
-D CONFIG_FREERTOS_USE_TRACE_FACILITY
|
||||||
-D WITH_RGB_LED
|
-D WITH_RGB_LED
|
||||||
-D NEOPIXEL_COUNT=4
|
-D NEOPIXEL_COUNT=4
|
||||||
-DASYNCWEBSERVER_REGEX
|
-DASYNCWEBSERVER_REGEX
|
||||||
@ -47,7 +47,9 @@ build_flags =
|
|||||||
-mfix-esp32-psram-cache-issue
|
-mfix-esp32-psram-cache-issue
|
||||||
-fexceptions
|
-fexceptions
|
||||||
-DPIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS
|
-DPIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS
|
||||||
build_unflags = -fno-exceptions
|
build_unflags =
|
||||||
|
-fno-exceptions
|
||||||
|
-Werror=all
|
||||||
|
|
||||||
zinggjm/GxEPD2@^1.5.2
|
zinggjm/GxEPD2@^1.5.2
|
||||||
|
|
||||||
|
1525
sdkconfig.default
Normal file
1525
sdkconfig.default
Normal file
File diff suppressed because it is too large
Load Diff
21
sdkconfig.defaults
Normal file
21
sdkconfig.defaults
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
CONFIG_AUTOSTART_ARDUINO=y
|
||||||
|
# CONFIG_WS2812_LED_ENABLE is not set
|
||||||
|
CONFIG_FREERTOS_HZ=1000
|
||||||
|
CONFIG_FREERTOS_USE_TRACE_FACILITY=y
|
||||||
|
CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y
|
||||||
|
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y
|
||||||
|
|
||||||
|
CONFIG_MBEDTLS_PSK_MODES=y
|
||||||
|
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
|
||||||
|
|
||||||
|
CONFIG_BOOTLOADER_LOG_LEVEL=0
|
||||||
|
CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y
|
||||||
|
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
|
||||||
|
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
|
||||||
|
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
|
||||||
|
CONFIG_LOG_DEFAULT_LEVEL=0
|
||||||
|
CONFIG_LOG_MAXIMUM_LEVEL=0
|
||||||
|
CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y
|
||||||
|
CONFIG_LOG_BOOTLOADER_LEVEL=0
|
||||||
|
|
||||||
|
CONFIG_HEAP_CORRUPTION_DETECTION=CONFIG_HEAP_POISONING_LIGHT
|
@ -60,8 +60,25 @@ void setupComponents()
|
|||||||
pixels.show();
|
pixels.show();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// delay(3000);
|
// delay(6000);
|
||||||
// Serial.println(F("Leds should be on"));
|
// Serial.println(F("I2C Master"));
|
||||||
|
|
||||||
|
// int i2c_master_port = 0;
|
||||||
|
// i2c_config_t conf = {
|
||||||
|
// .mode = I2C_MODE_MASTER,
|
||||||
|
// .sda_io_num = 35, // select SDA GPIO specific to your project
|
||||||
|
// .scl_io_num = 36, // select SCL GPIO specific to your project
|
||||||
|
// .sda_pullup_en = GPIO_PULLUP_ENABLE,
|
||||||
|
// .scl_pullup_en = GPIO_PULLUP_ENABLE,
|
||||||
|
// .master = {
|
||||||
|
// .clk_speed = 400000,
|
||||||
|
// }, // select frequency specific to your project
|
||||||
|
// .clk_flags = 0, // optional; you can use I2C_SCLK_SRC_FLAG_* flags to choose i2c source clock here
|
||||||
|
// };
|
||||||
|
|
||||||
|
// i2c_param_config(i2c_master_port, &conf);
|
||||||
|
// ESP_ERROR_CHECK(i2c_driver_install(i2c_master_port, conf.mode, 0, 0, 0));
|
||||||
|
Wire.begin(35, 36);
|
||||||
|
|
||||||
#ifndef NO_MCP
|
#ifndef NO_MCP
|
||||||
if (!mcp.begin_I2C(0x20))
|
if (!mcp.begin_I2C(0x20))
|
||||||
@ -72,8 +89,8 @@ void setupComponents()
|
|||||||
pixels.setPixelColor(2, pixels.Color(255, 0, 0));
|
pixels.setPixelColor(2, pixels.Color(255, 0, 0));
|
||||||
pixels.setPixelColor(3, pixels.Color(255, 0, 0));
|
pixels.setPixelColor(3, pixels.Color(255, 0, 0));
|
||||||
pixels.show();
|
pixels.show();
|
||||||
while (1)
|
// while (1)
|
||||||
;
|
// ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -222,8 +239,8 @@ void handleScreenTasks(uint screen)
|
|||||||
vTaskSuspend(blockNotifyTaskHandle);
|
vTaskSuspend(blockNotifyTaskHandle);
|
||||||
if (getPriceTaskHandle)
|
if (getPriceTaskHandle)
|
||||||
vTaskSuspend(getPriceTaskHandle);
|
vTaskSuspend(getPriceTaskHandle);
|
||||||
if (minuteTaskHandle)
|
// if (minuteTaskHandle)
|
||||||
vTaskSuspend(minuteTaskHandle);
|
// vTaskSuspend(minuteTaskHandle);
|
||||||
switch (currentScreen)
|
switch (currentScreen)
|
||||||
{
|
{
|
||||||
case SCREEN_BLOCK_HEIGHT:
|
case SCREEN_BLOCK_HEIGHT:
|
||||||
@ -376,18 +393,23 @@ void showNetworkSettings()
|
|||||||
String ipAddr = WiFi.localIP().toString();
|
String ipAddr = WiFi.localIP().toString();
|
||||||
String subNet = WiFi.subnetMask().toString();
|
String subNet = WiFi.subnetMask().toString();
|
||||||
|
|
||||||
epdContent[1] = "IP/Subnet";
|
epdContent[0] = "IP/Subnet";
|
||||||
|
|
||||||
int ipAddrPos = 0;
|
int ipAddrPos = 0;
|
||||||
int subnetPos = 0;
|
int subnetPos = 0;
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
epdContent[2 + i] = ipAddr.substring(0, ipAddr.indexOf('.')) + "/" + subNet.substring(0, subNet.indexOf('.'));
|
epdContent[1 + i] = ipAddr.substring(0, ipAddr.indexOf('.')) + "/" + subNet.substring(0, subNet.indexOf('.'));
|
||||||
ipAddrPos = ipAddr.indexOf('.') + 1;
|
ipAddrPos = ipAddr.indexOf('.') + 1;
|
||||||
subnetPos = subNet.indexOf('.') + 1;
|
subnetPos = subNet.indexOf('.') + 1;
|
||||||
ipAddr = ipAddr.substring(ipAddrPos);
|
ipAddr = ipAddr.substring(ipAddrPos);
|
||||||
subNet = subNet.substring(subnetPos);
|
subNet = subNet.substring(subnetPos);
|
||||||
}
|
}
|
||||||
|
epdContent[NUM_SCREENS-2] = "RAM/Status";
|
||||||
|
|
||||||
|
// char buf[32];
|
||||||
|
// snprintf(buf, sizeof(buf), "%s/%s", round(ESP.getFreeHeap()/1000), );
|
||||||
|
epdContent[NUM_SCREENS-1] = String((int)round(ESP.getFreeHeap()/1000)) + "/" + (int)round(ESP.getHeapSize()/1000);
|
||||||
|
|
||||||
CustomTextScreen::setText(epdContent);
|
CustomTextScreen::setText(epdContent);
|
||||||
|
|
||||||
|
@ -87,4 +87,5 @@ void setup()
|
|||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user