Skip to content

Allow FreeRTOS hook for C33 only and improve its reliability #414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ portenta_c33.build.fpu=-mfpu=fpv5-sp-d16
portenta_c33.build.float-abi=-mfloat-abi=hard

portenta_c33.build.board=PORTENTA_C33
portenta_c33.build.defines=-DF_CPU=200000000
portenta_c33.build.defines=-DF_CPU=200000000 -DPROVIDE_FREERTOS_HOOK
portenta_c33.vid.0=0x2341
portenta_c33.pid.0=0x0068
portenta_c33.vid.1=0x2341
Expand Down
4 changes: 3 additions & 1 deletion cores/arduino/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ void arduino_main(void)
Serial.begin(115200);
#endif
startAgt();
start_freertos_on_header_inclusion();
setup();
#ifdef PROVIDE_FREERTOS_HOOK
start_freertos_on_header_inclusion();
#endif
while (1)
{
loop();
Expand Down
3 changes: 2 additions & 1 deletion libraries/Arduino_FreeRTOS/src/portable/FSP/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ static void prvTaskExitError(void);

#endif

#ifdef PROVIDE_FREERTOS_HOOK
void loop_thread_func(void* arg) {
setup();
while (1)
{
loop();
Expand All @@ -246,6 +246,7 @@ void start_freertos_on_header_inclusion() {

vTaskStartScheduler();
}
#endif

/* Arduino specific overrides */
void delay(uint32_t ms) {
Expand Down
Loading