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

Rt1170 Dual Core and OpenAMP support #41579

Merged
merged 17 commits into from
Dec 5, 2022
Merged

Rt1170 Dual Core and OpenAMP support #41579

merged 17 commits into from
Dec 5, 2022

Conversation

danieldegrasse
Copy link
Collaborator

@danieldegrasse danieldegrasse commented Jan 5, 2022

Enable dual core and shared memory support for the RT1170 EVK.

This PR enables the following features for the RT1170:

  • Dual core support (primary core can kick off secondary core without debugger)
  • Shared memory support using OCRAM2
  • Messaging unit driver to enable communication between cores

Mulitcore images are created by converting the secondary image binary into a elf file with one section, and linking that into the primary image. The primary core will load the secondary image from flash into RAM, then boot the secondary core from that RAM.
Mulicore images are now supported using Sysbuild

@github-actions
Copy link

github-actions bot commented Jan 5, 2022

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@66db7c2 zephyrproject-rtos/hal_nxp#130 zephyrproject-rtos/hal_nxp#130/files

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added area: IPC Inter-Process Communication area: IPM Inter-Processor Mailbox area: Build System labels Jan 5, 2022
@gmarull gmarull removed their request for review January 5, 2022 14:26
@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@tyalie
Copy link
Contributor

tyalie commented Oct 4, 2022

Are there any news on this now that #40555 has been merged?

@danieldegrasse
Copy link
Collaborator Author

This PR is dependent on #48709, which itself depends on #49552. I've kept this PR open in the meantime because I would like to have it available as a demonstration of how to support multicore operation on the RT11xx series. However, it may be some time before this is able to merge.

@danieldegrasse
Copy link
Collaborator Author

@tejlmand Can you revisit this PR? With #48709 merged, this PR has been updated to use systembuild to support dual core operation on the RT1170/RT1160

Allow linking code into OCRAM region when building for RT1xxx SOCs. This
can be used on the RT11xx dual core SOCs as a shared memory region, when
the M7 core needs to load code into a region accessible to the M4 core.

Signed-off-by: Daniel DeGrasse <[email protected]>
RT11xx features CM4 core, which must be booted from CM7 core. Add
support for loading an image for the CM4 to RAM, and booting the CM4 core
from this image. Each image is built independently using sysbuild, and the
M4 image build produces built collateral with load address information the
M7 image can use to load it to RAM

Signed-off-by: Daniel DeGrasse <[email protected]>
RT1170 and RT1160 CM7 and CM4 cores have the same set of differences.
Merge the DTS files for both CM4 and CM7 cores, to create generic
rt11xx_cm4 and rt11xx_cm7 files.

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable MU messaging unit driver for RT11xx socs.

Signed-off-by: Daniel DeGrasse <[email protected]>
Use the messaging unit to ensure that the RT11xx dual core mode will
wait for the second core to boot successfully during early init

Signed-off-by: Daniel DeGrasse <[email protected]>
Add zephyr,memory-region compatible and attribute to SOC memory regions,
so that sections will be generated and MPU attributes can be applied.

Signed-off-by: Daniel DeGrasse <[email protected]>
Flexspi partition definition is shared between both cm4 and cm7 core.
Refactor it to be in shared dtsi file. This will ensure that both cores
share the same partition information, for dual core operation.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add support for loading M4 image from OCRAM when running with dual core
operation. The M7 core will copy the M4 image from flash into OCRAM, and
the M4 core will execute it there.

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable messaging unit support for RT1170 EVK

Signed-off-by: Daniel DeGrasse <[email protected]>
LED1 node is enabled, to provide a secondary led for the CM4 core.

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable the openamp sample for RT1170EVK. CM4 core has a custom DTS
overlay to use LPUART2 for console information, and use a secondary GPT
timer for the system tick.

Signed-off-by: Daniel DeGrasse <[email protected]>
…port

Update RT1170 documentation for dual core support

Signed-off-by: Daniel DeGrasse <[email protected]>
Flexspi partition definition is shared between both cm4 and cm7 core.
Refactor it to be in shared dtsi file. This will ensure that both cores
share the same partition information, for dual core operation.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add support for loading M4 image from OCRAM when running with dual core
operation. The M7 core will copy the M4 image from flash into OCRAM, and
the M4 core will execute it there.

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable messaging unit support for RT1160 EVK

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable the openamp sample for RT1160EVK. CM4 core has a custom DTS
overlay to use LPUART2 for console information, and use a secondary GPT
timer for the system tick.

Signed-off-by: Daniel DeGrasse <[email protected]>
…port

Update rt1160 documentation for dual core support

Signed-off-by: Daniel DeGrasse <[email protected]>
Copy link
Collaborator

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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

Successfully merging this pull request may close these issues.