Skip to content

Conversation

@TomasGalbickaNXP
Copy link
Contributor

@TomasGalbickaNXP TomasGalbickaNXP commented Nov 25, 2024

This PR adds multicore support for frdm_mcxn947. The cpu1 is booted from flash.

Samples supported by this commit:

  • samples/drivers/mbox
  • samples/drivers/mbox_data
  • samples/subsys/ipc/ipc_service
  • samples/subsys/ipc/openamp

The frdm_mcxn947 supports the mbox driver.

Copy link
Contributor

@danieldegrasse danieldegrasse left a 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.

Copy link
Contributor

@DerekSnell DerekSnell left a 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

@TomasGalbickaNXP TomasGalbickaNXP force-pushed the feature/mcxn94x-multicore-support branch 2 times, most recently from d327b5d to fb3ba4c Compare December 5, 2024 11:42
@danieldegrasse
Copy link
Contributor

@TomasGalbickaNXP please rebase when you get a chance

@TomasGalbickaNXP TomasGalbickaNXP force-pushed the feature/mcxn94x-multicore-support branch from fb3ba4c to 358c358 Compare December 5, 2024 20:03
danieldegrasse
danieldegrasse previously approved these changes Dec 5, 2024
@TomasGalbickaNXP TomasGalbickaNXP force-pushed the feature/mcxn94x-multicore-support branch 2 times, most recently from 5cfc00c to 78f9f07 Compare December 11, 2024 09:17
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]>
@TomasGalbickaNXP TomasGalbickaNXP force-pushed the feature/mcxn94x-multicore-support branch 2 times, most recently from b909825 to 01d726f Compare December 11, 2024 15:37
decsny
decsny previously approved these changes Dec 11, 2024
@decsny
Copy link
Member

decsny commented Dec 11, 2024

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]>
@TomasGalbickaNXP TomasGalbickaNXP force-pushed the feature/mcxn94x-multicore-support branch from 19dbdb3 to 28d17e9 Compare December 12, 2024 18:25
@kartben kartben merged commit 64585b7 into zephyrproject-rtos:main Jan 15, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: IPC Inter-Process Communication area: IPM Inter-Processor Mailbox area: mbox area: Open AMP area: Samples Samples platform: NXP Drivers NXP Semiconductors, drivers platform: NXP NXP

Projects

None yet

Development

Successfully merging this pull request may close these issues.