Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Linux] how to install a cross compiler for core-3399-JD4 board?

62

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
62

【Linux】 how to install a cross compiler for core-3399-JD4 board?

Posted at 2/14/2020 17:30:19      View:3944 | Replies:5        Print      Only Author   [Copy Link] 1#
Last edited by linux_willow In 2/17/2020 15:09 Editor

I am using the Core 3399 JD4 board. I need to setup a compiler PC. I want to be able to compile my code for the 3399 board on this PC and just copy the executable to the 3399 board. I understand that I need to install a cross compiler for the 3399 board in my PC. However, the link at http://wiki.t-firefly.com/en/Cor ... ation-layer-support seems to describe how to install ubuntu in the 3399 board. Is there any cross compiler toolchain available for the 3399 board?

Note: My PC has Ubuntu 18.0.4 LTS installed. It has a intel core i7-9700 CPU.
Reply

Use props Report

681

Credits

0

Prestige

0

Contribution

advanced

Rank: 4

Credits
681
Posted at 2/19/2020 10:52:20        Only Author  2#
Hello, you need to follow this wiki to install Linux-SDK in your PC.
http://wiki.t-firefly.com/en/Core-3399-JD4/Linux.html#compile-ubuntu-firmware-gpt
Reply

Use props Report

62

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
62
Posted at 2/19/2020 11:25:55        Only Author  3#
Negro旋 Posted at 2/19/2020 10:52
Hello, you need to follow this wiki to install Linux-SDK in your PC.
http://wiki.t-firefly.com/en/C ...

hi..thank you for the reply..I have followed the steps in the link.. now, if i need to compile a simple "hello world" program in my PC.. can you please help me how to compile the code and obtain an executable in the PC?
Reply

Use props Report

681

Credits

0

Prestige

0

Contribution

advanced

Rank: 4

Credits
681
Posted at 2/19/2020 15:44:04        Only Author  4#
OK. If you want to run the executable in your PC, you can execute "gcc hello.c -o hello" to get the executable.
If you want to run the executable in your board. There is cross compiler in Linux-SDK. "linux-sdk/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/" for 64 bit. Then your can execute "./aarch64-linux-gnu-gcc hello.c -o hello" to get the executable.
Reply

Use props Report

62

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
62
Posted at 2/20/2020 09:20:59        Only Author  5#
Negro旋 Posted at 2/19/2020 15:44
OK. If you want to run the executable in your PC, you can execute "gcc hello.c -o hello" to get the  ...

thank you for the guidance..I am relatively new to setting up a cross compiler, hence I would like to clear a few concepts here..since I have a Ubuntu PC..I understand that I just need a cross compiler to obtain the executable.. Since we are using the arm gcc..would it be sufficient if I just install an arm cross compiler instead of following all the steps in the http://wiki.t-firefly.com/en/Cor ... ubuntu-firmware-gpt link? what I mean is, there is no need to install the Linux-SDK from the repo since it is also installing the files specific to rockchip device which we are not using?
Reply

Use props Report

681

Credits

0

Prestige

0

Contribution

advanced

Rank: 4

Credits
681
Posted at 2/20/2020 11:19:56        Only Author  6#
Yes, if you just want to obtain the executable, just install an arm cross compiler is OK.
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list