Open roens opened 7 years ago
I'm not sure if this helps or causes more trouble, but if I change:
diff --git a/wiringPi/OrangePi.h b/wiringPi/OrangePi.h
index e3bf270..4dc8f92 100644
--- a/wiringPi/OrangePi.h
+++ b/wiringPi/OrangePi.h
@@ -56,6 +56,8 @@
#define GPIO_NUM (0x40)
#define GPIO_BASE_MAP (0x01C20800)
#define MEM_INFO (1024)
+#define GPIOL_BASE (0x0)
+#define GPIOL_BASE_MAP (0x0)
#define MAP_SIZE_L (4096 * 2)
#endif
… then I can get a "successful" build:
[root@fam:/usr/local/src/WiringPi] 26s # ./build OrangePi_H3
Build WiringPi on OrangePi
./build: 11: [: OrangePi_H3: unexpected operator
wiringPi Build script
=====================
WiringPi Library
[UnInstall]
[Compile] OrangePi.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]
WiringPi Devices Library
[UnInstall]
[Compile] ds1302.c
[Compile] maxdetect.c
[Compile] piNes.c
[Compile] gertboard.c
[Compile] piFace.c
[Compile] lcd128x64.c
[Compile] lcd.c
[Compile] piGlow.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]
GPIO Utility
[Compile] gpio.c
gpio.c:754:13: warning: ‘doPadDrive’ defined but not used [-Wunused-function]
static void doPadDrive (int argc, char *argv [])
^
gpio.c:842:13: warning: ‘doGbw’ defined but not used [-Wunused-function]
static void doGbw (int argc, char *argv [])
^
gpio.c:884:13: warning: ‘doGbr’ defined but not used [-Wunused-function]
static void doGbr (int argc, char *argv [])
^
gpio.c: In function ‘doLoad’:
gpio.c:217:4: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
system(cmd);
^
gpio.c:223:4: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
system(cmd);
^
gpio.c:254:4: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
system(cmd);
^
gpio.c:259:7: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
system(cmd);
^
[Compile] extensions.c
[Compile] readall.c
[Compile] pins.c
[Compile] OrangePi.c
[Link]
[Install]
All Done.
NOTE: To compile programs with wiringBP v2, you need to add:
-lwiringPi
to your compile line(s) To use the Gertboard, MaxDetect, etc.
code (the devLib), you need to also add:
-lwiringPiDev
to your compile line(s).
See this.
/************** OrangePi H3 ***********************/
#if CONFIG_ORANGEPI_H3 || CONFIG_ORANGEPI_H3_ZEROPLUS2
#define GPIOA_BASE (0x01C20000)
#define GPIO_NUM (0x40)
#define GPIO_BASE_MAP (0x01C20800)
#define MEM_INFO (1024)
#define GPIOL_BASE (0x01F02c00)
#define GPIOL_BASE_MAP (0x01F02000)
#define MAP_SIZE_L (4096 * 2)
#define GPIO_PWM_OP (0x01C21000)
#endif
I've got an Orange Pi Plus H3 board. I've attempted to run build on/for it:
This is in a freshly cloned repo. I also get the same results after running
make clean
first.