请问一下,为什么安装了wiringOP后执行gpio readll报错?板子是orangepi one,ubuntu 内核版本是5.4,重新刷了系统还是一样的错误?
root@orangepione:/wiringOP/wiringOP-next# ./build clean
wiringPi: [Clean]
DevLib: [Clean]
gpio: [Clean]
Examples: [Clean]
Gertboard: [Clean]
PiFace: [Clean]
Quick2Wire: [Clean]
PiGlow: [Clean]
scrollPhat: [Clean]
Deb:
root@orangepione:/wiringOP/wiringOP-next# ./build
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
wiringPi.c: In function ‘orangepi_pwm_set_act’:
wiringPi.c:3797:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (act_cys >= pwm_period || act_cys < 0)
^~
[Compile] mcp23008.c
[Compile] mcp23016.c
wiringPi.c: In function ‘orangepi_get_gpio_mode’:
wiringPi.c:6384:59: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 11)
^~
wiringPi.c:6404:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 1)
^~
wiringPi.c:6430:59: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 7)
^~
wiringPi.c:6438:59: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 1)
^~
wiringPi.c:6445:59: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 1)
^~
wiringPi.c:6453:59: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 19)
^~
[Compile] mcp23017.c
wiringPi.c: In function ‘orangepi_set_gpio_mode’:
wiringPi.c:7550:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 11)
^~
wiringPi.c:7570:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 1)
^~
wiringPi.c:7582:18: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if( (index >= 0 && index <=1) && PWM_OUTPUT == mode )
^~
wiringPi.c:7600:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 7)
^~
wiringPi.c:7609:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 1)
^~
wiringPi.c:7616:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 1)
^~
wiringPi.c:7625:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (index >= 0 && index <= 19)
^~
wiringPi.c: In function ‘rk3588_set_pwm_reg’:
wiringPi.c:6785:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
printf("You can select wiringPi pin 0/2/5/8/9/10/14/16 for PWM pin.\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wiringPi.c:6786:5: note: here
case PI_MODEL_5B:
^~~~
[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] ads1115.c
[Compile] sn3218.c
[Compile] bmp180.c
[Compile] htu21d.c
[Compile] ds18b20.c
[Compile] rht03.c
[Compile] drcSerial.c
[Compile] drcNet.c
[Compile] pseudoPins.c
[Compile] wpiExtensions.c
[Compile] w25q64.c
[Compile] oled.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] scrollPhat.c
[Compile] piGlow.c
[Link (Dynamic)]
[Install Headers]
[Install Dynamic Lib]
GPIO Utility
[Compile] gpio.c
[Compile] readall.c
gpio.c: In function ‘doUsbP’:
gpio.c:944:25: warning: unused parameter ‘argc’ [-Wunused-parameter]
static void doUsbP (int argc, char *argv [])
^~~~
gpio.c:944:37: warning: unused parameter ‘argv’ [-Wunused-parameter]
static void doUsbP (int argc, char *argv [])
^~~~
readall.c: In function ‘OrangePiReadAll’:
readall.c:2395:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
printf (" +------+-----+----------+--------+---+ AI PRO +---+--------+----------+-----+------+\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
readall.c:2396:3: note: here
case PI_MODEL_RV:
^~~~
[Link]
[Install]
All Done.
NOTE: To compile programs with wiringPi, 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).
root@orangepione:/wiringOP/wiringOP-next# gpio readll
wiringPiSetup: mmap (PWM) failed: Invalid argument