javier vicente
/
MASTER_ANALOGICA
Señales analogicas
README.md@0:400fbf72c1de, 2020-12-01 (annotated)
- Committer:
- javiervicente
- Date:
- Tue Dec 01 12:32:41 2020 +0000
- Revision:
- 0:400fbf72c1de
analogica;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
javiervicente | 0:400fbf72c1de | 1 | ![](./resources/official_armmbed_example_badge.png) |
javiervicente | 0:400fbf72c1de | 2 | # Blinky Mbed OS example |
javiervicente | 0:400fbf72c1de | 3 | |
javiervicente | 0:400fbf72c1de | 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/). |
javiervicente | 0:400fbf72c1de | 5 | |
javiervicente | 0:400fbf72c1de | 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). |
javiervicente | 0:400fbf72c1de | 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).) |
javiervicente | 0:400fbf72c1de | 8 | |
javiervicente | 0:400fbf72c1de | 9 | 1. [Install Mbed CLI](https://os.mbed.com/docs/mbed-os/latest/quick-start/offline-with-mbed-cli.html). |
javiervicente | 0:400fbf72c1de | 10 | |
javiervicente | 0:400fbf72c1de | 11 | 1. Clone this repository on your system, and change the current directory to where the project was cloned: |
javiervicente | 0:400fbf72c1de | 12 | |
javiervicente | 0:400fbf72c1de | 13 | ```bash |
javiervicente | 0:400fbf72c1de | 14 | $ git clone git@github.com:armmbed/mbed-os-example-blinky && cd mbed-os-example-blinky |
javiervicente | 0:400fbf72c1de | 15 | ``` |
javiervicente | 0:400fbf72c1de | 16 | |
javiervicente | 0:400fbf72c1de | 17 | Alternatively, you can download the example project with Arm Mbed CLI using the `import` subcommand: |
javiervicente | 0:400fbf72c1de | 18 | |
javiervicente | 0:400fbf72c1de | 19 | ```bash |
javiervicente | 0:400fbf72c1de | 20 | $ mbed import mbed-os-example-blinky && cd mbed-os-example-blinky |
javiervicente | 0:400fbf72c1de | 21 | ``` |
javiervicente | 0:400fbf72c1de | 22 | |
javiervicente | 0:400fbf72c1de | 23 | |
javiervicente | 0:400fbf72c1de | 24 | ## Application functionality |
javiervicente | 0:400fbf72c1de | 25 | |
javiervicente | 0:400fbf72c1de | 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. |
javiervicente | 0:400fbf72c1de | 27 | |
javiervicente | 0:400fbf72c1de | 28 | ## Building and running |
javiervicente | 0:400fbf72c1de | 29 | |
javiervicente | 0:400fbf72c1de | 30 | 1. Connect a USB cable between the USB port on the board and the host computer. |
javiervicente | 0:400fbf72c1de | 31 | 2. <a name="build_cmd"></a> Run the following command to build the example project and program the microcontroller flash memory: |
javiervicente | 0:400fbf72c1de | 32 | ```bash |
javiervicente | 0:400fbf72c1de | 33 | $ mbed compile -m <TARGET> -t <TOOLCHAIN> --flash |
javiervicente | 0:400fbf72c1de | 34 | ``` |
javiervicente | 0:400fbf72c1de | 35 | The binary is located at `./BUILD/<TARGET>/<TOOLCHAIN>/mbed-os-example-blinky.bin`. |
javiervicente | 0:400fbf72c1de | 36 | |
javiervicente | 0:400fbf72c1de | 37 | Alternatively, you can manually copy the binary to the board, which you mount on the host computer over USB. |
javiervicente | 0:400fbf72c1de | 38 | |
javiervicente | 0:400fbf72c1de | 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: |
javiervicente | 0:400fbf72c1de | 40 | |
javiervicente | 0:400fbf72c1de | 41 | ```bash |
javiervicente | 0:400fbf72c1de | 42 | $ mbed compile -S |
javiervicente | 0:400fbf72c1de | 43 | ``` |
javiervicente | 0:400fbf72c1de | 44 | |
javiervicente | 0:400fbf72c1de | 45 | ## Expected output |
javiervicente | 0:400fbf72c1de | 46 | The LED on your target turns on and off every 500 milliseconds. |
javiervicente | 0:400fbf72c1de | 47 | |
javiervicente | 0:400fbf72c1de | 48 | |
javiervicente | 0:400fbf72c1de | 49 | ## Troubleshooting |
javiervicente | 0:400fbf72c1de | 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. |
javiervicente | 0:400fbf72c1de | 51 | |
javiervicente | 0:400fbf72c1de | 52 | ## Related Links |
javiervicente | 0:400fbf72c1de | 53 | |
javiervicente | 0:400fbf72c1de | 54 | * [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html). |
javiervicente | 0:400fbf72c1de | 55 | * [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html). |
javiervicente | 0:400fbf72c1de | 56 | * [Mbed OS Serial Communication](https://os.mbed.com/docs/latest/tutorials/serial-communication.html). |
javiervicente | 0:400fbf72c1de | 57 | * [Mbed OS bare metal](https://os.mbed.com/docs/mbed-os/latest/reference/mbed-os-bare-metal.html). |
javiervicente | 0:400fbf72c1de | 58 | * [Mbed boards](https://os.mbed.com/platforms/). |
javiervicente | 0:400fbf72c1de | 59 | |
javiervicente | 0:400fbf72c1de | 60 | ### License and contributions |
javiervicente | 0:400fbf72c1de | 61 | |
javiervicente | 0:400fbf72c1de | 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. |
javiervicente | 0:400fbf72c1de | 63 | |
javiervicente | 0:400fbf72c1de | 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. |