10.2 C
London
Friday, February 9, 2024

homebrew – Failing to construct embedded arm functions with brew put in arm-none-eabi-gcc compiler


Right here is the applying I’m attempting to construct:

#embrace <string.h>
#embrace <stdio.h>

int predominant() {
  printf("howdy worldn");
  return 0;
}

Right here is my output with the brew put in compiler:

> arm-none-eabi-gcc check.c
check.c:1:10: deadly error: string.h: No such file or listing
    1 | #embrace <string.h>
      |          ^~~~~~~~~~
compilation terminated.

Right here is my output with the compiler I downloaded from ARM. (The errors are anticipated – and once I compile a full embedded undertaking this compiler works, and the homebrew put in one doesn’t)

~
> /Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/arm-none-eabi-gcc check.c
/Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc.a(libc_a-exit.o): in operate `exit':
exit.c:(.textual content.exit+0x28): undefined reference to `_exit'
/Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc.a(libc_a-closer.o): in operate `_close_r':
nearer.c:(.textual content._close_r+0x18): undefined reference to `_close'
/Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc.a(libc_a-fstatr.o): in operate `_fstat_r':
fstatr.c:(.textual content._fstat_r+0x1c): undefined reference to `_fstat'
/Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc.a(libc_a-isattyr.o): in operate `_isatty_r':
isattyr.c:(.textual content._isatty_r+0x18): undefined reference to `_isatty'
/Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc.a(libc_a-lseekr.o): in operate `_lseek_r':
lseekr.c:(.textual content._lseek_r+0x24): undefined reference to `_lseek'
/Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc.a(libc_a-readr.o): in operate `_read_r':
readr.c:(.textual content._read_r+0x24): undefined reference to `_read'
/Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc.a(libc_a-sbrkr.o): in operate `_sbrk_r':
sbrkr.c:(.textual content._sbrk_r+0x18): undefined reference to `_sbrk'
/Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /Purposes/ArmGNUToolchain/13.2.Rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc.a(libc_a-writer.o): in operate `_write_r':
author.c:(.textual content._write_r+0x24): undefined reference to `_write'
collect2: error: ld returned 1 exit standing

Why cannot the homebrew put in compiler discover the usual headers?

Latest news
Related news

LEAVE A REPLY

Please enter your comment!
Please enter your name here