Tedd OKANO
/
k64f-acc-example2
aaa
Revision 0:5ee0fb58a1c8, committed 2019-03-16
- Comitter:
- kgilbert
- Date:
- Sat Mar 16 20:55:36 2019 -0500
- Child:
- 1:d78c639f6b65
- Commit message:
- Initial baremetal blinky commit
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.md Sat Mar 16 20:55:36 2019 -0500 @@ -0,0 +1,51 @@ +# Bare Metal Blinky + +This guide reviews the steps required to get Blinky with Bare Metal working on an Mbed OS platform. + +Please install [mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli). + +## Import the example application + +From the command-line, import the example: + +``` +mbed import mbed-os-example-baremetal-blinky +cd mbed-os-example-baremetal-blinky +``` + +### Now compile + +Invoke `mbed compile`, and specify the name of your platform and your favorite toolchain (`GCC_ARM`, `ARM`, `IAR`). For example, for the ARM Compiler: + +``` +mbed compile -m K64F -t ARM +``` + +Your PC may take a few minutes to compile your code. At the end, you see the following result: + +``` +[snip] +Image: ./BUILD/K64F/GCC_ARM/mbed-os-example-baremetal-blinky.bin +``` + +### Program your board + +1. Connect your mbed device to the computer over USB. +1. Copy the binary file to the mbed device. +1. Press the reset button to start the program. + +The LED on your platform turns on and off. + +## Troubleshooting + +If you have problems, you can review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html) for suggestions on what could be wrong and how to fix it. + +## Related Links + +* [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html) + +### License and contributions + +The software is provided under Apache-2.0 license. Contributions to this project are accepted under the same license. Please see contributing.md for more info. + +This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Mar 16 20:55:36 2019 -0500 @@ -0,0 +1,16 @@ +/* mbed Microcontroller Library + * Copyright (c) 2019 ARM Limited + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "mbed.h" + +#define WAIT_TIME 500 //msec + +DigitalOut led1(LED1); + +int main() +{ + led1 = !led1; + wait_ms( WAIT_TIME ); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Sat Mar 16 20:55:36 2019 -0500 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#51d55508e8400b60af467005646c4e2164738d48
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed_app.json Sat Mar 16 20:55:36 2019 -0500 @@ -0,0 +1,3 @@ +{ + "requires": ["bare-metal"] +}