-
Notifications
You must be signed in to change notification settings - Fork 8.2k
boards: samples: Add multicore support for NXP mcxn947. #81882
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
boards: samples: Add multicore support for NXP mcxn947. #81882
Conversation
d496856 to
3d99703
Compare
samples/drivers/mbox/remote/boards/frdm_mcxn947_mcxn947_cpu1.conf
Outdated
Show resolved
Hide resolved
danieldegrasse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great to see, thanks. I think we should split the commits here out a bit, here's a suggested set of commits:
- commit modifying MBOX and IPM drivers for MCX support, and adding the DTS entries for the MBOX peripheral
- commit adding support for booting the second core at the SOC level (IE the SYS_INIT routine)
- commit adding board definitions and CMake changes to the board to enable dual core support
- commit adding support for each dual core sample. We could also this into commits for each sample, but I don't really think that's needed.
samples/drivers/mbox_data/remote/boards/frdm_mcxn947_mcxn947_cpu1.conf
Outdated
Show resolved
Hide resolved
samples/subsys/ipc/ipc_service/static_vrings/remote/boards/frdm_mcxn947_mcxn947_cpu1.conf
Outdated
Show resolved
Hide resolved
samples/drivers/mbox/remote/boards/frdm_mcxn947_mcxn947_cpu1.conf
Outdated
Show resolved
Hide resolved
DerekSnell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @TomasGalbickaNXP ,
Building for cpu1 fails for me because of this typo in the hal_nxp: #enidf instead of #endif. It appears we also need to update the HAL to resolve this, and update the West manifest in your PR.
To replicate, I see this error building the hello_world sample with this command:
west build -b frdm_mcxn947//cpu1 samples/hello_world/ --pristine
The error:
/home/snellda/zNXPmicro/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core1.c: In function 'SystemInit':
/home/snellda/zNXPmicro/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core1.c:80: error: unterminated #if
80 | #if !defined(__ZEPHYR__)
|
/home/snellda/zNXPmicro/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core1.c:78:3: error: expected declaration or statement at end of input
78 | SYSCON->NVM_CTRL &= ~SYSCON_NVM_CTRL_DIS_MBECC_ERR_DATA_MASK; /* enables bus error on multi-bit ECC error for data */
I initially tried building the OpenAMP sample, and had the same error:
west build -b frdm_mcxn947//cpu0 --sysbuild samples/subsys/ipc/openamp --pristine
d327b5d to
fb3ba4c
Compare
|
@TomasGalbickaNXP please rebase when you get a chance |
fb3ba4c to
358c358
Compare
358c358 to
0eb036f
Compare
samples/drivers/mbox_data/remote/boards/frdm_mcxn947_mcxn947_cpu1.overlay
Outdated
Show resolved
Hide resolved
samples/drivers/mbox/remote/boards/frdm_mcxn947_mcxn947_cpu1.overlay
Outdated
Show resolved
Hide resolved
5cfc00c to
78f9f07
Compare
This commit adds MBOX device tree entry for MCXN947. Adds support for MCXN in NXP ipm and mbox drivers. Signed-off-by: Tomas Galbicka <[email protected]>
b909825 to
01d726f
Compare
01d726f to
19dbdb3
Compare
|
see comment above about flash , I think still we should have minimal things enabled on cpu1 |
This commit adds multicore support for MCXN947. It enables the secondary core CPU1 to boot from flash. Signed-off-by: Tomas Galbicka <[email protected]>
This commit adds support for these multicore samples: - samples/drivers/mbox - samples/drivers/mbox_data - samples/subsys/ipc/ipc_service/static_vrings - samples/subsys/ipc/openamp Signed-off-by: Tomas Galbicka <[email protected]>
19dbdb3 to
28d17e9
Compare
This PR adds multicore support for frdm_mcxn947. The cpu1 is booted from flash.
Samples supported by this commit:
The frdm_mcxn947 supports the mbox driver.