BlinkLed is a minimal dynamic application for the Mk OS. It blinks the user LED of the STM32F746G-Eval2 board and is intended as a getting-started example showing how to build, install, and run an external .elf application on top of Mk.
Build the application (see Build below), then copy blinkLedRelease.elf and its
icon mk_blinkLed.bmp to the Mk file system at:
mk/apps/blinkLed/
This path corresponds to Mk/Storage/mk/apps/blinkLed/
in the Mk repository. Once installed, BlinkLed appears in the Mk home screen application list.
- GNU Arm Embedded Toolchain 10.3-2021.10 — must be added to your
PATH - GNU Make 4.3
- Mk Includes
- MSYS2 (recommended) — provides
sh,find,rmand other Unix tools required by the Makefile - Git for Windows — Git Bash ships the same Unix tools
The Makefile automatically detects MSYS2 or Git Bash at their default installation paths (
C:/msys64andC:/Program Files/Git). If your installation is elsewhere, updateMSYS2_BINorGITBASH_BINat the top ofBlinkLed/Make/Makefile.
-
Clone the repository and make sure the Mk Includes directory is present at
../../Mk/Mk/Includesrelative to theMakedirectory, or updateINCLUDES_API_PATHinBlinkLed/Make/Makefileaccordingly. -
Add
arm-none-eabi-gccto yourPATH(verify witharm-none-eabi-gcc --version). -
Build:
make clean
make all # Release build — optimised, strippedThis produces blinkLedRelease.elf, ready to install on the target.
Use the
Debugtarget for a-O0build with full debug symbols:make Debug
The application is compiled as a position-independent shared object (-fPIC -shared) and is relocatable into any 64 KB SDRAM page by the Mk dynamic loader.
| Target | Description |
|---|---|
all |
Alias for Release |
Release |
Optimised build (-Ofast), stripped |
Debug |
Unoptimised build (-O0) with full debug symbols |
clean |
Remove all generated files (.o, .d, .su, .elf, .map) |
| Tool | Version |
|---|---|
arm-none-eabi-gcc |
10.3.1 20210824 (GNU Arm Embedded Toolchain 10.3-2021.10) |
arm-none-eabi-g++ |
10.3.1 20210824 (GNU Arm Embedded Toolchain 10.3-2021.10) |
make |
GNU Make 4.3 |
Every push and pull request is automatically built by GitHub Actions.
The workflow installs the GNU Arm Embedded Toolchain, runs make Release,
and uploads blinkLedRelease.elf as a downloadable build artifact.
The latest successful build artifact is available on the Actions tab of this repository.
BlinkLed is the reference example for the Mk application model. For a step-by-step guide on how to structure your own Mk application — descriptor, entry point, event listeners, memory layout — see the Mk wiki.
Copyright (C) 2024 RENARD Mathieu. All rights reserved.
Mk is free software; It is distributed in the hope that it will be useful. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The content of this repository is bound by the BSD-3-Clause license.