Bambino-210 Manual/Getting Started
From Manuals
Contents |
Getting Started
This section explains how to develop programs for the Micromint Bambino using the mbed online compiler. Using an online compiler is a great way to get started with mbed development. No local program installations are required on your system. The editor, compiler and linker are maintained by the mbed team and accessible via any Internet connection. The next chapter will cover offline toolchains for projects that require use of a compiler and debugger installed on your system.
Activate mbed.org Account
To use the online compiler you first need a developer account at mbed.org. If you have not done so, please visit mbed.org, click on "Signup" and follow the steps to create an account. If you already have an account, login using your mbed username.
Add Micromint Bambino Platforms
The Micromint Bambino has two USB ports: USB0 for use by your mbed applications and USB1 for mbed development. When you connect your system to USB1 it will recognize the board as a removable flash drive to copy your programs and a serial port that can be used for program output. Those functions are implemented by the on-board mbed HDK with the mbed CMSIS-DAP firmware. To add the board to the online compiler, click on the mbed.htm file in the removable flash drive detected by your system.
Equivalent links are included below.
Create Program
Enter the online compiler by selecting the "Compiler" button on the development site. Right click on "My Programs" and select "New Program...".
Select a name for your program. Use "blinky" as our initial program name for a simple application that blinks an LED.
Then create your first program file. Right click on "blinky" and select "New File...". Use "main.cpp" as your main program file.
Paste the following content to your program file.
#include "mbed.h"
DigitalOut myled(LED2);
int main() {
while(1) {
myled = 1;
wait(0.8);
myled = 0;
wait(0.8);
}
}
Finally import the mbed source library to your program to access mbed library functions with source code. Right click on "blinky" and select "Import Library...", "From Import Wizard". On the wizard search for "mbed-src" and double click on the latest version from "mbed-official". It will take a few seconds to import all library files to your program.
Compile and Download Program
To compile your program click "Compile" on the toolbar. This will create a program binary to run on your board and save it to your system. You can save the file directly to the board by selecting the mbed removable flash drive as the target. If you prefer to keep a copy on your system, save it first to your hard drive and then copy it to the mbed removable flash drive. If you get any compiler errors, check the source code to insure it is as listed above and then recompile your program.
Run Program
Once you copy your program to the board, the green LED (LED2) should start blinking. If your previous program left the board in an unknown state, press the RESET button to load the program you just copied.
That's it! In less than 5 minutes you were able to compile and run a program on your board using the online compiler. The next chapter will cover how to use offline compilers.









