IDF add some defaults and allow Arduino to run in single-core mode

This commit is contained in:
me-no-dev 2017-02-28 23:36:05 +02:00
parent bcd6dcf5f6
commit 5f2b00228c
2 changed files with 12 additions and 1 deletions

View File

@ -3,6 +3,11 @@ menu "Arduino Configuration"
config ENABLE_ARDUINO_DEPENDS config ENABLE_ARDUINO_DEPENDS
bool bool
select LWIP_SO_RCVBUF select LWIP_SO_RCVBUF
select BT_ENABLED
select ETHERNET
select WIFI_ENABLED
select ESP32_PHY_CALIBRATION_AND_DATA_STORAGE
select MEMMAP_SMP
default "y" default "y"
config AUTOSTART_ARDUINO config AUTOSTART_ARDUINO

View File

@ -4,6 +4,12 @@
#if CONFIG_AUTOSTART_ARDUINO #if CONFIG_AUTOSTART_ARDUINO
#if CONFIG_FREERTOS_UNICORE
#define ARDUINO_RUNNING_CORE 0
#else
#define ARDUINO_RUNNING_CORE 1
#endif
void loopTask(void *pvParameters) void loopTask(void *pvParameters)
{ {
setup(); setup();
@ -15,7 +21,7 @@ void loopTask(void *pvParameters)
extern "C" void app_main() extern "C" void app_main()
{ {
initArduino(); initArduino();
xTaskCreatePinnedToCore(loopTask, "loopTask", 4096, NULL, 1, NULL, 1); xTaskCreatePinnedToCore(loopTask, "loopTask", 4096, NULL, 1, NULL, ARDUINO_RUNNING_CORE);
} }
#endif #endif