Page 1 of 4

STM32 F4 Discovery ...

Posted: Mon May 02, 2016 7:11 pm
by Rando
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.

Re: STM32 F4 Discovery ...

Posted: Mon May 02, 2016 8:34 pm
by Rando
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.

Re: STM32 F4 Discovery ...

Posted: Mon May 02, 2016 8:48 pm
by dhylands
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).

Re: STM32 F4 Discovery ...

Posted: Mon May 02, 2016 9:37 pm
by SpotlightKid
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).

Re: STM32 F4 Discovery ...

Posted: Tue May 03, 2016 3:42 am
by dhylands
The OP specifically mentioned a F401 discovery so the 407 targets probably won't work.

Re: STM32 F4 Discovery ...

Posted: Tue May 03, 2016 9:50 am
by SpotlightKid
I was replying to this:
Rando wrote:[...] failing that can you refer me to a know good STM32F4 Discovery that works with MicroPython.

Chris

Re: STM32 F4 Discovery ...

Posted: Tue May 03, 2016 12:25 pm
by Rando
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.

Re: STM32 F4 Discovery ...

Posted: Tue May 03, 2016 3:38 pm
by dhylands
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).

Re: STM32 F4 Discovery ...

Posted: Thu May 05, 2016 6:17 pm
by Rando
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.

Re: STM32 F4 Discovery ...

Posted: Mon May 09, 2016 8:41 pm
by Rando
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!