Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

CP 5.0.0 on STM32F411-Discovery USB Drive Space
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

CP 5.0.0 on STM32F411-Discovery USB Drive Space

by rando on Mon Mar 23, 2020 3:25 pm

Howdy All,

Easy stay at home project today, I got an old STM43F411-Discovery board out of storage, updated the way out of date ST-Link firmware and quickly uploaded the latest 5.0.0 Circuit Python image, using STM32CubeProgrammer 2.40.


Read to flash CP 5.0.0 STM32F411-Discovery.JPG
Read to flash CP 5.0.0 STM32F411-Discovery.JPG (186.29 KiB) Viewed 52 times


Powered down, and back up everything and was delighted to see the CP drive instance spring up pronto. Just that easy.



But there's only about 28+ K of drive space which is not enough load the latest library support files to do a test of the onboard, acceleration/mag sensor.

Any ideas how to increase the memory in flash for the CP virtual drive?

Thanks!

rando
 
Posts: 60
Joined: Thu Jan 20, 2011 2:03 pm

Re: CP 5.0.0 on STM32F411-Discovery USB Drive Space

by tannewt on Mon Mar 23, 2020 4:30 pm

Glad you got it going so easily!

Unfortunately it isn't easy to make the drive larger due to the non-uniform erase sizes of the internal flash. (If the discovery board had external flash this wouldn't be an issue.) The 411 has 4 16k sections of flash, one is used for ISRs and the last three are for the filesystem. There is one 64k block as well but it would take half of ram to buffer. The remaining ones are 128k which would exactly fit into RAM (leaving no space for CircuitPython.) More info here: https://github.com/adafruit/circuitpyth ... x_FLASH.ld

tannewt
 
Posts: 1727
Joined: Thu Oct 06, 2016 8:48 pm

Re: CP 5.0.0 on STM32F411-Discovery USB Drive Space

by rando on Thu Apr 02, 2020 12:50 pm

I did the same test on the STM32F407VG-Discovery and got the same free drive space limitation.

I just need to find examples/applications that work in this limited context.

My next step will be to try the STM32F411 "Black Pill" with an external SPI flash chip soldered to the available pads on the bottom. Can't hurt to try! Anyone have experience to share with this I wonder?

STM32F4-Blue-Pill-Board.jpg
STM32F4-Blue-Pill-Board.jpg (98.12 KiB) Viewed 25 times

rando
 
Posts: 60
Joined: Thu Jan 20, 2011 2:03 pm

Re: CP 5.0.0 on STM32F411-Discovery USB Drive Space

by tannewt on Thu Apr 02, 2020 2:14 pm

I expect you'll need to modify the Black pill board definition and recompile CircuitPython yourself for it to work. Its not too bad: https://learn.adafruit.com/building-circuitpython/

Hop onto the Adafruit Discord for faster help: https://adafru.it/discord

tannewt
 
Posts: 1727
Joined: Thu Oct 06, 2016 8:48 pm

Re: CP 5.0.0 on STM32F411-Discovery USB Drive Space

by rando on Thu Apr 02, 2020 4:59 pm

Thank you! Yes I am aware I will need to make some modifications for this to fly ...

rando
 
Posts: 60
Joined: Thu Jan 20, 2011 2:03 pm

Please be positive and constructive with your questions and comments.