I have been experimenting with a variety of Nucleo and Discovery boards and have been able to get MicroPython on to all of them except this little Nucelo L432KC board: https://www.st.com/en/evaluation-tools/ ... 432kc.html
On all the others I simply connect BOOT0 to 3.3v and use dfu-util under Linux to upload the .dfu file.
The problem is, this board doesnt seem to have an exposed BOOT0 pin. So, how do I get MicroPython on to it?
Thanks!
[STM32L432KC] Getting MicroPython on to an STM32L432KC?
[STM32L432KC] Getting MicroPython on to an STM32L432KC?
Last edited by dwculp on Fri May 14, 2021 1:27 pm, edited 1 time in total.
Re: Getting MicroPython on to an STM32L432KC?
I believe BOOT0 is exposed as a solder bridge on the underside of that board - "SB12". See UM1956 pg12.
Re: [STM32L432KC] Getting MicroPython on to an STM32L432KC?
I can see on my board that SB12 is bridged through a tiny SMT resistor. I can remove that resistor quite easily and unbridle the connection. If the resistor has to be put back in place though, I have no easy way to do it.
I will give it a try tonight though and see what happens!
I will give it a try tonight though and see what happens!
Re: [STM32L432KC] Getting MicroPython on to an STM32L432KC?
I use the built in STLINK interface with stmcubeprog software. It doesn't need boot0 jumpered.
Re: [STM32L432KC] Getting MicroPython on to an STM32L432KC?
I got it downloaded via the stmcubeprog software and can connect and pull up a REPL.
I cannot get the PYBOARD internal filesystem to show up so I can actually read and write .py files to it. Any help there?
Re: [STM32L432KC] Getting MicroPython on to an STM32L432KC?
The board definitions for the STM32L432KC disable the internal filesystem - though there is a small section allocated for a filesystem in the linker script.
256KB flash is large enough that you can carve out a chunk for a filesystem - but you'll need to change the board definitions to do so. The starting point would be to define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE as 1 instead of 0 in mpconfigboard.h (if you edit the file you can just remove that line since it defaults to 1 for the stm32 port).
That may be enough to get it to work though I'm afraid I don't have a board to test it on (can confirm that it builds cleanly).
256KB flash is large enough that you can carve out a chunk for a filesystem - but you'll need to change the board definitions to do so. The starting point would be to define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE as 1 instead of 0 in mpconfigboard.h (if you edit the file you can just remove that line since it defaults to 1 for the stm32 port).
That may be enough to get it to work though I'm afraid I don't have a board to test it on (can confirm that it builds cleanly).