Go to advanced search

by vdhieu
Wed Aug 05, 2020 8:04 am
Forum: C/C++
Topic: Cross-compile for PI
Replies: 15
Views: 1071

Re: Cross-compile for PI

I still cant compile. logitech@logitech-VirtualBox:/opt/FriendlyARM/WiringNP/examples$ aarch64-linux-gnu-gcc -o main blink.o -L /opt/FriendlyARM/WiringNP/wiringPi/ -I /opt/FriendlyARM/WiringNP/wiringPi/ -lwiringPi /opt/FriendlyARM/toolchain/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/../li...
by vdhieu
Mon Aug 03, 2020 7:42 am
Forum: Beginners
Topic: Volume is dirty (External HDD - NTFS)
Replies: 9
Views: 1223

Re: Volume is dirty (External HDD - NTFS)

I had the same error.
You need to format to FAT32.
by vdhieu
Mon Aug 03, 2020 4:41 am
Forum: C/C++
Topic: Cross-compile for PI
Replies: 15
Views: 1071

Re: Cross-compile for PI

I tried too many thing but nothing got. Maybe you get luck. Read this:You may also need to add -I/usr/local/include -L/usr/local/lib -lwiringPi to the compile line of your program depending on the environment you are using. If you open wiringPi.h, you will see it includes boardtype_friendlyelec.h. I...
by vdhieu
Sun Aug 02, 2020 3:23 pm
Forum: C/C++
Topic: Cross-compile for PI
Replies: 15
Views: 1071

Re: Cross-compile for PI

Thank you all for your reply. 1. I installed toolchain for cross-compile on Ubuntu, compiled a simple file and run well on PI. -> toolchain is fine. 2. I installed wiringPI on Ubuntu, not error. 3. I compiled this file on PI and run well. (I installed wiringPI on PI) 4. I use cross-compile because i...
by vdhieu
Fri Jul 31, 2020 10:00 am
Forum: C/C++
Topic: Cross-compile for PI
Replies: 15
Views: 1071

Cross-compile for PI

I created a file main.c on my Ubuntu #include <stdio.h> #include <wiringPi.h> int main(void) { int i; wiringPiSetup(); pinMode(7, OUTPUT); while(1) { digitalWrite(7, HIGH); delay(500); digitalWrite(7, LOW); delay(500); } return 1; } Now i want to cross-compile this file for PI. But issue that: main....

Go to advanced search