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
Download the GNU Arm Embedded Toolchain.
Locate it where desired
Add path to environment variable
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:
-
$ brew install --cask gcc-arm-embedded
Linux
$ sudo apt-get install -y gcc-arm-none-eabi
Windows
Download and run the installer
Setting up the development environment
Visual Studio Code
Install Visual Studio Code
Install Visual Studio Code Plugins
Press
F1
to display the command paletteAt the command palette prompt, enter
gitcl
, select the Git: Clone (Recursive)When prompted for the Repository URL, enter
https://github.com/onkwon/libabov-example.git
And press
F1
again. At the command palette prompt entertask
, 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.
Add the sources under
${YOUR_THIRD_PARTY_DIR}/halmcu/drivers/*.c
to your projectAdd the sources under
${YOUR_THIRD_PARTY_DIR}/halmcu/devices/common/*.c
to your projectAdd the sources under
${YOUR_THIRD_PARTY_DIR}/halmcu/devices/${VENDOR}/${DEVICE}/*.c
to your projectAdd cpu architecture specific sources under
${YOUR_THIRD_PARTY_DIR}/halmcu/arch/${YOUR_ARCH}
to your projectAdd
${YOUR_THIRD_PARTY_DIR}/halmcu/include
to the include paths for your projectAdd CMSIS include path to the include paths for your project
Pass
DEVICE
,ARCH
, andHSE
definitions to your compiler
Running an example
Supported devices and peripherals
✅ Supported
➖ Not supported
❌ Unavailable in device
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.