Mode1 Optical Validation

Dependencies:   max32630fthr

Committer:
phonemacro
Date:
Wed Jun 01 18:42:12 2022 +0000
Revision:
66:d4989829a23d
Parent:
0:6f65cae31c54
updated xtalk

Who changed what in which revision?

UserRevisionLine numberNew contents of line
phonemacro 0:6f65cae31c54 1 ![](./resources/official_armmbed_example_badge.png)
phonemacro 0:6f65cae31c54 2 # Blinky Mbed OS example
phonemacro 0:6f65cae31c54 3
phonemacro 0:6f65cae31c54 4 The example project is part of the [Arm Mbed OS Official Examples](https://os.mbed.com/code/) and is the [getting started example for Mbed OS](https://os.mbed.com/docs/mbed-os/v5.14/quick-start/index.html). It contains an application that repeatedly blinks an LED on supported [Mbed boards](https://os.mbed.com/platforms/).
phonemacro 0:6f65cae31c54 5
phonemacro 0:6f65cae31c54 6 You can build the project with all supported [Mbed OS build tools](https://os.mbed.com/docs/mbed-os/latest/tools/index.html). However, this example project specifically refers to the command-line interface tool [Arm Mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli).
phonemacro 0:6f65cae31c54 7 (Note: To see a rendered example you can import into the Arm Online Compiler, please see our [import quick start](https://os.mbed.com/docs/mbed-os/latest/quick-start/online-with-the-online-compiler.html#importing-the-code).)
phonemacro 0:6f65cae31c54 8
phonemacro 0:6f65cae31c54 9 1. [Install Mbed CLI](https://os.mbed.com/docs/mbed-os/latest/quick-start/offline-with-mbed-cli.html).
phonemacro 0:6f65cae31c54 10
phonemacro 0:6f65cae31c54 11 1. Clone this repository on your system, and change the current directory to where the project was cloned:
phonemacro 0:6f65cae31c54 12
phonemacro 0:6f65cae31c54 13 ```bash
phonemacro 0:6f65cae31c54 14 $ git clone git@github.com:armmbed/mbed-os-example-blinky && cd mbed-os-example-blinky
phonemacro 0:6f65cae31c54 15 ```
phonemacro 0:6f65cae31c54 16
phonemacro 0:6f65cae31c54 17 Alternatively, you can download the example project with Arm Mbed CLI using the `import` subcommand:
phonemacro 0:6f65cae31c54 18
phonemacro 0:6f65cae31c54 19 ```bash
phonemacro 0:6f65cae31c54 20 $ mbed import mbed-os-example-blinky && cd mbed-os-example-blinky
phonemacro 0:6f65cae31c54 21 ```
phonemacro 0:6f65cae31c54 22
phonemacro 0:6f65cae31c54 23
phonemacro 0:6f65cae31c54 24 ## Application functionality
phonemacro 0:6f65cae31c54 25
phonemacro 0:6f65cae31c54 26 The `main()` function is the single thread in the application. It toggles the state of a digital output connected to an LED on the board.
phonemacro 0:6f65cae31c54 27
phonemacro 0:6f65cae31c54 28 ## Building and running
phonemacro 0:6f65cae31c54 29
phonemacro 0:6f65cae31c54 30 1. Connect a USB cable between the USB port on the board and the host computer.
phonemacro 0:6f65cae31c54 31 2. <a name="build_cmd"></a> Run the following command to build the example project and program the microcontroller flash memory:
phonemacro 0:6f65cae31c54 32 ```bash
phonemacro 0:6f65cae31c54 33 $ mbed compile -m <TARGET> -t <TOOLCHAIN> --flash
phonemacro 0:6f65cae31c54 34 ```
phonemacro 0:6f65cae31c54 35 The binary is located at `./BUILD/<TARGET>/<TOOLCHAIN>/mbed-os-example-blinky.bin`.
phonemacro 0:6f65cae31c54 36
phonemacro 0:6f65cae31c54 37 Alternatively, you can manually copy the binary to the board, which you mount on the host computer over USB.
phonemacro 0:6f65cae31c54 38
phonemacro 0:6f65cae31c54 39 Depending on the target, you can build the example project with the `GCC_ARM`, `ARM` or `IAR` toolchain. After installing Arm Mbed CLI, run the command below to determine which toolchain supports your target:
phonemacro 0:6f65cae31c54 40
phonemacro 0:6f65cae31c54 41 ```bash
phonemacro 0:6f65cae31c54 42 $ mbed compile -S
phonemacro 0:6f65cae31c54 43 ```
phonemacro 0:6f65cae31c54 44
phonemacro 0:6f65cae31c54 45 ## Expected output
phonemacro 0:6f65cae31c54 46 The LED on your target turns on and off every 500 milliseconds.
phonemacro 0:6f65cae31c54 47
phonemacro 0:6f65cae31c54 48
phonemacro 0:6f65cae31c54 49 ## Troubleshooting
phonemacro 0:6f65cae31c54 50 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.
phonemacro 0:6f65cae31c54 51
phonemacro 0:6f65cae31c54 52 ## Related Links
phonemacro 0:6f65cae31c54 53
phonemacro 0:6f65cae31c54 54 * [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html).
phonemacro 0:6f65cae31c54 55 * [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html).
phonemacro 0:6f65cae31c54 56 * [Mbed OS Serial Communication](https://os.mbed.com/docs/latest/tutorials/serial-communication.html).
phonemacro 0:6f65cae31c54 57 * [Mbed OS bare metal](https://os.mbed.com/docs/mbed-os/latest/reference/mbed-os-bare-metal.html).
phonemacro 0:6f65cae31c54 58 * [Mbed boards](https://os.mbed.com/platforms/).
phonemacro 0:6f65cae31c54 59
phonemacro 0:6f65cae31c54 60 ### License and contributions
phonemacro 0:6f65cae31c54 61
phonemacro 0:6f65cae31c54 62 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.
phonemacro 0:6f65cae31c54 63
phonemacro 0:6f65cae31c54 64 This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide.