Version 1 (modified by Ryan Erbstoesser, 7 months ago) (diff)

add page for ubuntu native compile

Native Compile on Newport

To natively compile a .c file on a Newport board using Ubuntu, follow the instructions:

  • First, install build-essential
    apt-get update
    apt-get install build-essential
  • Create a hello world file using a text editor like vi or similar: (hello.c)
    #include <stdio.h>
    int main(void)
    printf("hello, world\n");
  • Compile the file:
    root@xenial-newport:~# gcc -o hello helloworld.c
  • Run the file
    root@xenial-newport:~# ./hello
    hello, world