Some notes on the development of the m8ec project.
- MCU dev board: lukasnee/W25Q64_STM32H750VB-DevEBox
- Display: 2.8" TFT LCD (ILI9341) module via SPI interface.
- Keypad: hand-built mechanical key matrix driven directly via MCU GPIO pins.
- Audio out: PCM5102A module (not yet implemented).
- Audio in: PCM1802 module (not yet implemented).
- Development instrumentation: STM32 Nucleo board for ST-Link SWD + integrated serial interface.
| Left Side View | Front View | Right Side View |
|---|---|---|
![]() |
![]() |
![]() |
[!Note] This project was originally and is primarily developed in WSL Ubuntu.
-
Install these prerequisites:
sudo apt update && sudo apt upgrade -y sudo apt install -y git ninja-build python3sudo apt install -y cmakemay install older version of CMake than 4.0.0. Instead you may want to install latest CMake from here. For example:VERSION=4.0.1 cd /tmp/ wget https://github.com/Kitware/CMake/releases/download/v$VERSION/cmake-$VERSION-linux-x86_64.sh sudo sh cmake-$VERSION-linux-x86_64.sh --skip-license --prefix=/usr/local/
-
Install Arm GNU Toolchain:
for more details see this
ARM_TOOLCHAIN_VERSION=$(curl -s https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads | grep -Po '<h4>Version \K.+(?=</h4>)') curl -Lo gcc-arm-none-eabi.tar.xz "https://developer.arm.com/-/media/Files/downloads/gnu/${ARM_TOOLCHAIN_VERSION}/binrel/arm-gnu-toolchain-${ARM_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi.tar.xz" sudo mkdir /opt/gcc-arm-none-eabi sudo tar xf gcc-arm-none-eabi.tar.xz --strip-components=1 -C /opt/gcc-arm-none-eabi echo 'export PATH=$PATH:/opt/gcc-arm-none-eabi/bin' | sudo tee -a /etc/profile.d/gcc-arm-none-eabi.sh source /etc/profile arm-none-eabi-gcc --version arm-none-eabi-g++ --version arm-none-eabi-gdb --version rm -rf gcc-arm-none-eabi.tar.xz
If getting
arm-none-eabi-gdb: error while loading shared libraries: libncursesw.so.5error, installlibncurses5:sudo apt install -y libncurses5
If that does not help, try this:
sudo apt install -y gdb-multiarch sudo mv /usr/bin/arm-none-eabi-gdb /usr/bin/arm-none-eabi-gdb.bak sudo ln -s /usr/bin/gdb-multiarch /usr/bin/arm-none-eabi-gdb
-
Download
64-bit DEB Installer. -
Install the downloaded package:
sudo dpkg -i JLink_Linux_V<XXX>_x86_64.deb echo 'export PATH=/opt/SEGGER/JLink:$PATH' >> ~/.bashrc source ~/.bashrc
-
Clone the project and its submodules:
git clone https://github.com/lukasnee/m8ec.git git checkout prototype git submodule update --init --recursive
-
TODO: instruction for building and flashing the bootloader bl_iram for STM32H750 (DevEBox) platform.
-
Build using the project tool:
cmake --workflow STM32H750-rel
-
Build debug version:
cmake --workflow STM32H750-dbg
Run
python3 tools/m8ec.py -hto see more options.
The firmware variant is based on
lukasnee/W25Q64_STM32H750VB-DevEBox
project. It has a bl_iram
bootloader that runs firmware from MCU's internal RAM. Firmware is loaded into
the volatile RAM from a file every time the MCU boots. The file is stored in a
file system that is mounted on the external flash memory (W25Q64). Firmware file
can be updated from your PC via serial interface. The tools/m8ec.py has the
bootloader communication protocol integrated, so the flashing is easy.
python3 tools/m8ec.py -fNote
If using WSL, make sure to attach the ST-Link USB interface. There is a very
convenient VSCode extension to make it easier: thecreativedodo.usbip-connect.
-
Install
minicom.sudo apt-get install -y minicom
-
Open a terminal using the project tool.
python3 tools/m8ec.py --serial
Here we use SystemView GUI for Windows, but it supports other OSes as well.
-
Build firmware with SEGGER SystemView enabled.
cmake --workflow STM32H750-sysview
-
Flash the firmware to the target MCU.
python3 tools/m8ec.py -f
-
Install latest SEGGER SystemView and J-Link drivers.
-
STLinkReflash tool can be used to reflash the ST-Link firmware to J-Link and back (ST-Link V2-1 only).
-
Start SystemView and connect to the target MCU.
-
TBD...
- Looks like the ucprof trims a lot of recording from start and end. Figure out what's up.


