You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-12Lines changed: 15 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Blinky Mbed OS Example
2
2
3
-
The example project contains variants of an application to blink an LED on supported [Mbed boards](https://os.mbed.com/platforms/).
3
+
The example project contains an application to blink an LED on supported [Mbed boards](https://os.mbed.com/platforms/).
4
4
5
5
The project can be built 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). Please install Arm Mbed CLI.
6
6
@@ -14,18 +14,11 @@ Clone this repository on your system and change the current directory to where t
14
14
15
15
Modifying default Mbed OS configuration parameters can be done at application level using an application configuration file. By default ARM Mbed CLI looks for [`mbed_app.json`](https://os.mbed.com/docs/mbed-os/latest/reference/configuration.html), however the configuration file can be named anything. It can be passed to ARM Mbed CLI using the optional argument `--app-config` of the `compile` sub-command. This project comes with configuration files for the different variants and configurations of the blinky application.
16
16
17
-
Select the section for the variant of the application you wish to build:
The `main()` function is the single thread in the application, it toggles the state of a digital output connected to an LED on the target.
23
20
24
-
### Application functionality
25
-
26
-
The `main()` function calls `blinky_wait()`, as part of the single thread, which toggles the state of a digital output connected to an LED on the target.
27
-
28
-
### <aname="build_blinky_wait_rtos"></a> Building and Running
21
+
## Building and Running
29
22
30
23
1. Connect a USB cable between the USB port on the target and the host computer.
31
24
2. Run the following command to build the example project and program the microcontroller flash memory:
@@ -34,6 +27,7 @@ The `main()` function calls `blinky_wait()`, as part of the single thread, which
34
27
```
35
28
The binary is located at `./BUILD/<TARGET>/<TOOLCHAIN>/mbed-os-example-blinky.bin` and can alternatively be manually copied to the target which gets mounted on the host computer via USB.
36
29
30
+
<<<<<<< HEAD
37
31
<<<<<<< HEAD
38
32
### Application functionality
39
33
@@ -45,17 +39,23 @@ The `main()` function calls `blinky_rtos()`, as part of the main thread, which s
45
39
The variant of the application [above](#build_blinky_wait_rtos) is built with the full Mbed OS library including its RTOS components. However, for single-threaded applications running on targets with ultraconstrains, it is possible to obtain an application with an even smaller memory footprint using [Mbed OS bare metal](https://os.mbed.com/docs/mbed-os/latest/reference/mbed-os-bare-metal.html) profile.
46
40
An application configuration file, [`config_blinky_wait_bare_metal.json`](./blinky_wait/config_blinky_wait_bare_metal.json) is provided to build a binary with Mbed OS bare metal profile.
47
41
>>>>>>> Add application variants and Mbed OS bare metal tutorial
42
+
=======
43
+
## Bare metal
44
+
The application above is built with the full Mbed OS library including its RTOS components. However, for single-threaded applications running on targets with ultraconstrains, it is possible to obtain an application with an even smaller memory footprint using [Mbed OS bare metal](https://os.mbed.com/docs/mbed-os/latest/reference/mbed-os-bare-metal.html) profile.
45
+
An application configuration file, [`config_bare_metal.json`](./config_bare_metal.json) is provided to build a binary with Mbed OS bare metal profile.
46
+
>>>>>>> Remove multithreaded application
48
47
49
48
1. Connect a USB cable between the USB port on the target and the host computer.
50
49
2. Run the following command to build the example project with runtime statistics output:
The binary is located at `./BUILD/<TARGET>/<TOOLCHAIN>/mbed-os-example-blinky.bin` and can alternatively be manually copied to the target which gets mounted on the host computer via USB.
55
54
56
55
`"target.default_lib":"small"` tells the build tool to use a small implementation of the C standard library for the toolchain selected if available. That would be Newlib-nano and MicroLib for GCC_ARM and ARM toolchains respectively.
This variant shows Mbed OS features suchs as threads, thread delay, and inter-thread communication to blink an LED.
@@ -74,6 +74,9 @@ The `main()` function calls `blinky_multithreaded()`, as part of the main thread
74
74
The binary is located at `./BUILD/<TARGET>/<TOOLCHAIN>/mbed-os-example-blinky.bin` and can alternatively be manually copied to the target which gets mounted on the host computer via USB.
75
75
76
76
### Optional RTOS runtime statistics
77
+
=======
78
+
## Optional RTOS runtime statistics
79
+
>>>>>>> Remove multithreaded application
77
80
78
81
It is possible to take a snapshot of the device's runtime statistics and display it over serial to your PC. See how [here](https://os.mbed.com/docs/latest/apis/mbed-statistics.html).
0 commit comments