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

feat(Other): Enable building zephyr for risc-v targets #1051

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MaureenHelm
Copy link
Contributor

Configures the zephyr build system to use the appropriate cmsis system startup and peripheral driver sources based on the target core architecture. The mxc lock driver is not implemented for risc-v and emits a build warning (which twister promotes to an error), therefore the zephyr build system is configured to build it only for arm.

Before this patch, we could only build zephyr for arm targets, but now we can build zephyr for arm or risc-v targets.

Checklist Before Requesting Review

  • PR Title follows correct guidelines.
  • Description of changes and all other relevant information.
  • (Optional) Link any related GitHub issues using a keyword
  • (Optional) Provide info on any relevant functional testing/validation. For API changes or significant features, this is not optional.

Configures the zephyr build system to use the appropriate cmsis system
startup and peripheral driver sources based on the target core
architecture. The mxc lock driver is not implemented for risc-v and
emits a build warning (which twister promotes to an error), therefore
the zephyr build system is configured to build it only for arm.

Before this patch, we could only build zephyr for arm targets, but now
we can build zephyr for arm or risc-v targets.

Signed-off-by: Maureen Helm <[email protected]>
@MaureenHelm
Copy link
Contributor Author

@Jake-Carter can you take a look?

Copy link
Contributor

@Jake-Carter Jake-Carter left a comment

Choose a reason for hiding this comment

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

@MaureenHelm @ozersa

MAX78000 and MAX78002 also have RISC-V cores and need similar modifications.

Also, the RISC-V core needs to be booted up by the ARM core, and by default the RISC-V JTAG is not enabled. In the MSDK we have a system for dynamically linking RISC-V application on top of some basic start-up code that runs in the ARM core (see RV_ARM_Loader and the implementation here).

The implementation isn't really straightforward and involves parsing the .map file for a custom symbol added in the linker script. Is there a similar mechanism planned for Zephyr?

@Jake-Carter
Copy link
Contributor

On RISC-V MXC_Lock implementation - we've had this in the TODO for a while. Let me know if we need to bump this up in priority.

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

Successfully merging this pull request may close these issues.

None yet

3 participants