Skip to content

Latest commit

 

History

History
56 lines (33 loc) · 2.6 KB

File metadata and controls

56 lines (33 loc) · 2.6 KB

Table of Contents


Testing the Software

Once you are confident the hardware is working, we can turn our attention to programming.

For this, we will use Mbed Studio to perform the following steps:

  1. Open the sample code (written in the language C++)
  2. Build the code into something the target computer can understand
  3. Deploy and execute the code on the target board
  4. Edit the code in Mbed Studio to make a small change
  5. Finally, we will debug the code, stepping through line by line

Task101 - Blinky!

When learning to program an embedded computer, the tradition is to run "Blinky", a program that simply flashes an LED on and off. This is very simple to do in Mbed.

Click this link to watch a video on how to program your board with Mbed Studio.

Now repeat the steps yourself.

Debugging

A powerful tool in Mbed Studio is the "debugger". Although this tool is primarily designed to help find errors (bugs) in your code, it is also a powerful educational tool.

The debugger allows you to run your code, line by line, observing how it works through cause and effect.

Click this link to watch a video on how to debug your code.

Now repeat the steps yourself.

Clean up the files (Option 1)

With version 1.0 of Mbed studio, once built,each project consumes over 1Gb data on the local disk. Most of this is in the mbed-os folder within each project. As we will be opening multiple projects and building them, this can quickly become problematic.

This is one reason why you should not set your git root folder inside the folder tree of OneDrive or any other cloud service.

To clear some disk space, there is a work-around.

Using Explorer (Windows) or Finder (Mac), you can delete the BUILD and mbed-os folders. Do NOT delete the mbed-os.lib file

It is suggested you do not do this from within Mbed Studio itself.

Shared Libraries (Option 2 - preferred)

If you have a lot of projects, each will consume in excess of 1Gb of disk space. Since Mbed Studio v1.2, there is an option to share library files between projects.

Click Here to watch a video showing how this is done.

It is suggested you use shared library files for your own work.


Contents

NEXT - Troubleshooting