Sticky: STM32F4 boards - limited support

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
User avatar
RogerClark
Posts: 7185
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Sticky: STM32F4 boards - limited support

Post by RogerClark » Wed Apr 29, 2015 10:43 pm

The majority of the development effort has been put into the STM32F103 version.

The STM32F4 version is taken from an old port of the original LeafLabs libmaple core, to F4 by the Aeroquad team.

Unlike the STM32F1 section, the F4 code has not been reworked to bring it up to the level of the Arduino 1.0 API, which means that a lot of the API calls you take for granted in the API are not present, also complete classes (Stream) are not implemented in the F4 version yet.

What needs to happen, is for the major restructuring that I did to the STM32F1 code to be applied to the F4 code, however I think an easier method to do the update, would probably be to make a copy of the F1 code, and then replace the files that were F1 hardware specific, with the files from the F4 folder.

However, its probably at least a whole day's work, possibly more. I currently don't personally have time to update the F4 code, but I'd be happy to answer questions from anyone who wanted to take the task on !

I did some basic tests, on a STM32F407 Discovery board, and GPIO works, however I was not able to get Serial to work (but this doesn't necessarily mean its not working)

PS.
In the longer term, the goal should be to merge the F1 and F4 folders, but thats a long way off at the moment, and would require even more restructuring and code changes in both the STM32F1 and STM32F4 folders for this to be possible.

victor_pv
Posts: 1682
Joined: Mon Apr 27, 2015 12:12 pm

Re: Sticky: STM32F4 boards - limited support

Post by victor_pv » Sat May 02, 2015 3:51 am

Hi Roger, should the Nucleo F411 work? if so, how does the upload work? thru st-link or I need to use the serial bootloader?

stevech
Posts: 441
Joined: Thu Aug 27, 2015 6:32 am

Re: Sticky: STM32F4 boards - limited support

Post by stevech » Sat Apr 02, 2016 8:08 pm

another option may be the ROM bootloader that can be enabled via the BOOT0, BOOT1 pins.
An extract from the reference manual is below.

Many of the STM32F's have a bootloader in ROM, and the available serial interfaces it uses vary by chip type. Below are for the '411 chip.
ST has a free host-side loader, and the protocol is open source if you must DIY. For development, I use ST-Link which is internal to the IDE I use. But some users will prefer using a bootloader.
2016-04-02_130546.jpg
2016-04-02_130546.jpg (172.39 KiB) Viewed 6324 times

Touseef
Posts: 16
Joined: Sat Jun 04, 2016 9:25 am

Re: Sticky: STM32F4 boards - limited support

Post by Touseef » Sat Jun 04, 2016 11:42 am

Roger could you please send me the code for STM32F407 Discovery for the GPIO and the instruction on how to upload that code using latest versions of Arduino IDE.

User avatar
AnalogLamb
Posts: 46
Joined: Fri Jul 15, 2016 7:38 am
Location: Beijing
Contact:

Re: Sticky: STM32F4 boards - limited support

Post by AnalogLamb » Mon Sep 12, 2016 9:06 am

RogerClark wrote:The majority of the development effort has been put into the STM32F103 version.

The STM32F4 version is taken from an old port of the original LeafLabs libmaple core, to F4 by the Aeroquad team.

Unlike the STM32F1 section, the F4 code has not been reworked to bring it up to the level of the Arduino 1.0 API, which means that a lot of the API calls you take for granted in the API are not present, also complete classes (Stream) are not implemented in the F4 version yet.

What needs to happen, is for the major restructuring that I did to the STM32F1 code to be applied to the F4 code, however I think an easier method to do the update, would probably be to make a copy of the F1 code, and then replace the files that were F1 hardware specific, with the files from the F4 folder.

However, its probably at least a whole day's work, possibly more. I currently don't personally have time to update the F4 code, but I'd be happy to answer questions from anyone who wanted to take the task on !

I did some basic tests, on a STM32F407 Discovery board, and GPIO works, however I was not able to get Serial to work (but this doesn't necessarily mean its not working)

PS.
In the longer term, the goal should be to merge the F1 and F4 folders, but thats a long way off at the moment, and would require even more restructuring and code changes in both the STM32F1 and STM32F4 folders for this to be possible.

Hi Roger, Now do you know how to support STM32F405 with Arduino IDE 1.6.9?
AnalogLamb.Com - STM32Duino for Everyone

User avatar
AnalogLamb
Posts: 46
Joined: Fri Jul 15, 2016 7:38 am
Location: Beijing
Contact:

Re: Sticky: STM32F4 boards - limited support

Post by AnalogLamb » Mon Sep 12, 2016 9:09 am

RogerClark wrote:The majority of the development effort has been put into the STM32F103 version.

The STM32F4 version is taken from an old port of the original LeafLabs libmaple core, to F4 by the Aeroquad team.

Unlike the STM32F1 section, the F4 code has not been reworked to bring it up to the level of the Arduino 1.0 API, which means that a lot of the API calls you take for granted in the API are not present, also complete classes (Stream) are not implemented in the F4 version yet.

What needs to happen, is for the major restructuring that I did to the STM32F1 code to be applied to the F4 code, however I think an easier method to do the update, would probably be to make a copy of the F1 code, and then replace the files that were F1 hardware specific, with the files from the F4 folder.

However, its probably at least a whole day's work, possibly more. I currently don't personally have time to update the F4 code, but I'd be happy to answer questions from anyone who wanted to take the task on !

I did some basic tests, on a STM32F407 Discovery board, and GPIO works, however I was not able to get Serial to work (but this doesn't necessarily mean its not working)

PS.
In the longer term, the goal should be to merge the F1 and F4 folders, but thats a long way off at the moment, and would require even more restructuring and code changes in both the STM32F1 and STM32F4 folders for this to be possible.

How to develop the cores and libraries for a MCU? Is there any tutorial? I want to develop cores and libraries for STM32F405, can you tell me how to develop them?

Thanks
AnalogLamb.Com - STM32Duino for Everyone

User avatar
martinayotte
Posts: 1229
Joined: Mon Apr 27, 2015 1:45 pm

Re: Sticky: STM32F4 boards - limited support

Post by martinayotte » Mon Sep 12, 2016 1:59 pm

There is not much specific procedures to follow while implementing new libraries.
Simply start doing some code inspiring yourself with all the Arduino libs available on the Internet.

What kind of libraries are you planning to develop ?

User avatar
RogerClark
Posts: 7185
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Sticky: STM32F4 boards - limited support

Post by RogerClark » Mon Sep 12, 2016 9:59 pm

Please read this announcement

viewtopic.php?f=16&t=1398

User avatar
AnalogLamb
Posts: 46
Joined: Fri Jul 15, 2016 7:38 am
Location: Beijing
Contact:

Re: Sticky: STM32F4 boards - limited support

Post by AnalogLamb » Tue Sep 13, 2016 1:50 am

martinayotte wrote:There is not much specific procedures to follow while implementing new libraries.
Simply start doing some code inspiring yourself with all the Arduino libs available on the Internet.

What kind of libraries are you planning to develop ?
Thank you very much firstly.

I am planning to develop libraries for F405, but others recommend Koduino. I am trying it. http://avikde.me/koduino/
AnalogLamb.Com - STM32Duino for Everyone

User avatar
RogerClark
Posts: 7185
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Sticky: STM32F4 boards - limited support

Post by RogerClark » Tue Sep 13, 2016 3:28 am

Koduino does support some F4 boards but only a few

I have contacted Avik De who runs Koduino and he is very interested in the new STM core, so I would wait and see what STM release, later this week.

Post Reply