Build Status Security Rating Reliability Rating Coverage

halmcu provides a developing environment for microcontrollers by including low level hardware drivers, libraries, and examples for peripherals.

See online documentation at halmcu.readthedocs.io

Getting Started

Installing prerequisites

GNU Arm Embedded Toolchain

  1. Download the GNU Arm Embedded Toolchain.

  2. Locate it where desired

  3. Add path to environment variable

  4. Then you can check that ARM GCC is in your path:

$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Alternatively you can do it with package manager:

  • MacOSX

    • $ brew install --cask gcc-arm-embedded

  • Linux

    • $ sudo apt-get install -y gcc-arm-none-eabi

  • Windows

Setting up the development environment

Visual Studio Code

  1. Install Visual Studio Code

  2. Install Visual Studio Code Plugins

  3. Press F1 to display the command palette

  4. At the command palette prompt, enter gitcl, select the Git: Clone (Recursive)

  5. When prompted for the Repository URL, enter https://github.com/onkwon/libabov-example.git

  6. And press F1 again. At the command palette prompt enter task, select the Tasks: Run Build Task

Embedded Studio

IAR

Keil

Other

1. Get halmcu into your project

$ cd ${YOUR_PROJECT_DIR}
$ git submodule add https://github.com/onkwon/halmcu.git ${YOUR_THIRD_PARTY_DIR}/halmcu

2. Add halmcu to your existing build system

Make

Please refer to a build template.

Other

Please refer to a custom build example.

  1. Add the sources under ${YOUR_THIRD_PARTY_DIR}/halmcu/drivers/*.c to your project

  2. Add the sources under ${YOUR_THIRD_PARTY_DIR}/halmcu/devices/common/*.c to your project

  3. Add the sources under ${YOUR_THIRD_PARTY_DIR}/halmcu/devices/${VENDOR}/${DEVICE}/*.c to your project

  4. Add cpu architecture specific sources under ${YOUR_THIRD_PARTY_DIR}/halmcu/arch/${YOUR_ARCH} to your project

  5. Add ${YOUR_THIRD_PARTY_DIR}/halmcu/include to the include paths for your project

  6. Add CMSIS include path to the include paths for your project

  7. Pass DEVICE, ARCH, and HSE definitions to your compiler

Running an example

Supported devices and peripherals

  • ✅ Supported

  • ➖ Not supported

  • ❌ Unavailable in device

  •   Planned

ABOV

STM32

Peripheral

A31G1x

A33G

F11

F4

F7

ADC

CAN

CLK

CRC

DAC

DMA

ETH

FLASH

FSMC

GPIO

I2C

PWR

RTC

SDIO

SPI

Timer

UART

USB

WDT

1

Only high-density devices are supported at the moment.