Successfully Built ARM Cross Toolchain and Run Bare-Metal Program on QEMU

Hello everyone,
I have successfully built an ARM cross-compilation toolchain from source and tested it by running a simple bare-metal program on QEMU.
Project Overview:
Built ARM toolchain (arm-none-eabi-gcc)
Created a minimal bare-metal setup using:
startup.s
linker.ld
hello.c
Compiled and linked the program without standard libraries (freestanding environment)
Executed the ELF binary using QEMU (versatilepb machine)
Output: The program successfully ran and printed: “Hello rtems!”
Key Learning: This helped me understand low-level system concepts including:
Cross compilation
Linker scripts
Bare-metal execution flow
QEMU emulation
I have uploaded the complete project here: GitHub - sakshamupadhy/arm-toolchain: cross compiler · GitHub
I would appreciate any feedback or suggestions for improvement.

Thank you.

Regards,


Saksham

Hi Saksham,

I’m curious how this is relevant to RTEMS?

Hi,

Thank you for your question.

This work represents an initial step in my learning process toward RTEMS development. I focused on building the ARM cross-compilation toolchain from source and validating it by running a simple bare-metal application on QEMU. This helped me understand the low-level toolchain setup, linker scripts, and execution flow.

My intention is to use this setup as a foundation for working with RTEMS, including building RTEMS itself and running RTEMS-based applications on top of this environment.

I would appreciate any guidance or suggestions on how to proceed with integrating RTEMS into this workflow.

Thank you.

I see. I would suggest that you read 15. Source Builder — RTEMS User Manual 7.1023b8c (8th January 2026) documentation

Thanks for the suggestion. I’ll go through the RTEMS Source Builder documentation and follow the recommended approach.
Appreciate the guidance.