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/tools/offline/mbed-studio.md
+25-11Lines changed: 25 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
<h2id="mbed-studio">Arm Mbed Studio</h2>
1
+
<h2id="mbed-studio">Arm Mbed Studio alpha</h2>
2
2
3
3
Arm Mbed Studio is a local development environment for Mbed OS projects. This document helps Mbed OS developers use Mbed Studio to code, run, and debug Mbed OS programs to supported Mbed Enabled devices. The Mbed Studio project is based on the Eclipse framework and extends Eclipse’s IDE capability to provide a more focused experience for developing with Mbed OS. In particular, it allows users to develop and run code offline. It also provides access to existing online resources.
4
4
@@ -54,7 +54,21 @@ Double-click on the `main.cpp` file to open it in Mbed Studio’s editor. This f
54
54
55
55
<spanclass="images"><span>Explore your new project.</span></span>
56
56
57
-
##### Connecting a board
57
+
#### Adding libraries to a project
58
+
59
+
Mbed Studio currently supports importing libraries from GitHub. To import a library, right click on the `Mbed Projects` view and select `Import`. Now click `Mbed > Import Mbed library into existing project`. Choose the program that you want to add the library to.
60
+
61
+
<spanclass="images"><span>Import an Mbed library.</span></span>
62
+
63
+
Next, choose a library and copy the URL for the GitHub repository.
64
+
65
+
<spanclass="images"><span>Choose a library from GitHub.</span></span>
66
+
67
+
Click `Finish`, and Mbed Studio will add the library to your program of choice.
68
+
69
+
<spanclass="images"><span>The imported library in the workspace.</span></span>
70
+
71
+
### Connecting a board
58
72
59
73
Connect an [Mbed Enabled development board](https://os.mbed.com/platforms/) to your machine, or select a target development board from the target dropdown. Mbed Studio detects the board, and a dialog asks to switch targets. Accept this, and you are ready to build and run the example.
60
74
@@ -66,7 +80,7 @@ Connect an [Mbed Enabled development board](https://os.mbed.com/platforms/) to y
66
80
67
81
This section covers the necessary steps of building and running the project on a connected board. Mbed Studio must recognize the board for the instructions in the Run section to work.
68
82
69
-
#####Build
83
+
### Build
70
84
71
85
Before you can run the program, Mbed Studio needs to build a binary using a compiler. For the alpha version of Mbed Studio this compiler is GCC. There are multiple ways to start a build, but the easiest is to click the build icon.
72
86
@@ -78,21 +92,21 @@ Alternatively, you can choose to build the project automatically through the men
78
92
79
93
Once the build completes, the build artifacts, such as the .bin and .elf binaries, are in the `BUILD` folder under the active project.
80
94
81
-
#####Further exploration
95
+
#### Further exploration
82
96
83
97
Once you have built a project for a given target board, Eclipse can also index the `mbed-os-example-blinky` project, which means that it creates the appropriate mappings for the selected target. You can refresh this index by right-clicking on the project and selecting `Index > Freshen all files`. After Eclipse completes the indexing process, you can use the `Open declaration` function, or `F3` as a shortcut while hovering over a pin name, such as `led1`. This allows you to look through the dependency tree of the application and explore the underlying Mbed OS library.
84
98
85
99
<spanclass="images"><span>Press F3 to open a declaration, such as an IO pin name.</span></span>
86
100
87
-
#####Building automatically
101
+
#### Building automatically
88
102
89
103
Mbed Studio uses the tools built into Mbed OS to determine what builds and where the output of a build goes. The build tools build on request or (if the `Project > Build Automatically` option is checked) when you change and save a source file. The build operation only builds components that have changed and does nothing if nothing changed. Mbed Studio regards all projects in the workspace as part of the same system, so it initially builds all projects. Pressing the build button also ensures that all workspace projects build (if required).
90
104
91
105
The aim is to maintain a system that is always in a built state, providing rapid error feedback to developers as they make changes.
92
106
93
107
Under some circumstances (in particularly large projects, or when the target device changes frequently), you may wish to turn off automatic builds and build individual projects on request. To do this, select Build from the project right-click menu.
94
108
95
-
#####Run
109
+
### Run
96
110
97
111
Now that you have built the `mbed-os-example-blinky project`, you can run it on your target board. Running a project consists of several phases, which you can abstract if you click the green run icon.
98
112
@@ -112,13 +126,13 @@ To make it happen, click the green run icon to launch the default run configurat
112
126
113
127
Watch the primary LED on your connected target begin to blink!
114
128
115
-
#### Debugging
129
+
###Debug
116
130
117
131
Now that you have learned the basics of Mbed Studio, it is time to learn how to debug projects within the IDE. There is a debug configuration specifically for debugging Mbed OS projects, which generates automatically. To launch a debug session on your development board, click the debug icon.
118
132
119
133
There are also additional configurations for more advanced debugging. This section covers the Mbed OS debug configuration, as well as the advanced PyOCD GDB debug configuration.
120
134
121
-
#####Simple debugging
135
+
#### Simple debugging
122
136
123
137
To begin debugging, click the bug icon, which launches the default debug configuration. A prompt asks you to switch to the debug perspective. Click `Yes` to switch. The debug perspective opens additional views, including a Debugger console, Debug view (which shows active threads and where the debugger stops), Variables, Memory and your code editor, which stops on a breakpoint by default.
124
138
@@ -132,7 +146,7 @@ Click `Choose...` next to the project textbox, and select the project you wish t
132
146
133
147
Mbed Studio automatically switches into the Mbed Debug perspective when debugging with the Mbed Debug launch configuration. The project also breakes on a default break point.
134
148
135
-
#####Advanced debugging
149
+
#### Advanced debugging
136
150
137
151
If you want more control over the options regarding debugging, this section is for you. This section describes how to create a PyOCD GDB debug configuration. This configuration allows you to change more settings, such as ports and executable locations for the GDB client and server.
138
152
@@ -214,8 +228,8 @@ Workaround: None
214
228
215
229
#### Windows
216
230
217
-
Using the product update functionality in Eclipse returns a timestamp error.
218
-
Workaround: This error does not prevent the product from successfully updating.
231
+
GCC builds are slower in Windows than Mac or Linux.
232
+
Workaround: None, this is also the case when using GCC from the command line.
0 commit comments