Skip to content

Commit 88d213a

Browse files
Additional FreeRTOS adjustments (#555)
Use low power WFE when idle. Set PORT.C to built `-O0` always because it seems to occasinally end up with interrupts disabled in task code, causing the SYSTICK never to fire and killing task switching. No need for dynamic exceptions. We don't move the execbase.
1 parent 189b796 commit 88d213a

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

libraries/FreeRTOS/src/FreeRTOSConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ command interpreter running. */
113113
#define configCOMMAND_INT_MAX_OUTPUT_SIZE 2048
114114

115115

116-
#define configUSE_DYNAMIC_EXCEPTION_HANDLERS 1
116+
#define configUSE_DYNAMIC_EXCEPTION_HANDLERS 0
117117
#define configSUPPORT_PICO_SYNC_INTEROP 1
118118
#define configSUPPORT_PICO_TIME_INTEROP 1
119119

libraries/FreeRTOS/src/port.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
// Port.c seems to leave interrupts disabled occasionally when built w/anything other than -O0
2+
3+
#pragma GCC optimize ("O0")
14
#include "../lib/FreeRTOS-Kernel/portable/ThirdParty/GCC/RP2040/port.c"

libraries/FreeRTOS/src/variantHooks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ void vApplicationIdleHook( void ) __attribute__((weak));
163163

164164
void vApplicationIdleHook( void )
165165
{
166-
//__wfe(); // Low power idle if nothing to do...
166+
__wfe(); // Low power idle if nothing to do...
167167
}
168168

169169
#endif /* configUSE_IDLE_HOOK == 1 */

0 commit comments

Comments
 (0)