-
Notifications
You must be signed in to change notification settings - Fork 3k
STM32 : set all PinMap structures as weak #5936
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
We should use |
OK to use MBED_WEAK.
I can see 2 cases:
|
13276d1
to
5714340
Compare
For custom boards that might have more pins available, or some differencies. This might be a valid reason to extend API or provide functionality that instead of weak linking, set pinmap arrays, default ones provided? We shall think about it @SenRamakri @bulislaw @c1728p9 Can you review this addition ? |
I believe declaring this as weak (as I started on the L433) series is a fair tradeoff. This is adding more flexibility for custom target boards. In general this allows to use more pins as GPIOs, however it is not perfect because special pin functionality e.g.: UART, SPI, Timer, interrupt vectors, etc are not enabled because the target device does not know about it. E.g.: See serial_device.c in the STM target folder. My opinion is, that the weak solution is great for developers, they get access to more pins and can optimise their hardware pin design to use mbed for their target boards. Most engineers and students are can easily handle the mbed online system, however adding a new target is out of reach for most developers. Making it perfect (with all features) is a super large task, and some MCU vendors (Atmel) don’t keep up their mbed support anyways. I recommend this little change with a great benefit. |
5714340
to
09065c4
Compare
Compilation issue should be solved |
@jeromecoutant Could you rebase this PR so that we can start CI? Thanks! |
This allow custom overwrites
09065c4
to
8f647be
Compare
Done |
/morph build |
@helmut64 Thanks for details 👍 LGTM. Be aware that for all these platforms, if mbed 2 lib is used, it wont be functional until we make these peripheral pins definitions into own object file. |
Build : SUCCESSBuild number : 988 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 681 |
Test : SUCCESSBuild number : 810 |
Description
This allow custom overwrites.
Status
READY