Search found 148 matches

by chrismas9
Tue Jun 02, 2020 4:48 pm
Forum: MicroPython pyboard
Topic: How to properly increase FLASH_FS on pyboardv11?
Replies: 6
Views: 779

Re: How to properly increase FLASH_FS on pyboardv11?

uPy may report the large fs size based on numblocks, but it won't work. Have you tried filling the fs with files, then editing or replacing them? When you try to change a 512 byte sector in a 128KB flash block the whole 128KB has to be backed up in cache RAM while the block is erased. Then the new s...
by chrismas9
Sun May 31, 2020 4:22 pm
Forum: MicroPython pyboard
Topic: How to properly increase FLASH_FS on pyboardv11?
Replies: 6
Views: 779

Re: How to properly increase FLASH_FS on pyboardv11?

You can't just keep extending the number of flash sectors on the F4 because the sectors 6 and higher are 128KB and the cache is only 64KB. There is a mechanism in flashbdev.c to use 64KB from each of sectors 6 and 7. Have a look at the F413 port which shows how to get the largest filesystem on F4. Y...
by chrismas9
Fri May 29, 2020 12:40 am
Forum: General Discussion and Questions
Topic: machine.Pin.pull_down ?
Replies: 5
Views: 861

Re: machine.Pin.pull_down ?

When you drive an input from a push pull source you don't need a pull-up or pulldown, just a normal high impedance input. You only need a pull resistor if the driving source can become high impedance, eg open drain or tristate. If the ESP32 output is push pull, always either 0V or 3.3V, then the STM...
by chrismas9
Thu May 28, 2020 12:02 pm
Forum: Programs, Libraries and Tools
Topic: How to Build and Debug MicroPython Source Code with Eclipse
Replies: 10
Views: 884

Re: How to Build and Debug MicroPython Source Code with Eclipse

If you install Python from the Windows Store instead of from a download it installs correctly as Python3.
by chrismas9
Mon Apr 20, 2020 1:46 am
Forum: Hardware Projects
Topic: Smallest MCU for micropython
Replies: 15
Views: 1603

Re: Smallest MCU for micropython

Thorsten, Your minimal port is similar to mine. The biggest savings come from disabling FLOAT and SPI. SPI costs about 7k. The only other big change I made was to disable the compiler. From memory this saves about 24k (my notes are at work and I am working at home). #define MICROPY_ENABLE_COMPILER (...
by chrismas9
Wed Apr 15, 2020 5:04 pm
Forum: General Discussion and Questions
Topic: Production Code for Custom Board
Replies: 9
Views: 900

Re: Production Code for Custom Board

Once you have your code frozen it is part of the single bin, hex, elf or dfu file. You can use dfu over serial with the built in bootloader or SWD witb STLINK to program the flash and it should run. If you want to usd the filesystem as well you can setup one unit, then suck a flash image out and use...
by chrismas9
Wed Apr 08, 2020 12:54 pm
Forum: Hardware Projects
Topic: Smallest MCU for micropython
Replies: 15
Views: 1603

Re: Smallest MCU for micropython

It's more than a board directory. Some of the changes are in the port files. I will try to put something useful together. I just nuked my laptop and I haven't installed everything yet so I probably won't be able to do anything until next week. I am not using a filesystem. I debug in RAM using Thonny...
by chrismas9
Wed Apr 08, 2020 2:12 am
Forum: Hardware Projects
Topic: Smallest MCU for micropython
Replies: 15
Views: 1603

Re: Smallest MCU for micropython

I am developing products using L072, primarily because of its on board EEPROM. I did an exercise first to build a minimum useful STM32 port and got it down to about 150k. Not all features can be disabled in mpconfigboard.h. You need to work through all the config files and disable what you don't nee...
by chrismas9
Thu Apr 02, 2020 2:38 pm
Forum: Hardware Projects
Topic: Smallest MCU for micropython
Replies: 15
Views: 1603

Re: Smallest MCU for micropython

If you are new to MicroPython and don't want to learn how to port it yet you should be able to use the NUCLEO_L432KC port without modification on the QFN STM32L432KC chip. You will have to compile it as the binary is not in the downloads. It reserves 26k flash for the file system, not all of which w...
by chrismas9
Sat Mar 28, 2020 1:51 am
Forum: Hardware Projects
Topic: Smallest MCU for micropython
Replies: 15
Views: 1603

Re: Smallest MCU for micropython

Also the STM32L072. Use the L073 port. This chip is memory limited (192k flash) and sometimes gets broken when new features are added. If cost is more important than size I have MicroPython running on STM32F030. It's just over $US1 in volume.