Micropython Build Step by Step

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
HarryOz
Posts: 18
Joined: Thu May 19, 2016 6:02 am

Micropython Build Step by Step

Post by HarryOz » Fri Oct 09, 2020 2:11 am

Hi All,

Are there step by step instructions on building a .dfu file for an STM32 custom board?

*edit. I have Ubuntu 18 installed on a virtual machine for this.

1. Install Ubuntu on virtual box
2. Sudo apt-get install git
3. Sudo apt-get install screen
4. Git clone https://github.com/micropython/micropython.git
5. Sudo apt-get install locate
6. Sudo updatedb
7. Locate gcc-arm-none-eabi
8. Export PATH="$PATH:/usr/share/doc/gcc-arm-none-eabi/bin

my make returns error i cannot build any of the boards.

Appreciate any guidance.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Micropython Build Step by Step

Post by dhylands » Mon Oct 12, 2020 6:11 am

In addition to what you posted above, you should follow the build instructions on the stm32 README:
https://github.com/micropython/micropyt ... structions

HarryOz
Posts: 18
Joined: Thu May 19, 2016 6:02 am

Re: Micropython Build Step by Step

Post by HarryOz » Tue Oct 13, 2020 11:07 am

Many thanks, got it working.

HarryOz
Posts: 18
Joined: Thu May 19, 2016 6:02 am

Re: Micropython Build Step by Step

Post by HarryOz » Fri Oct 23, 2020 3:49 pm

Hi Again,

Is there a way to set a GPIO pin to 1 or 0 in the HAL configuration file?

I have a regulator that is turned on or off using an output pin and i would like to have the firmware pre define that pin to 0 so on startup the regulator is off.

Thanks,
Harry

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Micropython Build Step by Step

Post by jimmo » Sat Oct 24, 2020 4:45 am

HarryOz wrote:
Fri Oct 23, 2020 3:49 pm
I have a regulator that is turned on or off using an output pin and i would like to have the firmware pre define that pin to 0 so on startup the regulator is off.
The pin should be high-impedance by default, so an external weak pull-down resistor might be all you need?

Post Reply