-
Notifications
You must be signed in to change notification settings - Fork 980
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
[variant] Improve variant support and genericity #1091
Conversation
This change impact PIO and I don't know how to solve this. |
I saw in 1.8.13 your rework of the boards menu per architecture arduino/Arduino#9238 has you any though on this PR and this question ?
I think about open an issue about that or a question on the devel group list. The way to define a board/variant does not allows enough possibilities and seems very restricted. I guess it would be fine to allows build submenu more easily and have a variant path more "dynamic" |
Thanks for keeping me informed. We're going to update STM32 platform with the v1.9.0 release, so we can take into account possible future changes of variant paths. Is it already decided to introduce an intermediary folder |
Hi @valeros currently this is under investigation. 1.9.0 is not impacted. |
Probably the best way is to fork
|
@fpistm, that A workaround would be what you've done now: Just repeat the group path in each menu option. Not elegant, but at least it works. Maybe if Arduino fixes this, it can be changed later. I can't comment on PlatformIO, but I think @valeros can :-) Is this what you wanted feedback on? Or is there any other question I missed? |
Thanks @matthijskooijman !!
Yes that's what I saw during my test. For sketch it works but not for compiler while with the method used in this PR the -I option is available with the correct path. In fact when I saw your rework of the menu, I'm thinking about why we do this kind of boards.txt with the boards group and then the real variant. This is due to the fact it is not possible to construct a submenu. What would be fine would be to be able to construct a menu with submenu easily and then also be able to link upload method per submenu to avoid duplicate upload boards entries for each group. Anyway, thanks again. Just FYI, I've an empty menu with Roger's core. I guess this is due to empty boards.txt in drivers and tools folders: https://github.com/rogerclarkmelbourne/Arduino_STM32/blob/master/drivers/boards.txt Maybe this file can now be safely deleted or simply Arduino should ignore empty file? |
Well, reworking the nested menu was easy, that was just GUI code, it did not require changes to the This is because the extra menus are now always defined per-board, so there is no way to have common (per-core) menus. I've realized this would be a good feature to add, but I haven't really sat down to think about this, let alone implement it (and it changes semantics of
Ah, that's a completely separate issue that is triggered by my nested boards change. I'm not sure what the best fix for this is, since Roger's core does sort of abuse the system by providing an empty |
As said it is just for your interest and of course off-topic ;)
OK. Just a thought as I think this could be probably better managed. Anyway, I guess this would be really useful only for this core. We planned to deployed more generic variant and so this will add a lot of entry in the boards.txt. Hope there is no limit in Arduino IDE (even the new pro IDE) and also with arduino-cli. |
1e544ef
to
38f6145
Compare
Thanks @valeros for the hints. I've made the patch in the GH action and it works well: I wonder if it could be possible to manage backward compatibilities in the script which manages the variant JSON entry to test if the path exists or not ? "variant": "Generic_F1/PILL_F103XX",
"alt_variant": "PILL_F103XX", |
@fpistm I think we can handle this is in the build script instead of adding a new filed |
Thanks @valeros |
I think that having 2 ways of categorization at the same level (by manufacturer and by board type) may be ambiguous, there may be some overlap. What to do when manufacturer XXX introduce a 3D printer board ? That said, I would be in favor of 1st level being STM32 series (F1, F4, ...), this could help future enhancement where a board inherit from Generic implementation. |
Thanks for you feedback @ABOSTM Any feedback are welcome. 😉 |
Note this user button is not available on all revisions of this board Fixes stm32duino#1144 Signed-off-by: Alexandre Bourdiol <[email protected]>
Supersed stm32duino#1130 Signed-off-by: dds90 <[email protected]> Co-authored-by: Alexandre Bourdiol <[email protected]>
Invert PF9 and PF10 in digitalPin[] to match their definition in variant.h Fixes forum issue: https://www.stm32duino.com/viewtopic.php?p=6652#p6652 Signed-off-by: Alexandre Bourdiol <[email protected]>
Signed-off-by: Alexandre Bourdiol <[email protected]>
Supersed stm32duino#1208 Signed-off-by: Martin Cerný <[email protected]> Co-authored-by: Alexandre Bourdiol <[email protected]>
This is is only a workaround to allow the PIO build action. Targets have been changed due to '(' and ')' in their paths which prevent the build even if they are protected. Signed-off-by: Frederic Pillon <[email protected]>
Signed-off-by: Frederic Pillon <[email protected]>
Wiki will be updated to describe the new way to define a variant. Signed-off-by: Frederic Pillon <[email protected]>
This new function could be called by STM32duino_Low_Power library Signed-off-by: Alexandre Bourdiol <[email protected]>
Currently only H7 is concerned. MP1 hardware also have dualpad analog switch but behavior is different and in our case, switch should always remain open. Signed-off-by: Alexandre Bourdiol <[email protected]>
Signed-off-by: Frederic Pillon <[email protected]>
\o/ |
Finally done! |
that was some huge merge. well done! very good work. sorry if this is wrong place to ask. but had a simple little question (linked over on other issue), just if anybody here happens to know the answer Serasidis/STM32_HID_Bootloader#23 (comment) if these newly commited improvement can... lets me flash an hid bootloader and memory magic for flashing mode... without manually be pressing the reset button to reboot it every time. i think it means some special signal has to be sent over HID usb connection. to interrupt the running userland program, ad jump into the hid bootloader. which can then do all the flashing, reboot etc. because for the life of me... i cannot find the answer to this question! yet the weact black pill f4xx is a very popular board. i searched and searched |
Thanks. For HID. I saw several issue linked to the WeAct HID fork. I don't know why so many issue... Anyway, I do not use it and HID seems no more maintained by @Serasidis. |
When can we expect an update wiki? |
I looks like there is something wrong with github:
related to this commit (part of this PR)
But I could not found the comment in github.
What I can tell is that generic files are automatically generated, and all supported spi instances are made available. |
Hello Alexandre,
Thank yo for your interest.
Yes, Yesterday I wrote a message and after that delete, because that’s true or not, I am not sure.
When I look at the MCU STM32F103C8T6 and the datasheet I am using, I see that there are two SPIs in this MCU and I made my PCB design considering this.
Both of the ICs I have used on my card use the SPI communication protocol. For this reason, I had to make my software accordingly.
One of the ICs I have used is the NRF24 module. I defined this module to SPI2 and connected it to SPI1 in my other integration. But I could not establish any communication with NRF24.
Afterwards, I realized that there is no SPI2-related definition in the "variant_generic.h" code.
PART OF variant_generic.h
As such, I defined the SPI2 pins to the SPI pins defined in the "variant_generic.h" code in order to at least determine the operability of my card and whether the SPI2 pins are usable.
Later, I realized that my card was working, so I made sure that the SPI2 pins of the MCU I used were also working.
My current goal is to add the SPI1 and SPI2 pins to the relevant part (But I'm not sure which part, I just have a few thoughts.)
Maybe these libraries:
· PeripheralPins.h
· PinAF_STM32F1.h
You can find this codes: STMicroelectronics\hardware\stm32\2.0.0\cores\arduino\stm32
Thank you for your interest. I'd appreciate it if you could help me out or start a discussion on github. This may be of interest to other software developers.
Saygılarımla / Best regards
Rıdvan Melih ŞAHİN
Elektronik Tasarım Mühendisi / Electronic Design Engineer
<http://dets.com.tr/> Yatay Logo Yazı2
DETS DİNAMİK MÜHENDİSLİK TEKNOLOJİ SİSTEMLERİ SAN. TİC. LTD.ŞTİ.
ODTÜ Teknokent Ostim Merkezi Ostim Mahallesi 1308 Cadde No:6
Zemin kat No: 6 06374 - Yenimahalle/ ANKARA
T: +90 312 473 16 73 M: +90 507 733 22 34
<http://www.dets.com.tr/> www.dets.com.tr
Bu e-posta ile iletilen bilgiler ve dosyalar gönderici ve alıcı arasında gizlidir. E-postanın ulaşması gereken kişi siz değilseniz, e-posta ve tüm eklerini silerek gönderen kişiye yanlışlıkla ilgili bilgi veriniz. Alıcı ve gönderici haricinde mesajın içerdiği bilgiler kullanılamaz. Bu mesajın içerdiği bilgiler DETS Dinamik Mühendislik Teknoloji Sistemleri San. Tic. Ltd. Şti.’yi hukuki sorumluluk altında bırakmaz.
The information and files transmitted by this e-mail are confidential between the sender and the receiver. If you are not the person this e-mail needs to reach, delete the e-mail and all of its attachments and let the sender know this mistake. The information contained in the message can not be used except the sender and the receiver. The information contained in this message does not leave DETS Dinamik Mühendislik Teknoloji Sistemleri San. Tic. Ltd. under legal responsibility.
From: Alexandre Bourdiol ***@***.***
Sent: Monday, August 2, 2021 4:42 PM
To: stm32duino/Arduino_Core_STM32
Cc: Rıdvan Melih Şahin; Mention
Subject: Re: [stm32duino/Arduino_Core_STM32] [variant] Improve variant support and genericity (#1091)
@ridvanmelih <https://github.com/ridvanmelih>
I looks like there is something wrong with github:
I receive a email notification about the following comment
Do we have a chance to define the SPI2 pins here?
related to this commit (part of this PR)
Re: [stm32duino/Arduino_Core_STM32] Add all generated STM32F1xx generic variant files ( <6b2b23d> 6b2b23d)
But I could not found the comment in github.
Consequently I don't know the context of this comment
* which directory is concerned
* which file is concerned
* which line is concerned
* which MCU/board is concerned
What I can tell is that generic files are automatically generated, and all supported spi instances are made available.
So maybe the concerned MCU doesn't have spi2, or you are on a board/MCU which doesn't output spi2 pins
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1091 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AU2SBRZ5WGH7RRXQW7LZGTLT22OEDANCNFSM4NU7GKCA> . <https://github.com/notifications/beacon/AU2SBR4GTBCMHSZGBJQL5MTT22OEDA5CNFSM4NU7GKCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGUOCSEQ.gif>
|
As you can see, SPI1 and SPI2 pins are already defined:
Arduino create a default SPI instance (instance of the class)
If you need both SPI, you just need to declare, in you sketch, a new instance with the pins of SPI2 (hardware instance)
|
As the number of variants continues to grow and in order to ease navigation, they have been grouped in sub-folders per
series.
To improve variants support and generic ones several enhancements/fixes has been done:
PeriperhalPins.c
PinMap array. ALTx pin naming will allow to use all alternative possibilities which use other HW peripheral instances.All generic variants are now automatically generated thanks the STM32_open_pin_data repository which provides all the information required for the pin configuration of products based on STM32 MCU. All the generic variants are generated in the variant folder, this means all the generic STM32 MCU are generated. Only the linker script and the clock config are missing. A board_entry.txt file is generated to ease board declaration.
Migrated STM32 series:
Issues linked to this PR:
Fix #855, fix #857, fix #1180, fix #1276, fix #1277, fix #1302, fix #1144
PR for new variant included in this one;
One issue has been met with Arduino IDE about the menu scrolling: arduino/Arduino#11416
Wiki will be updated after official 2.0.0 core release
That would be fine to define the variant in a different way, like this for example:
but it does not work. It builds fine until the compile core step. The automatic default include is simply ignored while for other step it works fine.
I guess there is an issue around the way variant is managed in the Arduino IDE.
Any input are welcome.
@matthijskooijman do you have any idea about this issue? --> arduino/arduino-cli#762