Skip to content

Commit b5193a4

Browse files
Move FreeRTOS to main core, refactor async_context, move to LWIP task
Implement the LWIP task (the only task allowed to call actual LWIP calls) using a work queue accessible from any other task/core. Move FreeRTOS into the main cores/rp2040 directory to allow for easier core usage. Dynamically build the proper async_context for raw or FreeRTOS in the IDE, not at libpico time.
1 parent 15a1cb5 commit b5193a4

File tree

108 files changed

+1163
-1263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1163
-1263
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
path = libraries/Adafruit_TinyUSB_Arduino
2424
url = https://github.com/adafruit/Adafruit_TinyUSB_Arduino.git
2525
[submodule "libraries/FreeRTOS/lib/FreeRTOS-Kernel"]
26-
path = libraries/FreeRTOS/lib/FreeRTOS-Kernel
26+
path = FreeRTOS-Kernel
2727
url = https://github.com/earlephilhower/FreeRTOS-Kernel.git
2828
[submodule "tools/libbearssl/bearssl"]
2929
path = tools/libbearssl/bearssl

cores/rp2040/freertos/FreeRTOS.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#ifdef __FREERTOS
2+
#include "../../../FreeRTOS-Kernel/include/FreeRTOS.h"
3+
#endif

libraries/FreeRTOS/src/FreeRTOSConfig.h renamed to cores/rp2040/freertos/FreeRTOSConfig.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#ifdef __FREERTOS
12
#ifndef configNUMBER_OF_CORES
23
#define configNUMBER_OF_CORES 2
34
#endif
@@ -80,7 +81,9 @@
8081
#ifndef configUSE_TASK_PREEMPTION_DISABLE
8182
#define configUSE_TASK_PREEMPTION_DISABLE 1
8283
#endif
83-
84+
#ifndef configTASK_NOTIFICATION_ARRAY_ENTRIES
85+
#define configTASK_NOTIFICATION_ARRAY_ENTRIES 4
86+
#endif
8487
#ifndef configUSE_NEWLIB_REENTRANT
8588
#define configUSE_NEWLIB_REENTRANT 1
8689
#endif
@@ -262,3 +265,4 @@ void rtosFatalError(void);
262265
#endif
263266

264267
#include "rp2040_config.h"
268+
#endif
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#ifdef __FREERTOS
2+
#include "../../../FreeRTOS-Kernel/include/StackMacros.h"
3+
#endif

cores/rp2040/freertos/atomic.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#ifdef __FREERTOS
2+
#include "../../../FreeRTOS-Kernel/include/atomic.h"
3+
#endif

cores/rp2040/freertos/croutine.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#ifdef __FREERTOS
2+
#include "../../../FreeRTOS-Kernel/croutine.c"
3+
#endif

cores/rp2040/freertos/croutine.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#ifdef __FREERTOS
2+
#include "../../../FreeRTOS-Kernel/include/croutine.h"
3+
#endif
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#ifdef __FREERTOS
2+
#include "../../../FreeRTOS-Kernel/include/deprecated_definitions.h"
3+
#endif
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#ifdef __FREERTOS
2+
#include "../../../FreeRTOS-Kernel/event_groups.c"
3+
#endif
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#ifdef __FREERTOS
2+
#include "../../../FreeRTOS-Kernel/include/event_groups.h"
3+
#endif

0 commit comments

Comments
 (0)