Coder Social home page Coder Social logo

mbed-os-example-blinky's Introduction

Getting started with Blinky on mbed OS

This guide reviews the steps required to get Blinky working on an mbed OS platform.

Please install mbed CLI.

Import the example application

From the command-line, import the example:

mbed import mbed-os-example-blinky
cd mbed-os-example-blinky

Now compile

Invoke mbed compile, and specify the name of your platform and your favorite toolchain (GCC_ARM, ARM, IAR). For example, for the ARM Compiler 5:

mbed compile -m K64F -t ARM

Your PC may take a few minutes to compile your code. At the end, you see the following result:

[snip]
+----------------------------+-------+-------+------+
| Module                     | .text | .data | .bss |
+----------------------------+-------+-------+------+
| Misc                       | 13939 |    24 | 1372 |
| core/hal                   | 16993 |    96 |  296 |
| core/rtos                  |  7384 |    92 | 4204 |
| features/FEATURE_IPV4      |    80 |     0 |  176 |
| frameworks/greentea-client |  1830 |    60 |   44 |
| frameworks/utest           |  2392 |   512 |  292 |
| Subtotals                  | 42618 |   784 | 6384 |
+----------------------------+-------+-------+------+
Allocated Heap: unknown
Allocated Stack: unknown
Total Static RAM memory (data + bss): 7168 bytes
Total RAM memory (data + bss + heap + stack): 7168 bytes
Total Flash memory (text + data + misc): 43402 bytes
Image: .\.build\K64F\ARM\mbed-os-example-blinky.bin

Program your board

  1. Connect your mbed device to the computer over USB.
  2. Copy the binary file to the mbed device.
  3. Press the reset button to start the program.

The LED on your platform turns on and off.

Export the project to Keil MDK, and debug your application

From the command-line, run the following command:

mbed export -m K64F -i uvision

To debug the application:

  1. Start uVision.
  2. Import the uVision project generated earlier.
  3. Compile your application, and generate an .axf file.
  4. Make sure uVision is configured to debug over CMSIS-DAP (From the Project menu > Options for Target '...' > Debug tab > Use CMSIS-DAP Debugger).
  5. Set breakpoints, and start a debug session.

Image of uVision

Troubleshooting

If you have problems, you can review the documentation for suggestions on what could be wrong and how to fix it.

mbed-os-example-blinky's People

Contributors

sg- avatar adbridge avatar 0xc0170 avatar marcelosalazar avatar mlnx avatar bogdanm avatar iriark01 avatar jaustin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.