TiLDA MK3/build

From EMF Badge
Revision as of 17:06, 20 July 2016 by Marekventur (talk | contribs)
Jump to navigation Jump to search

Dependencies

You can use either windows or linux, although windows will not have most things installed by default

git, make, python, etc

I will just assume you have this

arm-none-eabi-gcc

https://launchpad.net/gcc-arm-embedded/+download You will have to make the arm-none-eabi-gcc from the bin directory available to your system (add to PATH, symlink or copy)

On Ubuntu you can follow these instructions: https://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa

pyusb

sudo pip install pyusb

USB Permissioning on Linux

On some Linux distributions it may be necessary to add additional udev rules in order to allow the REPL to work:

copy the following text to /etc/udev/rules.d/49-tilda-mk3.rules

# 0483:df11 - Tila Mk3 based on Mircropython board
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"

And then restart the udev service:

sudo udevadm control --reload-rules

Flashing

# Clone this repo
git clone git@github.com:emfcamp/micropython.git

# Switch to our work branch
cd micropython
git checkout tilda-master

# Now we can build the firmware and flash it to the badge
# You have to boot the badge into dfu mode by pressing down the center
# joystick button while pressing the reset button to trigger a reboot
make -C stmhal BOARD=STM32L475_EMFBADGE deploy