Porting MicroPython to the STM32F429i

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
User avatar
Pikachu
Posts: 5
Joined: Tue Jul 29, 2014 1:55 pm

Porting MicroPython to the STM32F429i

Post by Pikachu » Wed Oct 08, 2014 6:06 am

Hello,

I tried to port MicroPython on the STM32F429i Board, but I have some problems with the Micro USB. :roll:
One difference between the STM32F4 Discovery and the STM32F429i is the pins which are used for the Micro USB connection.
The STM32F4 Discovery uses the pins PA9,PA11,PA12 and PA10, however the STM32F429i uses the PB15, PB14, PB13 and PB12 pins.

Now my question: How can I change the Micro USB pins in the MicroPython code?

Thanks for your help :D

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

Re: Porting MicroPython to the STM32F429i

Post by dhylands » Wed Oct 08, 2014 7:09 am

IIRC the openmv project uses a 429 (and runs micropythong so I suspect the work may be already done.

The stmhal/usbd_conf.c file does the pin configuration for USB.

User avatar
Pikachu
Posts: 5
Joined: Tue Jul 29, 2014 1:55 pm

Re: Porting MicroPython to the STM32F429i

Post by Pikachu » Wed Oct 08, 2014 7:46 am

Okay... So i have to say that Iam using the STM32F429i Discovery Board.
I already tried to change the usbd_conf.c, but i got no usb connection to the PC.
This Board has his own Programmer called ST-Link, with this its possible to get a .hex file on the board.
Therefor i think micropython is already running, but i cannot test it.

Is it possible to put code in the main.py file before porting it to the controller?

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

Re: Porting MicroPython to the STM32F429i

Post by dhylands » Wed Oct 08, 2014 2:59 pm

Pikachu wrote:Okay... So i have to say that Iam using the STM32F429i Discovery Board.
I already tried to change the usbd_conf.c, but i got no usb connection to the PC.
This Board has his own Programmer called ST-Link, with this its possible to get a .hex file on the board.
Therefor i think micropython is already running, but i cannot test it.

Is it possible to put code in the main.py file before porting it to the controller?
The contents of the initial boot.py and main.py can be found here:
https://github.com/micropython/micropyt ... #L139-L151

You can use the command:

Code: Select all

pyb.repl_uart(pyb.UART(6,115200))
to get the REPL to show up on a UART (in addition to the USB).

Post Reply