-
-
Notifications
You must be signed in to change notification settings - Fork 894
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 STM32 cores support #1422
base: development
Are you sure you want to change the base?
Add STM32 cores support #1422
Conversation
Thanks for this contribution. I don't know much about the hal, but I have one question: how does this relate to the existing stm32f hal? Should stm32f users use the hal in this pull request instead? Or should we keep both? |
I quoted some chars about stm32duino history basically two "stm32duino" cores which are supported Roger's core "Arduino_STM32" - based on Leaflabs libraries, focused mainly on BluePills and its derivates, still maintained by stm32duino web site veterans, works fine. "Arduino_Core_STM32" - based on STM's HAL, the "new one", maintained by people close to STM, focused mainly on STM's Nucleo boards, accommodating the BluePills as well. History background: Roger started "stm32duino" site some 6y back, while the repo was placed on his github above. In meantime there were 2-3 repos created by veterans, forked from Roger's core, or HAL based. In late 2018 Roger announced he is going to close down the "stm32duino" site in April 2019, and he did. The veterans created a new one (see above the link) and there is a "read only old stm32duino" site still available, but partially broken - here - https://stm32duinoforum.com/forum/index_php.html
I ran only ethernet gateway on STM32F103, if someone use STM32 they can try compile their project with "new" platform. I think you need to save both first time, they are different, but "mark" "old" as deprecated. |
Looks like this PR is based on https://github.com/tekka007/MySensors/tree/STM32duinoUpdate . Did you test the EEPROM emulation as I had issues in the past? |
I use MY_SIGNING_SOFT that store data in EEPROM. It works. I didn't follow this, I had to copy and paste the stm32 cores myself :) |
Hello, I have tried to compile and download the passive node example for a Nucleo F411RE but I got weird results. Ciao, Vittorio |
Fix hwUniqueID on STMF4. Speedup EEPROM write.
Looks like, that are you use https://github.com/tekka007/MySensors/tree/STM32duinoUpdate branch. Can you try https://github.com/KooLru/MySensors/tree/stm32_cores ? I ran this code on NUCLEO-F411RE dev board, and it works with #define MY_NODE_ID (without this define something gone wrong :) |
Hi, now it works, thanks. I have also successfully tested a Nucleo F303K8. Vittorio |
I have successfully run with STM32 "BlackPill F401CC" and "BlackPill F411CE" using an RFM69HCW. I am using the RFM69 new driver and had to add the default IRQ pin to RFM69_new.h -- Inserted at line 95:
After this, the code worked fine with both types of STM32 F4 black pill. |
Just tried it out on platformio, where I get errors. [env:blackpill_f411ce]
platform = ststm32
board = blackpill_f411ce
framework = arduino
lib_deps =
https://github.com/KooLru/MySensors.git#stm32_cores output:
I will try again on baremetal Arduino IDE (which I hate to develop for STM32 but well...) and report back... |
It works on Arduino IDE. I'll file a Issue over at STM32duino platformio framework. |
Hi,
Fixed. |
Was playing around with this and bumped into the same issue. It stems from the fact that the platformio stm32 arduino environment has a main.cpp which is included. This: adds all the .cpp files from the cores/arduino directory, including: which conflicts with the main from this stm32 MySensors: Haven't found a way to exclude the platformio main. There's some feature in platformio to filter the source list, but that only seems to work on your own project's files, just removing/renaming the platformio's main.cpp does make the compile/link succeed, but that's a bit heavy handed. |
Or add _ _ attribute _ _ ((weak)) before framework-arduino preinit() and main() functions ... |
I found an issue or two, maybe related to these two: When I try to compile the standard GatewaySerial sketch (propably also happens with different examples) with for the BluePill F103C8 I get this error:
This can be resolved by adding "#include <EEPROM.h>" in MyHwSTM32.h |
What is the state of this PR? I see that there are some checks that were not successful, but when i click on "Details" I only get a 502 error. |
Hi There, This is, for me, a very high interesting proposal. STM32 products offer a very wide set of possibilities in terms of power saving, memory and so. hopefully this will be merged in dev. thx and br Eric. |
Hi There, I am interested in the STM32 support. What can I do to progress on this ? Checks look freezed in ESP8266/Arduino Mega - Examples... Not sure @KooLru is around ? How could someone handover ? thanks and regards, Eric. |
Hi Tico06, |
Thanks a lot @WhiskyDelta for your answer. I'll give it a try. I am afraid you are right saying MySensors is dying. I just love this project, and have implemented some sensors and actuators in my house and around. I am wondering why such project is not supported anymore. Is it due to hardware availability/affordability ? Or maybe developers leaked to a "concurrent" project ? Eric. |
@WhiskyDelta, @Tico06, @mfalkvidd, @KooLru, Unfortunately, @KooLru's commits are a bit outdated and the branch with @WhiskyDelta's commits is difficult and complicated. I will try to tidy up your commits and combine them into a new up-to-date feature branch. Then some of your changes still need to be discussed here. But I am very confident that your new STM32 architecture can be included in development. |
Thanks a lot @virtual-maker! Looking forward to progress on this. |
Hi There,
Looks like ARDUINO_ARCH_STM32F1 is not defined. Any clue to drive me ? Thx and reg Eric. |
@Tico06 which branch did you use? That error is on line 86 in KooLru’s code so my guess is that you used the wrong branch by mistake. |
Arrff... my bad... thanks @mfalkvidd , I didn't pay attention to the branche. I guess it should be topic/mkr/issue1422 ? |
Ok, fine. It compiles without error ! I had to install STM32LowPower and STM32RTC. I'll setup a RFM69 node with a temp sensor and report here my findings. If you want I perform some specific tests, please ping me. I have RFM69, NRF24. thx and reg Eric. |
Hi There, So, I found some time to spent on this... I have a STM32F103C6Tx and it looks qiete short in flash capacity to store the binary:
The same code fits very well in Atmega328P with 32k of flash. How could I produce with a lower binary footprint ? I have order a STM32F103C8T6, nevertheless, I'd like to have a lighter binary. Any specific options in the Arduino IDE or in the code ? thanks and regards, Eric. |
Hi everyone. I'm in the process of designing a sensor that the ATmega328P is not really cut out for. So I'm really happy to see there has been some great efforts to bring support for the STM32. Thank you. At the moment, it seems both @KooLru and @virtual-maker branches compile. Is there any preferred one? Finally, if there's anyway that I could contribute getting support for STM32 merged for good, I'd be happy to help. Regards, Nicolas |
This pull request adds initial support for STM32 Cores https://github.com/stm32duino/Arduino_Core_STM32 officially developed Arduino STM32 boards package from STMicroelectronics. It is based on HAL and LL libraries.
It has been tested with the Blue Pill (STM32F103C8T6).