STM32 F4 Discovery ...

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Rando
Posts: 20
Joined: Thu Apr 28, 2016 1:00 pm

STM32 F4 Discovery ...

Postby Rando » Mon May 02, 2016 7:11 pm

Howdy!,

I'm looking at experimenting with a STM32 F401 Discovery today, does anyone have experience with that board, and failing that can you refer me to a know good STM32F4 Discovery that works with MicroPython. I would be especially keen on using the USB port to host the REPL.

Is there a trick to setup/configure the make file to build for this board? I have built MicroPython for the Micro:bit, but not yet for another processor...

Thanks in advance, for the consideration of your reply.

(Just a quick update, I build the STMHAL binary, and st-link complains that the image is too large for available flash, so that leaves the STM32F407, 411 as candidates. I have to wonder if there was any particular STM32 dev system used for testing during development?)

Best,

R.
Last edited by Rando on Thu May 05, 2016 6:14 pm, edited 1 time in total.

Rando
Posts: 20
Joined: Thu Apr 28, 2016 1:00 pm

Re: STM32 F4 Discovery ...

Postby Rando » Mon May 02, 2016 8:34 pm

I did find this resource online here...

https://github.com/micropython/micropyt ... -Discovery

That should get me going, I will post progress when I get the correct hardware to test.

R.

User avatar
dhylands
Posts: 2313
Joined: Mon Jan 06, 2014 6:08 pm
Location: Shuswap, BC, Canada
Contact:

Re: STM32 F4 Discovery ...

Postby dhylands » Mon May 02, 2016 8:48 pm

I don't see a board definition for the 401 discovery, just the 401 nucleo.

So to use the 401 discovery, you'd need to create the board definition files.

If I have some spare time, I'll see if I can get one put together in the next couple of days (I just found my 401 discovery board, so I should be able to test it too).

SpotlightKid
Posts: 189
Joined: Wed Apr 08, 2015 5:19 am

Re: STM32 F4 Discovery ...

Postby SpotlightKid » Mon May 02, 2016 9:37 pm

The old STM32F4-DISCOVERY board (with the STM32F407VGT6 MCU) works very well with MicroPython. The replacement board has the name STM32F407G-DISC1 and the same MCU and should be compatible with the STM2F4DISC board definition, apart from the fact that it has an ST-Link V2-A interface instead of an ST-LINK V2, so the "deploy-stlink" and "deploy-openocd" Makefile targets might not work out of the box (but flashing in DFU mode should work).

User avatar
dhylands
Posts: 2313
Joined: Mon Jan 06, 2014 6:08 pm
Location: Shuswap, BC, Canada
Contact:

Re: STM32 F4 Discovery ...

Postby dhylands » Tue May 03, 2016 3:42 am

The OP specifically mentioned a F401 discovery so the 407 targets probably won't work.

SpotlightKid
Posts: 189
Joined: Wed Apr 08, 2015 5:19 am

Re: STM32 F4 Discovery ...

Postby SpotlightKid » Tue May 03, 2016 9:50 am

I was replying to this:

Rando wrote:[...] failing that can you refer me to a know good STM32F4 Discovery that works with MicroPython.



Chris

Rando
Posts: 20
Joined: Thu Apr 28, 2016 1:00 pm

Re: STM32 F4 Discovery ...

Postby Rando » Tue May 03, 2016 12:25 pm

Thanks everyone for chiming in on this. Especially regarding the new and old Discovery for the STM32F407, I'm not quite sure how I missed this but I did. Just to clarify my interest in the the new '401C Discovery is two fold. First the low price, second the sensors on the board are exactly what I need for my project. So any help would be much appreciated. I am going to order the latest version of the STM32F407 Discovery board just for comparison purposes, and to assure that I have something that is Micropython friendly.
Last edited by Rando on Tue May 03, 2016 11:26 pm, edited 1 time in total.

User avatar
dhylands
Posts: 2313
Joined: Mon Jan 06, 2014 6:08 pm
Location: Shuswap, BC, Canada
Contact:

Re: STM32 F4 Discovery ...

Postby dhylands » Tue May 03, 2016 3:38 pm

The STM32F401-Discovery has an STM32F401xC chip on it, which only has 256K of flash.

So in order to port to it, you would probably have to give up the filesystem, USB, and other features to get the size down.

The Nucleo-401 has an STM32F401xE on it which has 512K flash, and with the filesystem it almost fills the flash (about 600 bytes of free flash left).

Rando
Posts: 20
Joined: Thu Apr 28, 2016 1:00 pm

Re: STM32 F4 Discovery ...

Postby Rando » Thu May 05, 2016 6:17 pm

As I gain more experience with the MicroPython build setup, I see that both the STM32F411 Discovery and Nucleo are/have build options in the stmhal make file setup, so after I gain some basic experience with the new STM32F407, "DISC-1" incarnation I will test with these also. The '411RE Discovery has exactly the sensor setup (IMU) that the '401 board had so that works for me.

Rando
Posts: 20
Joined: Thu Apr 28, 2016 1:00 pm

Re: STM32 F4 Discovery ...

Postby Rando » Mon May 09, 2016 8:41 pm

I did get the STM32 Discovery-DISC1 '407 via post this weekend. Built the Micropython "stmhal" source for the F407 with out error, using "make BOARD=STM32F4DISC", upgraded the ST-Link v2-1 flasher to the latest and greatest release, and then programmed my generated "firmware.hex" to the board, starting at 0x08000000.

Plugged the USB cable into the botom micro-usb connector, but didn't get an enumeration as a USB CDCdevice, or associated REPL prompt... Any advice on how to move forward?

Thanks!


Return to “Other Boards”

Who is online

Users browsing this forum: No registered users and 1 guest