Skip to content
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

flash_safe_execute() doesn't recognise FreeRTOS SMP define for the number of cores #1624

Closed
antonwtw opened this issue Feb 3, 2024 · 3 comments

Comments

@antonwtw
Copy link

antonwtw commented Feb 3, 2024

Hello,
in pico-sdk/src/rp2_common/pico_flash/flash.c, on line 18,
when compiled with FreeRTOS SMP support,
configNUM_CORES is expected to be set to 2 through FreeRTOSConfig.h.
But the FreeRTOS uses a different name for this define: configNUMBER_OF_CORES.
See for instance line 100 in https://github.com/FreeRTOS/FreeRTOS-Community-Supported-Demos/blob/main/CORTEX_M0%2B_RP2040/Standard_smp/FreeRTOSConfig.h
This leads to an assert/error when calling flash_safe_execute() with FreeRTOS SMP, see line 172 in flash.c.
As a quick fix I had to add the following in my FreeRTOSConfig.h:
#define configNUM_CORES configNUMBER_OF_CORES
With best regards, Anton

@antonwtw antonwtw changed the title flash_safe_execute() not recognises FreeRTOS SMP define for the number of cores flash_safe_execute() doesn't recognise FreeRTOS SMP define for the number of cores Feb 3, 2024
@lurch
Copy link
Contributor

lurch commented Feb 3, 2024

I guess this'll be fixed by #1530 ?

@antonwtw
Copy link
Author

antonwtw commented Feb 5, 2024

That's true. Sorry I didn't find the 1530 before.

@peterharperuk
Copy link
Contributor

Duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants