Setting up Mbed in linux

Mbed is a sdk that provide a easier interface for programming the arm based microcontroller. It is compatible with most oarm based processor.
It support rtos, usbasp, dsp etc. Its contains hal and cmisis layer for most of the microcontroller. Mbed is provided online, but if you want to setup mbed in your linux machine no worry , here is a step by step procedure for
setting up mbed in your linux platfrom.


Steps for Setup

Here are simple steps for setup

MakeFile



DIRNAME=$(shell basename $(realpath ./))
MAKEFILE_PATH=$(realpath ../../../mbed/workspace_tools/make.py)
BUILD_DIR=$(realpath ../../build/)
SOURCE_PATH=$(realpath ./)
BUILD_PATH=$(BUILD_DIR)/$(DIRNAME)
MCU=NUCLEO_F091RC
TOOLCHAIN=GCC_ARM
MCU_DIR=/run/media/anshuman/NUCLEO/
FLAGS=""
all:
    $(MAKEFILE_PATH) --source=$(SOURCE_PATH) --build=$(BUILD_PATH) -m \$(MCU) -t $(TOOLCHAIN) $(FLAGS)
upload:
     cp $(BUILD_PATH)/$(DIRNAME).bin $(MCU_DIR)
clean:
    rm -r $(BUILD_PATH)
help:
     $(MAKEFILE_PATH) --help

private_settings.py



SERVER_ADDRESS = "127.0.0.1"
LOCALHOST = "127.0.0.1"
GCC_ARM_PATH ='Your Arm gcc path'