OrangePiLibra / WiringPi

The WiringPi on OrangePi
GNU Lesser General Public License v3.0
58 stars 29 forks source link

Library does not compile! #11

Open karstengit opened 6 years ago

karstengit commented 6 years ago

I followed the steps for an OrangePi PC but there are errors in the source Code!


Build WiringPi on OrangePi
./build: 11: [: OrangePi_H3: unexpected operator
wiringPi Build script
=====================

WiringPi Library
[UnInstall]
[Compile] wiringPi.c
[Compile] wiringSerial.c
[Compile] wiringShift.c
[Compile] piHiPri.c
[Compile] piThread.c
[Compile] wiringPiSPI.c
[Compile] wiringPiI2C.c
[Compile] softPwm.c
[Compile] softTone.c
[Compile] softServo.c
[Compile] mcp23008.c
[Compile] mcp23016.c
[Compile] mcp23017.c
[Compile] mcp23s08.c
[Compile] mcp23s17.c
[Compile] sr595.c
[Compile] pcf8574.c
[Compile] pcf8591.c
[Compile] mcp3002.c
[Compile] mcp3004.c
[Compile] mcp4802.c
[Compile] mcp3422.c
[Compile] max31855.c
[Compile] max5322.c
[Compile] sn3218.c
[Compile] drcSerial.c
[Compile] RaspberryPi.c
[Compile] OrangePi.c
OrangePi.c: In function ‘readR’:
OrangePi.c:532:14: error: ‘GPIOL_BASE’ undeclared (first use in this function)
  if (addr >= GPIOL_BASE) {
              ^
OrangePi.c:532:14: note: each undeclared identifier is reported only once for each function it appears in
OrangePi.c: In function ‘writeR’:
OrangePi.c:559:14: error: ‘GPIOL_BASE’ undeclared (first use in this function)
  if (addr >= GPIOL_BASE) {
              ^
OrangePi.c: In function ‘OrangePi_set_gpio_mode’:
OrangePi.c:585:13: error: ‘GPIOL_BASE’ undeclared (first use in this function)
   phyaddr = GPIOL_BASE + (bank * 36) + ((index >> 3) << 2);
             ^
OrangePi.c: In function ‘OrangePi_digitalWrite’:
OrangePi.c:670:13: error: ‘GPIOL_BASE’ undeclared (first use in this function)
   phyaddr = GPIOL_BASE + (bank * 36) + 0x10;
             ^
OrangePi.c: In function ‘OrangePi_digitalRead’:
OrangePi.c:759:13: error: ‘GPIOL_BASE’ undeclared (first use in this function)
   phyaddr = GPIOL_BASE + (bank * 36) + 0x10;
             ^
Makefile:131: recipe for target 'OrangePi.o' failed
make: *** [OrangePi.o] Error 1

Make Failed...
Please check the messages and fix any problems. If you're still stuck,
then please email all the output and as many details as you can to
  projects@drogon.net```
connornishijima commented 6 years ago

Same here...

saadmajid95 commented 6 years ago

I am using Orange Pi Zero and cloning https://github.com/OrangePiLibra/WiringPi.git. Encountering the exact same problem. Anybody to help?

ghost commented 5 years ago

I have exact same problem. Is there anybody who have a solution?

saadmajid95 commented 5 years ago

What does the error say?

On Mon, Jan 28, 2019 at 9:58 PM olibohh notifications@github.com wrote:

I have exact same problem. Is there anybody who have a solution?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/OrangePiLibra/WiringPi/issues/11#issuecomment-458213000, or mute the thread https://github.com/notifications/unsubscribe-auth/AoTsfV4fYcZ-RbO_yRmLoJEH0s3ru1y3ks5vHywggaJpZM4UauYe .

-- Saad Abdul Majid Research Officer Al-Khawarizmi Institute of Computer Science UET Lahore

BloodhoundAllfather commented 5 years ago

Follow this: https://github.com/OrangePiLibra/WiringPi/issues/2#issuecomment-314277686

you have to add 2 #defines into OrangePi.h