Thursday 15 November 2018

Getting started mbed OS on Linux with STM32L433

This is RTOS from ARM. This makes the embedded development really easy. Following are the steps to install on Linux machine
0) Make sure you have install python and other required libraries

$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 python-pip


1) Install VirtualEnv
$ sudo pip install virtualenv

2) Download GCC ARM toolchain from https://launchpad.net/gcc-arm-embedded/+milestone/7-2018-q2-update and unzip it at preferred location. (Mine is /opt/compiler)

3) Start VirtualEnv.
$ virtualenv mbedos
$ source mbedos/bin/activate

4) Config the COMPILER PATH. On my PC arm toolchain is at /opt/compiler/gcc-arm-none-eabi
 $ mbed config -G GCC_ARM_PATH /opt/compiler/gcc-arm-none-eabi/bin/

5) Download "hello world" source code

$ mbed import https://github.com/ARMmbed/mbed-os-example-blinky


6) One can easily compile and flash the code using following instruction. I am using STM32L433 board for this test. It will take couple of minutes to build the code. Once the code is build, utility will flash it to reference-board.

$ cd mbed-os-example-blinky/
$ mbed compile -v --target NUCLEO_L433RC_P --toolchain GCC_ARM --flash