Starting with version 6.5, Mbed OS uses Mbed CLI 2. It uses Ninja as a build system, and CMake to generate the build environment and manage the build process in a compiler-independent manner. If you are working with Mbed OS version prior to 6.5 then check the section Mbed CLI 1.
- Install Mbed CLI 2.
- Change the current directory to where the project was imported.
- Install Mbed CLI 1.
- Change the current directory to where the project was imported.
The main()
function is the single thread in the application.
Note: This demo requires a target with RTOS support, i.e. one with rtos
declared in supported_application_profiles
in targets/targets.json
in mbed-os.
-
Connect a USB cable between the USB port on the board and the host computer.
-
Run the following command to build the example project and program the microcontroller flash memory:
- Mbed CLI 2
$ mbed-tools compile -m <TARGET> -t <TOOLCHAIN> --flash
- Mbed CLI 1
$ mbed compile -m <TARGET> -t <TOOLCHAIN> --flash
Your PC may take a few minutes to compile your code.
The binary is located at:
- Mbed CLI 2 -
./cmake_build/FRDM-K64-Joystick-N5510.bin
- Mbed CLI 1 -
./BUILD/<TARGET>/<TOOLCHAIN>/FRDM-K64-Joystick-N5510.bin
Alternatively, you can manually copy the binary to the board, which you mount on the host computer over USB.
You should be able to see a circle on N5510 screen, which can be controlled by the Joystick
Any issues can be reported to shehzad.hussain2011@gmail.com