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: docs/APIs/intro.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@
2
2
3
3
mbed OS lets you write applications that run on embedded devices, by providing the layer that interprets your application's code in a way the hardware can understand.
4
4
5
-
Your application code - written in C++ - uses the application programing interfaces (APIs) presented by mbed OS to receive information from the hardware and send instructions to it. This means that a lot of the challenges in getting started with microcontrollers or integrating large amounts of software is already taken care of.
5
+
Your application code is written in C++. It uses the application programming interfaces (APIs) that mbed OS provides. These APIs allow your code to work on different microcontrollers in a uniform way. This reduces a lot of the challenges in getting started with microcontrollers and integrating large amounts of software.
6
6
7
-
To learn how to use the APIs to write your application, we'll start by reviewing how to use them to [control the flow of the application by managing its tasks](../getting_started/flow_control.md). We'll also introduce simple input and output controls.
7
+
To use the APIs to write your application, start by reviewing how to use them to [control the flow of the application by managing its tasks](../getting_started/flow_control.md). We'll also introduce simple input and output controls.
8
8
9
-
Once you're familiar with the basic concepts, you can move on to more advances examples that will demonstrate a broader use of the APIs:
9
+
Once you're familiar with the basic concepts, you can move on to more advanced examples that will demonstrate a broader use of the APIs:
10
10
11
11
*[Building an internet connected lighting system](https://docs.mbed.com/docs/building-an-internet-connected-lighting-system/en/latest/).
12
12
*[Building a LoRa network](https://docs.mbed.com/docs/lora-with-mbed/en/latest/).
13
13
* Or any of the other examples [on our full list](https://docs.mbed.com/docs/examples-list/en/latest/).
14
14
15
-
<spanclass="tips">The full API references are [here](https://docs.mbed.com/docs/mbed-os-api-reference/). The [doxygen is here](https://docs.mbed.com/docs/mbed-os-api/en/mbed-os-5.2/api/index.html).</span>
15
+
<spanclass="tips">The full API references are [here](https://docs.mbed.com/docs/mbed-os-api-reference/). The [doxygen is here](https://docs.mbed.com/docs/mbed-os-api/en/mbed-os-5.3/api/index.html).</span>
Copy file name to clipboardExpand all lines: docs/advanced/MINAR_migration.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ If you don't like asynchronous programming, or if you wrote your code in asynchr
60
60
61
61
## Porting strategy 2: use the optional mbed OS 5 event loop
62
62
63
-
To help ease porting MINAR applications, and to provide support for asynchronous style programming, mbed OS 5 provides an optional event loop. The main documentation for the event loop can be found [here](https://docs.mbed.com/docs/mbed-os-api-reference/en/5.2/APIs/tasks/events/). In short, the mbed OS 5 event loop implementation consists of an [EventQueue class](https://github.com/ARMmbed/mbed-os/blob/master/events/EventQueue.h) that implements the storage for the events and has a `dispatch` function. There are quite a few differences between MINAR and `EventQueue`:
63
+
To help ease porting MINAR applications, and to provide support for asynchronous style programming, mbed OS 5 provides an optional event loop. The main documentation for the event loop can be found [here](https://docs.mbed.com/docs/mbed-os-api-reference/en/5.3/APIs/tasks/events/). In short, the mbed OS 5 event loop implementation consists of an [EventQueue class](https://github.com/ARMmbed/mbed-os/blob/master/events/EventQueue.h) that implements the storage for the events and has a `dispatch` function. There are quite a few differences between MINAR and `EventQueue`:
64
64
65
65
- MINAR and the mbed OS 5 event loop have incompatible APIs.
66
66
- Both MINAR and `EventQueue` work with *events* (objects that are placed in the event queue). However, the interface and implementations of events in MINAR and mbed OS 5 are different, and that's also true for the APIs that use them. Take a look at [the Callback class](https://github.com/ARMmbed/mbed-os/blob/master/platform/Callback.h), [the Event class](https://github.com/ARMmbed/mbed-os/blob/master/events/Event.h) and [the EventQueue class](https://github.com/ARMmbed/mbed-os/blob/master/events/EventQueue.h) for more details about the mbed OS 5 implementation.
@@ -71,7 +71,7 @@ To help ease porting MINAR applications, and to provide support for asynchronous
71
71
72
72
Keep in mind that even if you choose to use the mbed OS 5 event loop, the RTOS is always present, so you need to consider all the RTOS-specific issues (such as synchronization).
73
73
74
-
If you want to keep the asynchronous aspect of your mbed OS 3 application, the best way to proceed is to read the [documentation of the mbed OS event loop](https://docs.mbed.com/docs/mbed-os-api-reference/en/5.2/APIs/tasks/events/) and rewrite your application using the new APIs. Here are some rough API compatibility guides:
74
+
If you want to keep the asynchronous aspect of your mbed OS 3 application, the best way to proceed is to read the [documentation of the mbed OS event loop](https://docs.mbed.com/docs/mbed-os-api-reference/en/5.3/APIs/tasks/events/) and rewrite your application using the new APIs. Here are some rough API compatibility guides:
75
75
76
76
- The MINAR function `postCallback` can be replaced with `EventQueue::call`.
77
77
- The MINAR function `delay` can be replaced with `EventQueue::call_in`.
# Porting guide: adding target support to mbed OS 5
2
-
3
-
There are two typical ways to add target support to mbed OS: Either you'll be adding a [completely new microcontroller](#adding-a-new-microcontroller) and board, or you'll be adding a new board that contains an [already-supported microcontroller](#adding-a-new-board-or-module).
4
-
5
-
There is a dependency on CMSIS-CORE and CMSIS-Packs, so make sure the microcontroller already has these available.
6
-
7
-
## Adding a new microcontroller
8
-
9
-
Add the empty target implementation reference to the working directory using:
There are a number of files needed before a first successful compile. CMSIS-CORE files are needed for start-up and peripheral memory addresses as well as the linker scripts for ARM, IAR and GCC toolchains. These files are usually in the ```mbed-os\targets\TARGET_VENDOR\TARGET_MCU_FAMILY\TARGET_MCUNAME\device``` directory.
42
-
43
-
If the microcontroller has a SYS_TICK the RTOS will configure this, so only a few macros are needed in ```mbed-os\targets\TARGET_VENDOR\mbed-rtx.h```.
44
-
45
-
Some extensions to CMSIS-CORE are also required for dynamic vector relocation. ```mbed-os\targets\TARGET_VENDOR\TARGET_MCUNAME\cmsis.h``` is the entry point to the target for mbed OS software. This will include the vector relocation additions and device-specific headers that include CMSIS-CORE. A relocation routine is needed in ```mbed-os\targets\TARGET_VENDOR\TARGET_MCUNAME\cmsis_nvic.c and .h```
46
-
47
-
Now verify your target is identified by using ```mbed compile -m MCU_NAME -t <toolchain>```. This should compile.
48
-
49
-
The next step is to enable the test harness dependencies. To run the test suite there is a minimum requirement of GPIO, microsecond ticker and serial implementation, all explained below.
50
-
51
-
### GPIO
52
-
53
-
The ```gpio_s``` is for referencing memory-mapped GPIO registers and passing related pin information or other IO operation data that the HAL needs. These structures are defined in ```objects.h```. The required implementation definition is in ```mbed-os\hal\gpio_api.h```.
54
-
55
-
### SERIAL
56
-
57
-
The ```serial_s``` is for referencing memory-mapped Serial registers and passing related pin and peripheral operation information data that the HAL needs. These structures are defined in ```objects.h```. The required implementation definition is in ```mbed-os\hal\serial_api.h```.
58
-
59
-
### US TICKER
60
-
61
-
The microsecond ticker is a system resource that is used for many API and other timing utilities. It needs a one microsecond resolution and should be implemented using a free-running hardware counter or timer with match register.
62
-
The required implementation definition is in ```mbed-os\hal\us_ticker_api.h```.
63
-
64
-
At this point, we should be able to compile a handful of tests:
65
-
66
-
``mbed test -m BOARD_NAME --compile -t <toolchain>``
67
-
68
-
To execute the tests you'll need to already support [mbed-ls](https://github.com/armmbed/mbed-ls).
69
-
70
-
### All the others
71
-
72
-
At this point, the HAL structure should be familiar as a programming model. There are many more APIs to implement, which are enabled by adding a ```device_has``` attribute to the MCU_NAME and then providing the implementation.
Copy file name to clipboardExpand all lines: docs/dev_tools/online_comp.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The compiler is always available on [https://developer.mbed.org/compiler/](https
12
12
13
13
There are two methods of importing the code into the online compiler: directly from a program presented on the site, or using the compiler’s Import button:
14
14
15
-
1. Directly from the site: wherever you see a program on the site, you should see an Import button:
15
+
1. Directly from the site: wherever you see a program on the site, you should see an **Import into mbed IDE** button:
16
16
17
17
<span class="images"><span>Most code snippets on the site can be directly imported</span></span>
18
18
@@ -33,27 +33,27 @@ There are two methods of importing the code into the online compiler: directly f
33
33
34
34
## Creating a new program
35
35
36
-
1. From the **New** menu, select **Program**:
36
+
1. From the **New** menu, select **New Program**:
37
37
38
38
<span class="images"><span>The applications list</span>Triggering a new program</span>
39
39
40
40
1. The **Create new program** pop-up opens.
41
41
1. Select your platform (board).
42
-
1. You can create from an existing template, or from an empty program.
42
+
1. You can create from an existing template or from an empty program.
43
43
1. Enter a unique name.
44
44
45
45
<span class="images"><span>Creating a new program</span></span>
46
46
47
47
1. Create a ``main.cpp`` file in your program:
48
-
1. Right click on the program and select **New File...**. The **Create new file** popup opens.
48
+
1. Right click on the program and select **New File...**. The **Create new file** pop-up opens. If you created from an existing template, this file already exists.
49
49
50
50
<span class="images"><span>Adding a file</span></span>
51
51
52
52
1. Enter ``main.cpp`` as the file name.
53
53
54
54
<span class="images"><span>Naming the new file</span></span>
55
55
56
-
1. Import the mbed OS library so you can build your program with the mbed OS code base:
56
+
1. Import the mbed OS library, so you can build your program with the mbed OS codebase:
57
57
1. Click **Import**. The Import Wizard opens.
58
58
1. Go to the Libraries tab and search for "mbed", or perform an empty search to show all libraries:
59
59
@@ -73,7 +73,7 @@ The mbed Online Compiler builds a file that can run on your board. All you need
73
73
74
74
### Selecting your board
75
75
76
-
mbed programs can be built to run on multiple boards. The hard work is done behind the scenes, by mbed OS itself. All you need to do is tell the mbed Online Compiler which board you're building for.
76
+
mbed programs can be built to run on multiple boards. The hard work is done behind the scenes by mbed OS itself. All you need to do is tell the mbed Online Compiler which board you're building for.
77
77
78
78
To select a board as the build target:
79
79
@@ -123,7 +123,7 @@ Your board should appear on your computer as removable storage. To run your prog
123
123
| Shift + Page Up | Select from current position up one page |
124
124
| Shift + Page Down | Select from current position down one page |
125
125
| Shift + any arrow | Extend or reduce text selection |
126
-
| Ctrl + left arrow | Go to beginning of the previous word |
126
+
| Ctrl + left arrow | Go to beginning of current or previous word |
127
127
| Ctrl + right arrow | Go to beginning of the next word |
128
128
| Ctrl + up arrow | Scroll up one row |
129
129
| Ctrl + down arrow | Scroll down one row |
@@ -153,8 +153,8 @@ Your board should appear on your computer as removable storage. To run your prog
153
153
| Ctrl + Shift + S | Save all |
154
154
| Ctrl + U| Change select text to upper case |
155
155
| Ctrl + V | Paste text from clipboard |
156
-
| Ctrl + W | Close current file (doesn't work on Chrome |
157
-
| Ctrl + Shift + W | Close all (doesn't work on Chrome |
156
+
| Ctrl + W | Close current file (doesn't work on Chrome)|
157
+
| Ctrl + Shift + W | Close all (doesn't work on Chrome)|
158
158
| Ctrl + X | Cut selected text |
159
159
| Ctrl + Y | Redo |
160
160
| Ctrl + Z | Undo |
@@ -171,8 +171,8 @@ Your board should appear on your computer as removable storage. To run your prog
Copy file name to clipboardExpand all lines: docs/dev_tools/options.md
+4-8Lines changed: 4 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,22 +2,18 @@
2
2
3
3
We developed mbed OS 5 using the mbed CLI tool, which is a Python program that coordinates builds and fetches all the dependencies of an mbed OS application. As this runs on your local development machine, you also need compilers and other build tools installed.
4
4
5
-
mbed OS 5 is compatible with the tools, libraries and programs that have been deployed on the developer.mbed.org site since mbed's origins, so you can also use the mbed Online Compiler for building mbed OS 5 examples and programs. Furthermore, the exporters to third party development tools that were part of the mbed OS 2 ecosystem can also be used.
5
+
mbed OS 5 is compatible with the tools, libraries and programs that have been deployed on the developer.mbed.org site since mbed's origin, so you can also use the mbed Online Compiler for building mbed OS 5 examples and programs. Furthermore, you can use the exporters to third party development tools that were part of the mbed OS 2 ecosystem.
6
6
7
-
Finally, we are experimenting with a Cloud9-based mbed Enabled IDE, which is currently in an alpha state and can be tested using the instructions below.
7
+
Use the instructions below to test our Cloud9-based mbed Enabled IDE, which is currently in an alpha state.
8
8
9
9
## mbed CLI
10
10
11
-
The mbed commandline tool (mbed CLI) was created specifically for mbed OS 5 and is a Python-based tool. For more information, see the [mbed CLI page](cli.md).
11
+
We created the mbed command-line tool (mbed CLI), a Python-based tool, specifically for mbed OS 5. For more information, see the [mbed CLI page](cli.md).
12
12
13
13
## mbed Online Compiler
14
14
15
15
The mbed Online Compiler is our in-house IDE, and should be familiar to anyone who's been working with mbed for a while. For more information, see the [Online Compiler page](online_comp.md).
16
16
17
-
## mbed Studio
18
-
19
-
mbed Studio is an mbed Enabled IDE based on Cloud9 and offers a rich development environment. It is currently in alpha and should be considered experimental. It can be tried by selecting 'mbed Studio' from the 'Import Program' dropdown on our code samples.
20
-
21
17
## Third party development tools
22
18
23
-
You can export your project from any of our tools to third party tools. For instructions, as well as tool-specific information, see [the Exporting to Third Party Toolchains page](third_party.md).
19
+
You can export your project from any of our tools to third party tools. For instructions, as well as tool-specific information, see [the Exporting to third party toolchains page](third_party.md).
0 commit comments