Snippets of baremetal applications for arm, aarch64
To compile and start the binary with qemu run the following (arm-c-qemu used as example):
mkdir build/
cd build/
cmake -G "MingGW Makefiles" ../arm-c-qemu
make qemu_gdb_server
Now connect with gdb to localhost:1234 and step through the application
Example project for aarch64.
Note: currently no qemu settings added
Example using interrupts. E.g timer interrupt
Note: This is an older project using scons instead of cmake. See SConstruct to see the build targets
Example of using c++ on aarch64. This example uses std::cout to print to qemu's serial console
Example which runs on qemu vexpress-a9. It also an example for using cmake for embedded
Example using cpp on embedded Note: more fancy std functions like cout may fail due to missing crt runtime init
WIP Test Cpu Interrupts, MMU and other
- https://embeddedartistry.com/blog/2019/04/17/exploring-startup-implementations-newlib-arm/
- https://chromium.googlesource.com/chromiumos/third_party/u-boot/+/stabilize-5656.B/arch/arm/cpu/armv7/start.S
- https://www.mikrocontroller.net/articles/GCC:_unbenutzte_Funktionen_entfernen
- https://www.reddit.com/r/embedded/comments/n96zth/arm_gcc_produces_weird_init_with_gcsections/
- Project
- cmake, make (or other generators)
- arm-none-eabi-gcc
- aarch64-none-elf-gcc
- qemu
- Eclipse CDT as gdb gui (use remote gdb settings)