Back to Mbed
Look at the GCC4ARM Setup guide for a much more detailed explanation of how to set up libraries.
Setting up Run Configurations
- In the eclipse project add the PTII environment variable under Run->Run Configurations..
- Here make sure that the left panel is at Java Application->Vergil
- On the environment tab click on the "New.." button and add a variable called "PTII" and it's value being "<path-to-ptII-folder>"
Setup gcc for arm and mbed Library
- Download from this link: https://launchpad.net/gcc-arm-embedded
- Create a folder named
mbed
at the file location $PTII/vendors/
- Unzip the downloaded gcc-arm files into the created folder in
$PTII/vendors/mbed/
- Rename the folder to gcc-arm. It would have been gcc-arm-none-eabi-4_9-201XqY or something similar.
Exporting mbed Libraries
- Create a folder within your
mbed
folder titled libraries
- You can export libraries from the mbed website. Make sure that when you export you have the right target and toolchain.
- Start by exporting the "mbed" library from here and choosing "Export to desktop IDE"
- Choose the platform. For example, we used the platform "FRDM-KL25Z"
- The toolchain is "GccArm"
- Once you download this file, unzip it and move it to the libraries folder you created. Then navigate into the folder with the library in a terminal window.
- You don't need to build the mbed library. Just need to reference it correctly
Adding other Libraries
These changes need to be made to the Makefile for each library you download.
- You need to add the ../mbed include paths, for the specific target, add the following to the
INCLUDE_PATHS
argument, after the existing paths.
- For KL25Z Target
- INCLUDE_PATHS =
Include already present in make file, then add
-I../mbed -I../mbed/TARGET_KL25Z -I../mbed/TARGET_KL25Z/TARGET_Freescale/TARGET_KLXX -I../mbed/TARGET_KL25Z/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z
- Add or fix any other dependencies that the library relies.
- Following instructions from http://developer.mbed.org/questions/845/When-will-export-to-KL25Z-GCC-ARM-Embedd/
- LINKER_SCRIPT = ../mbed/TARGET_KL25Z/TOOLCHAIN_GCC_ARM/MKL25Z4.ld
- Change the .cpp: build argument to use gnu+11 instead of gnu+98. It should look like the following:
- $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++11 -fno-rtti $(INCLUDE_PATHS) -o $@ $<
- Navigate to the folder with the makefile using a terminal, and run the
make
command.
List of Libraries are used
TODO: Add links and all libraries, and special notes for makefiles.