Introduction to mbed

This page is an introduction to mbed for partners who have not yet tried mbed.

Setup

Creating an mbed account

You need to create an mbed account if you don't have one.
This step is necessary only for the first time.

  1. Move from https://mbed.org/ to Developer Site".
    /media/uploads/RyoheiHagimoto/signup1.png
  2. Click "Login or signup".
    /media/uploads/RyoheiHagimoto/signup2.png
  3. Click "Signup".
    /media/uploads/RyoheiHagimoto/signup1_en.png
  4. Click "No, I haven’t created an account before".
    /media/uploads/RyoheiHagimoto/signup_en.png
  5. Enter your user name and password, check the "agree" check box, then click "Signup".


Logging into mbed

You may already be logged in by your browser depending on the cookie setting.

  1. Move to Developer Site from https://mbed.org/.
    /media/uploads/RyoheiHagimoto/signup1.png
  2. Click "Login or signup."
    /media/uploads/RyoheiHagimoto/signup2.png
  3. Fill the following fields and click "Login".
    • user name (mail address)
    • password
      /media/uploads/RyoheiHagimoto/login_en.png

Configuring the GR-PEACH's debug I/O for communication with your PC.

  1. Connect GR-PEACH and your PC.
    /media/uploads/RyoheiHagimoto/gr-peach_connect.png
  2. When GR-PEACH is recognized by the PC, it looks like a USB drive named "MBED".
  3. You will find "mbed.htm" in the root folder of the MBED drive. Open it with your browser.
  4. Click "Add to your compiler" on the right side.
    /media/uploads/ShinjiYamano/jpn_gettingstarted010.png

Use GR-PEACH debug I/O

Under Windows, you can use the GR-PEACH's debug I/O through a terminal by installing a serial driver.

  1. Install the serial driver when GR-PEACH appears as the "MBED" drive.
    "Download latest driver" at the destination link is the target driver.

About the mbed Online Compiler

You can open the mbed online compiler window by pressing the "Compiler" button at the upper right corner of the page when you are logged in at the site.
/media/uploads/RyoheiHagimoto/to_mbed_compiler.png

programs and libraries

Program and library are defined in mbed as follows:

/media/uploads/RyoheiHagimoto/icon_program.png programA collection of code that can make up an executable program including main.cpp.
/media/uploads/RyoheiHagimoto/icon_library.png libraryA code that can be cut off as a unit function in the folder for the program.
Its contents may be a collection of code or stored in a library format (*.ar).

Importing a "program"

You may import a program either by importing it from the Compiler window or by expanding the program at the mbed site.

Importing within the mbed Compiler

Take the following actions in the mbed Compiler window:

  1. Press the Import button.
  2. Select the "`Programs" tag.
  3. Search program you need.
    If you click "search" button when input box is empty, all programs will apair.
  4. Select the program you want to import.
  5. Press the "import!" button
    /media/uploads/RyoheiHagimoto/import_from_mbed_compiler.png
  6. Do not check "Update all libraries to the latest version" if you want to import the program in the environment in which the writer of the program published it. To use the latest version of the libraries, check "Update all libraries to the latest version."
    /media/uploads/RyoheiHagimoto/mbed_ether_import.png

Importing a program at the mbed site

  1. Move to the page for the target program at the mbed site.
  2. Click "import this program" located on the right side of the window.
    /media/uploads/RyoheiHagimoto/import_from_mbed_page.png
  3. Do not check "Update all libraries to the latest version" if you want to import the program in the environment in which the writer of the program published it.
    To use the latest version of libraries, check "Update all libraries to the latest version."
    /media/uploads/RyoheiHagimoto/mbed_ether_import.png

Creating a new program

  1. Choose "New Program" from "New" at the upper left corner of the mbed Compiler window.
    /media/uploads/RyoheiHagimoto/new_program.png
  2. Select either "Blinky LED Hello World" or "Empty Program".
  3. Enter the name of the program. You cannot specify a program name that is already registered with the compiler.
  4. If you specified "Blinky LED Hello World," you will be asked whether to update the program and libraries to be downloaded. Normally, you should check it.
  5. After completing the above steps, press "OK."
    /media/uploads/RyoheiHagimoto/create_new_program.png

Importing libraries

Importing within the mbed Compiler

  1. select directory in your program workspace to import library.
  2. Select the location into which the libraries are to be imported.
  3. Press the "Import" button.
  4. Select the "Libraries" tag.
  5. Search library you need.
    If you click "search" button when input box is empty, all libraries will apair.
  6. Select the libraries you want to import (two or more libraries may be selected).
  7. Press the "import!" button.
    /media/uploads/RyoheiHagimoto/import_library_from_compiler.png
  8. Check "Update all libraries to the latest version" if you want to use the latest version of libraries
    ./media/uploads/RyoheiHagimoto/import_library.png

Importing a library at the mbed site

  1. Move to the page for the target program at the mbed site.
  2. Click "Import this library" on the right side of the window.
    /media/uploads/RyoheiHagimoto/import_library_from_site.png
  3. Check "Update all libraries to the latest version" if you want to use the latest version of library.
    /media/uploads/RyoheiHagimoto/mbed_ether_import.png

Creating a new library

  1. Right-click on the location in which you want to create a library and choose "New Library."
    /media/uploads/RyoheiHagimoto/new_library.png
  2. Enter the name of the library and click "OK."
    /media/uploads/RyoheiHagimoto/create_new_library.png

Importing Local files

If you are using a browser other than IE

Drag&drop the files into the Compiler window.
If you drag&drop a zip-compressed file, the contents of the zip file will be added.

If you are using IE

If you add code which is zip-compressed in a file, the contents of the zip file will be added.

  1. Click "Import" in the mbed compiler.
  2. Click the "Upload" tag.
  3. Click "Browse" and select the files you want to upload.
    /media/uploads/RyoheiHagimoto/import.png
  4. Select the files you want to import in the mbed compiler.
  5. Click the "Import!" button.
    /media/uploads/RyoheiHagimoto/import2.png

Publishing program or libraries

Publishing a program

When you publish a program, you are also publishing its libraries.

  1. Select the program you want to publish in the mbed online compiler.
  2. Press the Commit button.
    /media/uploads/RyoheiHagimoto/program_commit.png
  3. The Revision Commit window will appear. Enter the commit message and press OK.
    /media/uploads/RyoheiHagimoto/program_revision_commit.png
  4. Click "v" in ther right of "commit" buton and select "Publish".
    /media/uploads/RyoheiHagimoto/program_publish.png
  5. Enter the message in the Publish Repository window.
  6. Select the destination of publication in "Publish in."
    • My account: Publishes on the code page of your account.
    • [Team name]: Publishes on the code page of the team you belongs to
  7. Select the publication level in "Visibility."
    • Public: Anyone can import.
    • Public (Unlisted): Anyone can import.
      The code page is invisible to other users, however. Only users who know the URL can import.
    • Private: No one else can import.
  8. Press "OK" when the scope of disclosure is established.
    /media/uploads/RyoheiHagimoto/program_publish_repository.png
  9. After your program is published, dialog box below will be apaired:
    • Open Page: Open the page of porgram you published.
    • Close: Continues your compiler.
      /media/uploads/RyoheiHagimoto/program_publish_ok.png

Publishing your library

  1. Select the library you want to publish in the mbed online compiler.
  2. Press the Commit button.
    /media/uploads/RyoheiHagimoto/library_commit.png
  3. The "Revision Commit" window will appear. Enter the commit message and press OK.
    /media/uploads/RyoheiHagimoto/library_revision_commit.png
  4. Press "v" on the right side of the Commit button and choose "Publish."
    /media/uploads/RyoheiHagimoto/library_publish.png
  5. The following window will open when you publish an imported library:
    • Fork: If you do not want to update the library in the source of import
    • OK: If you want to update the library in the source of import
      /media/uploads/RyoheiHagimoto/library_import_publish.png
  6. Enter the message in the Publish Repository window.
  7. Select the destination of publication in "Publish in."
    • My account: Publishes on the code page of your account.
    • [Team name]: Publishes on the code page of the team you belongs to
  8. Select the publication level in "Visibility."
    • Public: Anyone can import.
    • Public (Unlisted): Anyone can import.
      The code page is invisible to other users, however. Only users who know the URL can import.
    • Private: No one else can import.
  9. Press "OK" when the scope of disclosure is established.
    /media/uploads/RyoheiHagimoto/library_revision_publish.png
  10. The window will look like as shown below if the publication is successful.
    • Open Page: Opens the page you published.
    • Close: Continues Compiler window processing.
      /media/uploads/RyoheiHagimoto/program_publish_ok.png

Deleting a Published Program or Library

  1. Go to the page carrying the program or library you published.
  2. Click the "Admin settings" tab.
    /media/uploads/RyoheiHagimoto/program_delete_1.png
  3. Scroll the window down to the bottom.
  4. Check "Are you sure you want to delete this repository?"
  5. Check "Are you really sure?"
  6. Click "Yes delete the repository *."
    /media/uploads/RyoheiHagimoto/program_delete_2.png


Please log in to post comments.