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
- Install Mbed CLI
https://github.com/ARMmbed/mbed-cli#installing-mbed-cli - Install Keil MDK-ARM
https://www.keil.com/demo/eval/arm.htm - Publish your project by online IDE ( or publish - unlisted)
- Import your project by Mbed CLI (e.g. mbed_blinky)
$ 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.
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:
Please log in to post comments.
target向けの binaryをコンパイルする事例はたくさんあります。
mbed cli commandで 独自ライブラリ、.libをbuild/compileするにはどのようにすれば良いのでしょうか。