Newcomers, please start at the ANRGUSC/iris-testbed repository!
Recent updates to the gcc-arm-none-eabi compiler seems to break all of our code. The last version we know that works with the code is release 5.4.1 20160919.
Requirements (TODO: try python3 and update this readme):
Install pip using python2 and script that can be found online:
python2 get-pip.py
Install mbed-cli:
pip2 install mbed-cli==1.0.0
Clone:
Using mbed-cli:
mbed import git@github.com:ANRGUSC/m3pi-mbed-os.git
cd m3pi-mbed-os.git
mbed toolchain GCC_ARM
mbed target LPC1768
Using git:
Initializing mbed project after cloning this repo:
git clone git@github.com:ANRGUSC/m3pi-mbed-os.git
cd m3pi-mbed-os
mbed deploy
mbed new .
mbed toolchain GCC_ARM
mbed target LPC1768
-
Upgrade firmware of the mbed https://os.mbed.com/handbook/Firmware-LPC1768-LPC11U24
-
Install python packages:
pip install -r requirements.txt -
Install python, libusb and libncursus (i386 to be compatible with arm-none-eabi-gdb)
sudo apt-get install python libusb-1.0-0-dev libncurses5:i386 -
It might be necessary to update your USB settings to get non-root access to DAP:
sudo sh -c 'echo SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0d28\", ATTR{idProduct}==\"0204\", MODE:=\"666\" > /etc/udev/rules.d/mbed.rules' sudo /etc/init.d/udev restart
By default there is no main.cpp and thus the mbed compile command will NOT work.
To run a app, use the provided script load_app.py.
You can directly compile and load a particular app by using load_app.py e.g.,
python load_app.py app_files/hdlc_test/. Please note that the
load_app.py will not work if there is no existing binary inside the
LPC1768's USB mass storage memory. After an mbed compile -c, there will
be a BUILD/LPC1768/GCC_ARM directory which will hold the binary.
Alternatively, to run a particular app manually:
-
Go to the app folder under e.g.,
app_files/hdlc_test/ -
Delete .mbedignore file in that folder
-
Now you can use traditional
mbed compile -cto compile the code -
After you are done, you can put back
.mbedignoreavailable fromapp_files/ignore_file/
https://docs.google.com/document/d/1zdjeOYkmbfHqdnZFqP798h9WB3x69WeN0IaHEcKrWus/edit#