Author Topic: How to compile C code without any libs as ARMv4 code?  (Read 1995 times)

Offline exit0

  • Single posting newcomer
  • *
  • Posts: 5
How to compile C code without any libs as ARMv4 code?
« on: March 16, 2023, 09:19:54 pm »
Hi, i'm new to CB and cross-compiling. I've somehow managed to install an ARM compiler on my Windows 10 installation (Mingw).
When i create an ARM Project i can only choose between some evaluation boards, but in fact i don't want to use one of them as i don't own them. I simply like to compile code written in pure C (without any libs) into ARMv4 assembly machine code which would run on an emulation/simulator.

int main (void) {
return 0;

When i simply remove all the extra files/code that comes with one of the ARM projects i end up with
||=== Build: default in compileTests (compiler: GNU GCC Compiler for ARM) ===|
ld.exe: warning||cannot find entry symbol reset_vector; defaulting to 00008000|
c:\program files\gnuarm\bin\..\lib\gcc\arm-none-eabi\7.3.1\..\..\..\..\arm-none-eabi\lib\crt0.o||In function `_start':|
(.text+0x104)||undefined reference to `__bss_start__'|
(.text+0x108)||undefined reference to `__bss_end__'|
c:\program files\gnuarm\bin\..\lib\gcc\arm-none-eabi\7.3.1\..\..\..\..\arm-none-eabi\lib\libc.a(lib_a-exit.o)||In function `exit':|
exit.c:(.text.exit+0x2c)||undefined reference to `_exit'|
||error: ld returned 1 exit status|
||=== Build failed: 5 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|