Recent Changes - Search:

edit SideBar

OfflineMbedLibrarySetup

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

  1. In the eclipse project add the PTII environment variable under Run->Run Configurations..
  2. Here make sure that the left panel is at Java Application->Vergil
  3. 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

  1. Download from this link: https://launchpad.net/gcc-arm-embedded
  2. Create a folder named mbed at the file location $PTII/vendors/
  3. Unzip the downloaded gcc-arm files into the created folder in $PTII/vendors/mbed/
  4. Rename the folder to gcc-arm. It would have been gcc-arm-none-eabi-4_9-201XqY or something similar.

Exporting mbed Libraries

  1. Create a folder within your mbed folder titled libraries
  2. You can export libraries from the mbed website. Make sure that when you export you have the right target and toolchain.
    1. Start by exporting the "mbed" library from here and choosing "Export to desktop IDE"
    2. Choose the platform. For example, we used the platform "FRDM-KL25Z"
    3. The toolchain is "GccArm"
  3. 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.
  4. 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.

  1. 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.
  2. 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
  3. 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 $@ $<
  4. 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.

Edit - History - Print - Recent Changes - Search
Page last modified on April 25, 2015, at 03:16 AM