-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
SAM RH707 Support #69
Comments
Hi Ben!
|
Hi @blietaer, Adding PAC is trivial, as we have the process automated. PAC would require SVDs for all variants of the new MCU. What needs modification, however, is the ATPACKs Harvester to enable extracting SVDs from official Microchip's sources. My worry is - and I don't have time experiment with - that IPs for peripherals in this new series may differ from those on SAME, SAMS and SAMV, as this is Microchip's design not original Atmel's, despite still being Cortex-M7. @martinmortsell is convinced it's mostly compatible, question is what's the percentage of that mostly and how much complication to feature flags any differences may introduce. None of us has kits with that chip to run any checks or tests. If you're willing to try, please start with making sure ATPACKs Harvester can download and extract right SVDs. |
Wow, great, many thanks for this quick and positive feedback to both of you. Yes, I share the same worry: so ...let's dig and try, I have the board on my desk, a blinky test would be a nice first (although not deeply testing all PAC corner cases, of courses). I was not aware of the ATPACKs Harvester: so this is the way to go ? And finally, so is this OK to keep this thread alive here as an 'issue' ? or do you want to move in another channel ? |
After Michał's comment I looked a bit more carefully at the datasheet, and I'd say the MCUs seem to be somewhat compatible, rather than mostly compatible. The peripherals that are shared might need some work, but it should be doable to integrate support into this hal. And as he pointed out, we do not have access to development boards, so we cannot actually test the code. |
OK, understood, thanks ! I am happy to try and build my first PAC (and then adapt HAL if/as needed), testing it on my HW, ...but I'll have some (many) n00b questions... :/ Is that OK ? |
@tmplt & @martinmortsell wrote most of the HAL code so far, however, mostly as part of their full time job (Grepit AB work for Volvo). I started this years ago when SAMV70 was my main working platform, but never went past basics. And I redone the way we deal with PACs (finished recently; need proper release). Now about the process:
For your own experiments, you can play traditional way with local use of Please don't publish any crates if you wish the support to be part of this organisation. |
Yes. This tools extracts SVDs from DFPs without need to download MPLAB Harmony every time - I'm not interested in vendor's IDEs especially when I work from command line on Linux. |
Margin note: To be complete, we should consider not only SAMRH707, but SAMRH71 and SAMV71-RT as well. |
Ah ! Sorry for the typo (careful: this was blindly cut'n'paste from your README...). Yes, let's get rid of anything MPLAB related 🙈 |
OK both PAC and Harvester seem to work properly with SAM RH7xx: I suggested changes to PR for both repo's...let me know how am I doing ? |
The datasheet will likely be very helpful here. Setting up clocks and pins correctly will lay the foundation for most of the other peripherals. The peripherals should be feature gated in src/lib.rs such that you only compile peripherals available on the RH707 when that feature is selected. |
From a cursory look at the datasheet the clock hierachy looks similar, at least. I'd start there for an eventual HAL adaption: peripheral clocks must explicitly be enabled before use on the X7Xs. After that comes the PIO, as Martin recommends. I'd refrain from trying the X7X examples on your board until the implementation has been verified with the RH datasheets, just in case they put your hardware in an unknown state. |
Addendum: find the RH-equivalent of the ERASE pin. It may come in handy. |
Good point, and more generally, as I unpack and plug the SAM RH707 Evaluation Kit Board, I already struggle with the debugger access under Linux (MPLAB IDE must work just fine, I guess, but I hope I won't have to try that one)... 🙄
So far, none of these will speak my usual EDBG or OpenOCD scripts... I need to hack around and find out the decent configuration/tool. (If you guys have ideas/hints, I am happy to hear it ! :P ) |
An E70 is a bit overkill for a CMSIS-DAP debugger, so I presume it does a lot more work (ITM/ETM/etc; a buffer for the IDE). I'd go with direct access via J5. But for curiosity's sake, does As for OpenOCD, does it ship with RH-compat configs? |
Indeed, it's an IDE-specific debugger. I can't help with openocd, but an alternative approach would be probe-rs. It lacks RH-support, but it may be easier to implement and/or get support. |
@blietaer So, atpacks-svd-harvester v0.9.10 is released, with your support extended by V71-RT, checked; + some security updates. And
|
Ah, sweet: many thanks 🙏 OK, so I have now the board RH707 on my desk, I am trying and checking the probes... :/ |
I haven't work around, I used strum's feature. |
Mmmh not sure to see the line #46 of |
I missed that. It's in your PR, but commented code needs to be removed before merge. |
I believe it is only this line |
@blietaer I reviewed that line again couple of days ago and took a bit different approach. The fix is committed, but not released yet as I'm trying to automate releases, but |
Oh thank you and sorry for the useless hustle then. |
Don't. You pointed out at something I missed - that's important. |
Dear Michał and atsams-rs Team,
Many thanks for crediting me in the latest newsletter, despite my humble contribution ! 😅
As I am about to dig a bit more this SAM platform for both the SAM V71 & E70 (respectively Xult & MCLV2 boards) but also the SAM RH707 (on its evaluation kit board), I would like to understand from you guys if there is any room/need/willingness for converging efforts:
1.) I'll have to derive the SAM RH707 PAC from its
.svd
, and then hopefully its HAL: it is understood that specific PACs should now be hosted outside of this veryatsams-rs repo
: is this OK I simply hold it on my personal GitHub then ?(And anything already done for SAM RH707 ? Is the HAL easily inspired from existing ones, once I have it PAC generated ?)
2.) I believe this whole
atsamx7x-rust
is based on the RTIC v1.x (or did I goof from branches? ) and I am mostly experimenting on RTIC v2.0.1 nowadays: is this valuable/appreciated if I push somehow/somewhere here my ported examples on RTIC v2.x ?3.) Latest RTIC version seems to require a dedicated
rtic-monotonics
implementation for this whole SAM 7xx family MCU, if we want to have a timer-based one (today only the 'Systick' one is working fine (maybe it is enough for most of us...?): is this also already ongoing effort somewhere by someone ?Sorry if this is the wrong place to ask these points: please rick-roll me to the appropriate Matrix channel (is the RTIC channel on Element the right place to discuss this as most of you guys pop-up over there ?)
Thank you,
Have a good one 🎅 !
Cheers,
Ben
The text was updated successfully, but these errors were encountered: