Page 3 of 3

Re: [STM32F103] - Porting MicroPython to the "BluePill" board

Posted: Tue Sep 15, 2020 2:49 pm
by dhylands
The readme says
Use stm32loader.py using the UART bootloader to flash usbdfu.bin
.

As simple as what you want, even the minimal micropython is around 70K IIRC

Re: [STM32F103] - Porting MicroPython to the "BluePill" board

Posted: Tue Sep 15, 2020 2:57 pm
by bellad
ok thank you,
according to you , what program can I use
i see basic https://github.com/Miskatino/miskatino-basic
What do you think ?

Re: [STM32F103] - Porting MicroPython to the "BluePill" board

Posted: Tue Sep 15, 2020 4:27 pm
by dhylands
It looks like the the basic that you linked is supported on the BluePill. I've never used it before, so I can't really comment on it.

Re: [STM32F103] - Porting MicroPython to the "BluePill" board

Posted: Sun Mar 21, 2021 11:32 am
by gabonator
Hello guys,

I was trying to strip down the micropython to run on LA104 (based on STM32F103) and by little tweaking I was able to reduce size to 58700 bytes without startup code. And this nicely meets the requirement for 64KB build for blue pill.
There are some limitations though: I had to remove repl interface, floating point and compilation support. Lot of size can be saved by replacing the assert function to remove the string description of asserted condition from binary.

https://github.com/gabonator/LA104/tree ... icropython

What it does is just executing precompiled python binaries from local storage.

Later I realized that the cpu I was using (STM32F103VCT6) has 256KB flash, so I switched to circuitpython and the binary size including REPL and floating point and compilation support is twice as big - 128000 bytes:

https://github.com/gabonator/LA104/tree ... cuitpython

Gabriel