-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
stm32/boards/ARDUINO_PORTENTA_H7: Update pin definitions. #12676
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
base: master
Are you sure you want to change the base?
Conversation
Thanks, this looks OK to me. @iabdalkader do you have any comment/objection to this change? |
Hi, no objections it looks good. Note I'm also going to add the Arduino pins (A0...Ax, D0...Dx) to all Arduino boards, I already have the change locally but just for the Giga, if you want to add them here as well that's fine. |
I'm game to take a stab at this in a subsequent PR. I looked at doing it in this one, but had two things I wasn't sure how to handle (which may be due to my lack of understanding):
|
I don't think so, isn't it
Yes that's right, it might be a documentation error will pass that along. |
|
I see, yes this can be an issue. I think the |
From the very beginning of the stm port and the pyboard hardware, CPU pins have had their "P" prefix removed. This was done for brevity and to save code space. But, yes, it has lead to some awkward situations where the board name (like "A0") will clash with the CPU name when the P is absent. But, at least it's still possible to disambiguate by explicitly using the namespace, either |
If this change is going to be merged (I think it should be), then the other two Arduino stm32 boards will also need to have their @iabdalkader do you agree with that? Shall we try to do it together in one go? |
I'm just not sure anymore why this change is needed. With the current Note I do like adding the HD pins that should definitely be merged, and we should also add all A0..Ax and D0..Dx pins for all boards. |
As a prerequisite to adding the missing |
Code size report:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12676 +/- ##
==========================================
- Coverage 98.39% 98.36% -0.04%
==========================================
Files 161 159 -2
Lines 21200 21090 -110
==========================================
- Hits 20860 20745 -115
- Misses 340 345 +5 ☔ View full report in Codecov by Sentry. |
1b26d24
to
59eb6e3
Compare
8d83896
to
49dd737
Compare
Changes made to pins.csv: - Removed processor pin designations from board pin names. - Added board designations for the high-density connectors. Signed-off-by: Jim Lipsey <github@lipsey.org>
49dd737
to
b02b1cc
Compare
Yes, that is true. The current state of this PR is that Is this too much of a breaking change? Probably. And as mentioned above, if the change is made for Portenta H7, a similar change should be made for the other Arduino stm32 boards. So, probably what we should do is just merge the high-density connector pin definitions in this PR. Note that Dx and Ax pin names were added in 32623d3 |
Yes it is, it could break examples, tutorials, docs, user scripts etc... But besides that, I just don't see a point in removing this workaround, it won't save much flash.
I agree the HD pins are good to have. |
Named pins actually take quite a lot of flash. In this case removing them would save 2700 bytes. That doesn't really matter for the Portenta though, because it has a large flash and already a >1MByte firmware. But in general it's best not to add pin names if they aren't needed.
@loopback can you please undo the removal of the named pins, and leave just the high-density pin name additions? |
It might be worth looking into a proper fix at the port level, in C, to remove them but still keep support |
Yes, agreed. See related #13664. |
Changes made to pins.csv:
Refer to Discord discussion here.