This is a demo project from arm-mini-os to demenstrate how to compile embedded system using xmake.
The origin Makefile is here.
All the compiling settings are in armgcc.lua.
-
Download Arm gcc tool
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads -
Put tool path to PATH
export ARM_GCC_TOOL=/work/tool/arm-gcc-eabi-none/ export PATH=${ARM_GCC_TOOL}:${PATH}
Compile:
$ xmake b -vD
- Run in qemu:
Download and compile qemu-arm-stm32_v0.1.3 (only works on this version)
wget https://github.com/beckus/qemu_stm32/archive/refs/tags/stm32_v0.1.3.zip unzip stm32_v0.1.3.zip cd qemu_stm32-stm32_v0.1.3/ ./configure --disable-werror --enable-debug \ --target-list="arm-softmmu" \ --extra-cflags=-DSTM32_UART_NO_BAUD_DELAY \ --extra-cflags=-DSTM32_UART_ENABLE_OVERRUN \ --disable-gtk make
Launch qemu via xmake task plugin.
$ xmake qemu Run binary in Qemu! (process:1411): GLib-WARNING **: 22:07:02.449: ../glib/gmem.c:497: custom memory allocation vtable not supported LED Off Hello Xmake!