-
-
Notifications
You must be signed in to change notification settings - Fork 781
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
Add debug and flash support for S32K344 #1652
Conversation
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.
Doing a review, we've only spotted two small mistakes that are easily fixed.
This looks great, thank you for the contribution and your hard work implementing this! (We've been talking on Discord chatting back and forth on approaches and how best to support this part.)
We know that this is overflowing Flash right now which is why the firmware builds are failing, and that's well noted as a problem to solve for v2.0 via the new build system.
6c347f3
to
0e76aa4
Compare
We know we approved this PR but now the Meson build system has landed, this needs some updating. If you're able to do the necessary changes to add an enable macro to the Makefile and Meson build systems and gate this properly then please do so, if not we'll be happy to do the necessary changes ourself with your permission. Just let us know what path you'd like to pursue here. |
These chips will hard fault if we probe for APs that are not present. Instead, lets detect the specific chip and explicitly initialize the APs we know it has. Additionally, the S32K3 requires specific bits to be set in the SDA_AP registers to allow debug access, so we explicitly initialize that as well.
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.
All builds are passing, and the Meson build system change looks good 👍🏼 LGTM, merging after a little light testing as you've said this works on BMDA to us.
Detailed description
This adds the ability to attach to an NXP S32K344 and basic erase/flash support. The bulk of the changes are in two parts:
I have mostly tested this by some regular use as a debugger, and to test the flash I generated a 4MB (-48KB to avoid the protected region at the end) random binary file, converted to an elf, and repeatedly erased, flashed, and compare-section-ed.
Your checklist for this pull request
make PROBE_HOST=native
)make PROBE_HOST=hosted
)Closing issues