Page 1 of 1
Build upython on stm32cube ide?
Posted: Sun Jul 26, 2020 2:36 am
by miltmobley
1. Can micropython and its firmwares be built on STM32Cube IDE using an STM32F405xx (pyboard) processor configuration?
2. Is source available for the threading firmware?
3. In general, how does your firmware differ from the standard stm32 firmware provided by STM32Cube?
Re: Build upython on stm32cube ide?
Posted: Mon Jul 27, 2020 3:22 am
by jimmo
miltmobley wrote: ↑Sun Jul 26, 2020 2:36 am
1. Can micropython and its firmwares be built on STM32Cube IDE using an STM32F405xx (pyboard) processor configuration?
If you can make the IDE run a Makefile, yes. What I'd recommend is following the steps to build the firmware outside the IDE (see
https://github.com/micropython/micropyt ... /README.md) and then once that's working you can invoke it from the IDE.
If you want to build the pyboard firmware exactly, then
otherwise you can copy the ports/stm32/boards/PYBV11 directory, modify whatever you need (e.g. pin assignments) and build that instead
Code: Select all
make BOARD=MYBOARD BOARD_DIR=path/to/MYBOARD
miltmobley wrote: ↑Sun Jul 26, 2020 2:36 am
2. Is source available for the threading firmware?
It's the same source, just built with a different option.
You can either do this by adding
to your mpconfigboard.h
or by adding
Code: Select all
make BOARD= .... CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1'
to the make command line.
miltmobley wrote: ↑Sun Jul 26, 2020 2:36 am
3. In general, how does your firmware differ from the standard stm32 firmware provided by STM32Cube?
Can you explain what you mean by "standard stm32 firmware provided by STM32Cube?"
Re: Build upython on stm32cube ide?
Posted: Thu Jul 30, 2020 2:01 am
by miltmobley
I meant the stm32 hal library layer, which I assumed micropython would have some variant of. But after some investigation,
it seems the micropython libs are accessing the hardware directly and not calling through a hal layer.
Thanks for your other answers.
Re: Build upython on stm32cube ide?
Posted: Thu Jul 30, 2020 7:33 pm
by dhylands
Some of the peripherals are accessed through the HAL layer, and some are accessed directly.