Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

which toolchain should i used?

Featured Replies

hi,

 

i have burn the jessi server with my orangepi one from http://www.armbian.com/orange-pi-one/.

all run well, but when i try to use the arm-linux-gnueabihf-gcc within ubuntu 14.04 to compile a helloworld into this board. I meet segmentation fault. 

does any one known which toolchain should I use when I want to cross compile program for it?

@Peica

 

just to make sure... you are compiling helloworld on the orange pi, don't you?

 

what does

gcc --version

says, please?

 

you just need gcc as it is a native compiler on the board. if not, you may try to use the x86 compiler for ARM

1) For Ubuntu 14.04 x86: retrieve a 32 bits Linux toolchain from Linaro  - note that latest releases
    are providing Linux x86_64-hosted toolchains only - I tested on a Live CD Lubuntu x86 14.04 image.
 

    wget https://releases.linaro.org/14.01/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.8-2014.01_linux.tar.xz
    tar Jxf gcc-linaro-arm-linux-gnueabihf-4.8-2014.01_linux.tar.xz
    export PATH=$(pwd)/gcc-linaro-arm-linux-gnueabihf-4.8-2014.01_linux/bin:$PATH

1.1) create hello.c
 

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv)
{
    printf("Hello, World!\n");
    
    return EXIT_SUCCESS;
}

1.2) compilation
 

arm-linux-gnueabihf-gcc -o hello hello.c

1.3) execution (on a nanopi-m1 running Armbian 5.16, but it should work as is on an orangepi-one...)
 

./hello
Hello, World!

2) For Ubuntu 14.04 x86_64: retrieve latest 64 bits Linux toolchain from Linaro - I tested on a Live CD Lubuntu 14.04 x86_64 image.

   wget https://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/arm-linux-gnueabihf/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
   tar Jxf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
   export PATH=$(pwd)/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin:$PATH

    go through steps 1.1, 1.2, 1.3.
    

Working fine with Armbian_5.14_Nanopim1_Debian_jessie_3.4.112.raw as well, still on a nanopi-m1.


 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.