Jump to content

Orange PI zero WiringOP-Zero build


bodtx

Recommended Posts

Hi, I'm trying to build wiring on my OPIZ

here is the PI:
 

Welcome to ARMBIAN 5.38 stable Debian GNU/Linux 9 (stretch) 4.14.18-sunxi   
System load:   0.41 0.25 0.10      Up time:       1 min        
Memory usage:  9 % of 493MB      IP:            192.168.1.18
CPU temp:      35°C               
Usage of /:    8% of 15G


 

here is the log

 

GPIO Utility
[Link]
/usr/bin/ld: gpio.o: relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
gpio.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:48: recipe for target 'gpio' failed
make: *** [gpio] Error 1


 

I tried to add -fPIC flag in gpio/Makefile with no succes

 

@$(CC) -o $@ $(OBJ) $(LDFLAGS) -fPIC $(LIBS)

 

Link to comment
Share on other sites

2 hours ago, bodtx said:

waooo, your lib is a great idea. I do not need a special compatibility with wiringPi, but I would like to drive a MCU with serial communication (more basic than spi or i2c), in your function available I don not see somtehing like this

The I2C and SPI support isn't needed since there are standard Linux interfaces. GPIO pins are the only oddity where the header pin can be connected to anything depending on the board manufacturer. Linux also supports serial ports with a standard interface, so it's not necessary to add it to my ArmbianIO project.

Link to comment
Share on other sites

58 minutes ago, bodtx said:

with something like this ?

Is there any known lib in C for that, it seems very manual.

 

thx for pointing to me that it was a linux classic.

 

Btw it is for controlling a 433 RF emitter

You found a reasonable example of how to initialize and control a serial port in Linux. I wrote similar code for one of my projects. I'm sure there are some libraries to simplify access, but I'm not familiar with them. 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines