Skip to content

Commit 0a97260

Browse files
New images and library description
Describes how to add a library.
1 parent 1f8ce1e commit 0a97260

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed
114 KB
Loading
16.7 KB
Loading
65.8 KB
Loading

docs/tools/offline/mbed-studio.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h2 id="mbed-studio">Arm Mbed Studio</h2>
1+
<h2 id="mbed-studio">Arm Mbed Studio alpha</h2>
22

33
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.
44

@@ -54,7 +54,21 @@ Double-click on the `main.cpp` file to open it in Mbed Studio’s editor. This f
5454

5555
<span class="images">![](https://s3-us-west-2.amazonaws.com/mbed-os-docs-images/Mbed-Studio-Blinky-Main-CPP.png)<span>Explore your new project.</span></span>
5656

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+
<span class="images">![](https://s3-us-west-2.amazonaws.com/mbed-os-docs-images/Mbed-Studio-Import-Library.png)<span>Import an Mbed library.</span></span>
62+
63+
Next, choose a library and copy the URL for the GitHub repository.
64+
65+
<span class="images">![](https://s3-us-west-2.amazonaws.com/mbed-os-docs-images/Mbed-Studio-GitHub-Library-URL.png)<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+
<span class="images">![](https://s3-us-west-2.amazonaws.com/mbed-os-docs-images/Mbed-Studio-ESP8266-Library.png)<span>The imported library in the workspace.</span></span>
70+
71+
### Connecting a board
5872

5973
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.
6074

@@ -66,7 +80,7 @@ Connect an [Mbed Enabled development board](https://os.mbed.com/platforms/) to y
6680

6781
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.
6882

69-
##### Build
83+
### Build
7084

7185
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.
7286

@@ -78,21 +92,21 @@ Alternatively, you can choose to build the project automatically through the men
7892

7993
Once the build completes, the build artifacts, such as the .bin and .elf binaries, are in the `BUILD` folder under the active project.
8094

81-
##### Further exploration
95+
#### Further exploration
8296

8397
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.
8498

8599
<span class="images">![](https://s3-us-west-2.amazonaws.com/mbed-os-docs-images/Mbed-Studio-Pin-Mapping.gif)<span>Press F3 to open a declaration, such as an IO pin name.</span></span>
86100

87-
##### Building automatically
101+
#### Building automatically
88102

89103
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).
90104

91105
The aim is to maintain a system that is always in a built state, providing rapid error feedback to developers as they make changes.
92106

93107
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.
94108

95-
##### Run
109+
### Run
96110

97111
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.
98112

@@ -112,13 +126,13 @@ To make it happen, click the green run icon to launch the default run configurat
112126

113127
Watch the primary LED on your connected target begin to blink!
114128

115-
#### Debugging
129+
### Debug
116130

117131
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.
118132

119133
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.
120134

121-
##### Simple debugging
135+
#### Simple debugging
122136

123137
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.
124138

@@ -132,7 +146,7 @@ Click `Choose...` next to the project textbox, and select the project you wish t
132146

133147
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.
134148

135-
##### Advanced debugging
149+
#### Advanced debugging
136150

137151
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.
138152

@@ -214,8 +228,8 @@ Workaround: None
214228

215229
#### Windows
216230

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.
219233

220234
### FAQ
221235

0 commit comments

Comments
 (0)