How to build micro library build target by Mbed CLI

This notebook explain how to build micro library build (uARM) target such as LPC824 by offline compiler using Mbed CLI .

Setup

$ mbed import https://os.mbed.com/teams/mbed/code/mbed_blinky/
$ cd mbed_blinky

Change settings

Open targets.json file by text editor:

{project_file}\mbed\a97add6d7e64\targets.json

Information

Directory name under the {project_file}\mbed contains Mbed library version (release hash), so your project may have different name.

Information

Your project may not have targets.json depending on Mbed library version. In that case, you should you the file below:

{project_file}\.temp\tools\legacy_targets.json

Search you targe board name in the json file (e.g. SSCI824 for Switch Science LPC824). You can find the target name from top right of the board page.

/media/uploads/MACRUM/---------_2017-10-11_18.23.02.png

Add "ARM" to the “supported_toolchains”

[Before] "supported_toolchains": ["uARM", "GCC_ARM"],

{After] "supported_toolchains": ["uARM", "GCC_ARM", "ARM"],

Save and close the file.

Open directory below by explorer.

{project_file}\mbed\a97add6d7e64\TARGET_SSCI824

Copy TOOLCHAIN_ARM_MICRO folder and paste it. Change the name to TOOLCHAIN_ARM.

Build your project by command below.

$ mbed compile -m SSCI824 -t ARM

Copy the binaly file to your target baord (or, specify -f option with mbed compile command).

{project_file}\BUILD\SSCI824\ARM\{project_file}.bin


2 comments on How to build micro library build target by Mbed CLI:

07 Sep 2018

target向けの binaryをコンパイルする事例はたくさんあります。

mbed cli commandで 独自ライブラリ、.libをbuild/compileするにはどのようにすれば良いのでしょうか。

23 Oct 2018

ライブラリのビルドは、こちらに説明があります。 https://github.com/ARMmbed/mbed-cli#compiling-static-libraries

Please log in to post comments.