clinuxarmv7

compile gcc for armv7l from debian in linux


I'm using GCC version 10.2.1 in Linux Debian (x86-64). i write this c code:

#include <stdio.h>

int main() {
  printf("Hello World!");
  return 0;
}

Now my question is how can compile and run this code for armv7l ? Target system Is a evaluation board thank you


Solution

  • you can use arm-linux-gnueabihf-gcc hello.c -o hello command . and befor you should install arm-linux-gnueabihf-gcc in your linux system .

    here is full sample that work for me