build micropython for STM32F7DISC on windows
-
- Posts: 70
- Joined: Wed Oct 14, 2015 5:07 pm
build micropython for STM32F7DISC on windows
Hi, could anyone point me to any information on building upy on a windows machine, all the info seems to be Linux.
Re: build micropython for STM32F7DISC on windows
Building STM32F7DISC is essentially the same as building for the pyboard. The biggest difference is that you need to specify a BOARD.
When no BOARD is provided, then it defaults to PYBV10 (which is the pyboard BOARD designator). If you find yourself working with a particular board alot, then you can create a GNUmakefile or a makefile which contains something like the following: then when you type make it automatically sets the BOARD for you. You can still override by passing BOARD= when you invoke make.
Code: Select all
make BOARD=STM32F7DISC
Code: Select all
$(info Executing GNUmakefile)
BOARD = STM32F7DISC
$(info BOARD = $(BOARD))
include Makefile
-
- Posts: 70
- Joined: Wed Oct 14, 2015 5:07 pm
Re: build micropython for STM32F7DISC on windows
thanks dave, but I was hoping for even more hand holding (sorry), ive installed the arm toolchain, but windows doesn't have make so I downloaded a make for win32 and I get a tr problem, I'm thinking I might need a whole bunch of stuff to get this to build, maybe it would be easier to stick mint? on a spare itx board and use that.
Re: build micropython for STM32F7DISC on windows
On long run, the best would be to install a Linux VM. Both Virtualbox and VMWare work pretty well and are free of charge for private use. Even if you get the build working for now, it may change again, and then you're constantly wasting energy at the build environment instead of dealing with MicroPython and your own projects. That's at least what I do. On my Windows machine I have a Linux VM, and on my Linux machine a Windows VM.
Re: build micropython for STM32F7DISC on windows
A VM is likely the easiest (minus possible occasional problems getting devices connected to it over usb, not sure about the current state but I've had problems with tat in the past), but have you tried using msys or cygwin? They have package managers, make, ... which should make it easier than installing everything seperately and hoping it works together.
Re: build micropython for STM32F7DISC on windows
Another option is to install cygwin or MinGW. I've successfully built micropython using the cygwin environement.
-
- Posts: 70
- Joined: Wed Oct 14, 2015 5:07 pm
Re: build micropython for STM32F7DISC on windows
ok thanks chaps, looks like its time to expt but at least I have some pointers of where to start
Re: build micropython for STM32F7DISC on windows
I recently created a setup on windows using this guide and everything seems to build fine,
http://www.jann.cc/2013/10/10/embedded_ ... ndows.html
http://www.jann.cc/2013/10/10/embedded_ ... ndows.html
-
- Posts: 70
- Joined: Wed Oct 14, 2015 5:07 pm
Re: build micropython for STM32F7DISC on windows
I decided to go the vm route, never tried hyper v so what the heck....
Enabled HyperV on windows 10...
Programs and Features
Turn Windows Features on or off
X Hyper-V
Reboot
Download Ubuntu 14.04.4-desktop-amd64.iso
Open HyperV manager
Create a network bridge connection
Create a new virtual machine
using iso ubuntu
start vm
connect to vm and install ubuntu
login
sudo apt-get install build-essential libreadline-dev libffi-dev git
git clone https://github.com/micropython/micropython.git
1). sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
2). sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
3). sudo apt-get update
4). sudo apt-get install gcc-arm-embedded
cd micropython\unix
make
Works fine
cd micropython\stmhal
make
download dfu to pyboard - works fine
make BOARD=STM32F7DISC
creates .dfu file - havent tested it yet
Notes:
HyperV doesnt support usb apparently so cant program the device.
which also makes it a pain to get at the resultant .dfu files.
So I apt-get install openssh-server and then on host machine
use ssh client to connect to vm over bridge connection
Enabled HyperV on windows 10...
Programs and Features
Turn Windows Features on or off
X Hyper-V
Reboot
Download Ubuntu 14.04.4-desktop-amd64.iso
Open HyperV manager
Create a network bridge connection
Create a new virtual machine
using iso ubuntu
start vm
connect to vm and install ubuntu
login
sudo apt-get install build-essential libreadline-dev libffi-dev git
git clone https://github.com/micropython/micropython.git
1). sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
2). sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
3). sudo apt-get update
4). sudo apt-get install gcc-arm-embedded
cd micropython\unix
make
Works fine
cd micropython\stmhal
make
download dfu to pyboard - works fine
make BOARD=STM32F7DISC
creates .dfu file - havent tested it yet
Notes:
HyperV doesnt support usb apparently so cant program the device.
which also makes it a pain to get at the resultant .dfu files.
So I apt-get install openssh-server and then on host machine
use ssh client to connect to vm over bridge connection
-
- Posts: 70
- Joined: Wed Oct 14, 2015 5:07 pm
Re: build micropython for STM32F7DISC on windows
.... made the mods as suggested by dhylands, in order to enable dfu mode.
nb the power jumper needs to be set correctly. : : : I :
insert uusb into cn13, hold down dfu pin and reset. device goes into dfu mode
upload firmware reset and lo and behold a usb uart with upy....
Excellent stuff dh Damien et al.....
nb the power jumper needs to be set correctly. : : : I :
insert uusb into cn13, hold down dfu pin and reset. device goes into dfu mode
upload firmware reset and lo and behold a usb uart with upy....
Excellent stuff dh Damien et al.....