-
-
Notifications
You must be signed in to change notification settings - Fork 779
Brings Cortex-M3 support in line with Cortex-M4. #1212
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
Conversation
…e M4 code and just copies it over to M3. The one major change an M3 chip will see is some slight changes to handlers (svc_handler instead of SVC_handler). Fixes a minor bug in the Cortex-M4 hard fault handler output, so it correctly prints the start of the stack even when it's not the same as _ezero.
Move the mpu code to arch/cortex-m and use it for the m3 and m4 platforms.
Can you also test by compiling for M3, with this new M3 crate? Just for completeness? |
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.
Looks generally good, though testing with the new code on real hardware would be nice.
|
If the m3 and m4 mpu is identical hardware I feel strongly we should only have one driver for it. Based on past experience with Tock bugs just won't get fixed on both if there are multiple copies. However, we need this to do 1.3 testing so I would rather just get this merged today. |
|
I agree -- let's just get it in now and come up with the right solution after 1.3. Maybe the right approach is a symlink? I don't think we want to go down the approach of different ARMv as well as specific microcontrollers. |
|
bors r+ |
1212: Brings Cortex-M3 support in line with Cortex-M4. r=alevy a=phil-levis This mostly takes the M4code and just copies it over to M3. The one major change an M3 chip will see is some slight changes to handlers (svc_handler instead of SVC_handler). Fixes a minor bug in the Cortex-M4 hard fault handler output, so it correctly prints the start of the stack even when it's not the same as _ezero. ### Pull Request Overview The cortex-m3 library code, adding MPU support. It also fixes a tiny bug in the M4 hard fault handler. ### Testing Strategy This pull request was tested by compiling for M4 and running on hotel (m3). ### TODO or Help Wanted This pull request still needs others who are using M3s to update their code with the new handler names. ### Documentation Updated - [X] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [X] Ran `make formatall`. Co-authored-by: Philip Levis <[email protected]> Co-authored-by: Brad Campbell <[email protected]>
Build succeeded |
|
I am mildly distressed that we just put cortex-m[34] specific code into cortex-m. I agree that we should have one driver, but not at the cost of having incorrect code. |
This mostly takes the M4code and just copies it over to M3. The one major change an M3 chip
will see is some slight changes to handlers (svc_handler instead of SVC_handler).
Fixes a minor bug in the Cortex-M4 hard fault handler output, so
it correctly prints the start of the stack even when it's not the
same as _ezero.
Pull Request Overview
The cortex-m3 library code, adding MPU support. It also fixes a tiny bug in the M4 hard fault handler.
Testing Strategy
This pull request was tested by compiling for M4 and running on hotel (m3).
TODO or Help Wanted
This pull request still needs others who are using M3s to update their code with the new handler names.
Documentation Updated
/docs, or no updates are required.Formatting
make formatall.