From aacfc036cea05658f017ec17d67544c96f12acc6 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Mon, 9 May 2022 19:28:50 +0300 Subject: [PATCH 1/2] Update Kconfig to autoselect the proper cunning core --- Kconfig.projbuild | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Kconfig.projbuild b/Kconfig.projbuild index 0e9c628f138..5ec41063407 100644 --- a/Kconfig.projbuild +++ b/Kconfig.projbuild @@ -21,7 +21,8 @@ config AUTOSTART_ARDUINO choice ARDUINO_RUNNING_CORE bool "Core on which Arduino's setup() and loop() are running" - default ARDUINO_RUN_CORE1 + default ARDUINO_RUN_CORE0 if FREERTOS_UNICORE + default ARDUINO_RUN_CORE1 if !FREERTOS_UNICORE help Select on which core Arduino's setup() and loop() functions run @@ -29,8 +30,10 @@ choice ARDUINO_RUNNING_CORE bool "CORE 0" config ARDUINO_RUN_CORE1 bool "CORE 1" + depends on !FREERTOS_UNICORE config ARDUINO_RUN_NO_AFFINITY bool "BOTH" + depends on !FREERTOS_UNICORE endchoice @@ -48,7 +51,8 @@ config ARDUINO_LOOP_STACK_SIZE choice ARDUINO_EVENT_RUNNING_CORE bool "Core on which Arduino's event handler is running" - default ARDUINO_EVENT_RUN_CORE1 + default ARDUINO_EVENT_RUN_CORE0 if FREERTOS_UNICORE + default ARDUINO_EVENT_RUN_CORE1 if !FREERTOS_UNICORE help Select on which core Arduino's WiFi.onEvent() run @@ -56,8 +60,10 @@ choice ARDUINO_EVENT_RUNNING_CORE bool "CORE 0" config ARDUINO_EVENT_RUN_CORE1 bool "CORE 1" + depends on !FREERTOS_UNICORE config ARDUINO_EVENT_RUN_NO_AFFINITY bool "BOTH" + depends on !FREERTOS_UNICORE endchoice @@ -69,7 +75,8 @@ config ARDUINO_EVENT_RUNNING_CORE choice ARDUINO_UDP_RUNNING_CORE bool "Core on which Arduino's UDP is running" - default ARDUINO_UDP_RUN_CORE1 + default ARDUINO_UDP_RUN_CORE0 if FREERTOS_UNICORE + default ARDUINO_UDP_RUN_CORE1 if !FREERTOS_UNICORE help Select on which core Arduino's UDP run @@ -77,8 +84,10 @@ choice ARDUINO_UDP_RUNNING_CORE bool "CORE 0" config ARDUINO_UDP_RUN_CORE1 bool "CORE 1" + depends on !FREERTOS_UNICORE config ARDUINO_UDP_RUN_NO_AFFINITY bool "BOTH" + depends on !FREERTOS_UNICORE endchoice @@ -356,3 +365,4 @@ config ARDUINO_SELECTIVE_Wire endmenu + From d7d4831897804b6c9f9d0007c019dda76b9709ac Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Tue, 10 May 2022 00:33:33 +0300 Subject: [PATCH 2/2] Always run UDP on Core0 by default --- Kconfig.projbuild | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Kconfig.projbuild b/Kconfig.projbuild index 5ec41063407..85e66820691 100644 --- a/Kconfig.projbuild +++ b/Kconfig.projbuild @@ -75,8 +75,7 @@ config ARDUINO_EVENT_RUNNING_CORE choice ARDUINO_UDP_RUNNING_CORE bool "Core on which Arduino's UDP is running" - default ARDUINO_UDP_RUN_CORE0 if FREERTOS_UNICORE - default ARDUINO_UDP_RUN_CORE1 if !FREERTOS_UNICORE + default ARDUINO_UDP_RUN_CORE0 help Select on which core Arduino's UDP run @@ -91,18 +90,18 @@ choice ARDUINO_UDP_RUNNING_CORE endchoice -config ARDUINO_UDP_TASK_PRIORITY - int "Priority of the UDP task" - default 3 - help - Select at what priority you want the UDP task to run. - config ARDUINO_UDP_RUNNING_CORE int default 0 if ARDUINO_UDP_RUN_CORE0 default 1 if ARDUINO_UDP_RUN_CORE1 default -1 if ARDUINO_UDP_RUN_NO_AFFINITY +config ARDUINO_UDP_TASK_PRIORITY + int "Priority of the UDP task" + default 3 + help + Select at what priority you want the UDP task to run. + config ARDUINO_ISR_IRAM bool "Run interrupts in IRAM" default "n"