-
Notifications
You must be signed in to change notification settings - Fork 82
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
Conversation
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]>
@Jake-Carter can you take a look? |
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.
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?
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. |
MAX78000 and MAX78002 don't have Zephyr ports yet.
I've implemented a different mechanism using devicetree to define the RISC-V code region, similar to some other multicore SoC families in Zephyr. The SoC boot code on the ARM core gets the RISC-V boot address from the devicetree and sets the appropriate register. Applications can use a devicetree overlay to change the region from the default if desired. |
This reverts commit 1d180aa.
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