Skip to content

Commit 5f2b002

Browse files
committed
IDF add some defaults and allow Arduino to run in single-core mode
1 parent bcd6dcf commit 5f2b002

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Diff for: Kconfig

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ menu "Arduino Configuration"
33
config ENABLE_ARDUINO_DEPENDS
44
bool
55
select LWIP_SO_RCVBUF
6+
select BT_ENABLED
7+
select ETHERNET
8+
select WIFI_ENABLED
9+
select ESP32_PHY_CALIBRATION_AND_DATA_STORAGE
10+
select MEMMAP_SMP
611
default "y"
712

813
config AUTOSTART_ARDUINO

Diff for: cores/esp32/main.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
#if CONFIG_AUTOSTART_ARDUINO
66

7+
#if CONFIG_FREERTOS_UNICORE
8+
#define ARDUINO_RUNNING_CORE 0
9+
#else
10+
#define ARDUINO_RUNNING_CORE 1
11+
#endif
12+
713
void loopTask(void *pvParameters)
814
{
915
setup();
@@ -15,7 +21,7 @@ void loopTask(void *pvParameters)
1521
extern "C" void app_main()
1622
{
1723
initArduino();
18-
xTaskCreatePinnedToCore(loopTask, "loopTask", 4096, NULL, 1, NULL, 1);
24+
xTaskCreatePinnedToCore(loopTask, "loopTask", 4096, NULL, 1, NULL, ARDUINO_RUNNING_CORE);
1925
}
2026

2127
#endif

0 commit comments

Comments
 (0)