LowCostLoRaGw icon indicating copy to clipboard operation
LowCostLoRaGw copied to clipboard

Compilation error on RPI02W

Open asprakash opened this issue 2 years ago • 2 comments

HI @CongducPham I am trying to compile lora_gateway manually for RPI0W2 Board since the existing gateway image wont work for RPI0W and the Raspberry Pi team already released RPI0W2 which is running by 64bit processor.

I am getting the following error when I am compiling the source. Any kind of support is appreciated.

sudo scripts/basic_config_gw.sh 
eth0: error fetching interface information: Device not found
Keep a copy of /home/pi/lora_gateway/scripts/update_gw.sh
mkdir: cannot create directory ‘/home/pi/scripts’: File exists
Done
Creating /home/pi/lora_gateway/gateway_id.txt file
Writing 0000E45F018F62D8
Done
Creating /home/pi/lora_gateway/gateway_id.md5 file
Done
Replacing gw id in /home/pi/lora_gateway/gateway_conf.json
Done
Creating /home/pi/Dropbox/LoRa-test
Done
Creating log -> /home/pi/Dropbox/LoRa-test
Done
Replacing hot-spot ssid in /etc/hostapd/hostapd.conf
sed: can't read /etc/hostapd/hostapd.conf: No such file or directory
Done
Gateway WiFi ssid is WAZIUP_PI_GW_E45F018F62D8
Setting wpa_passphrase in /etc/hostapd/hostapd.conf
sed: can't read /etc/hostapd/hostapd.conf: No such file or directory
Done
Gateway WiFi wpa_passphrase is loragateway
Setting gateway to run at boot
Removing /home/pi/lora_gateway/scripts/start_gw.sh in /etc/rc.local if any
Done
Add /home/pi/lora_gateway/scripts/start_gw.sh in /etc/rc.local
Done
Compile lora_gateway executable
/home/pi/lora_gateway /home/pi/lora_gateway
cd SX1272; rm -rf *.o; cd ../SX12XX; rm -rf *.o; cd ..
rm -rf *.o lora_gateway simple_lora_gateway simple_lora_transmitter ranging_slave SX1272_lora_gateway SX1272_lora_gateway_pi* SX12?X_lora_gateway SX12?X_lora_gateway_pi* SX12?X_simple_lora_gateway SX12?X_simple_lora_gateway_pi* SX12?X_simple_lora_transmitter SX12?X_simple_lora_transmitter_pi* SX1280_ranging_slave SX1280_ranging_slave_pi* *_wiring
Revision code is 0x902120
type code is (hex) 12
type code is (dec) 18
Don't know, sorry
>RPI4
g++ -DPABOOST -DMAX_DBM=14 -DBAND868 -lwiringPi -DGETOPT_ISSUE  -lwiringPiDev -lwiringPi -lwiringPiDev  -I SX12XX -I . -DSX127X -c SX12XX_lora_gateway.cpp -o SX127X_lora_gateway_wiring.o
g++ -DPABOOST -DMAX_DBM=14 -DBAND868 -lwiringPi -DGETOPT_ISSUE  -lwiringPiDev -c arduinoPi.cpp -o arduinoPi.o		
g++ -DPABOOST -DMAX_DBM=14 -DBAND868 -lwiringPi -DGETOPT_ISSUE  -lwiringPiDev -I SX12XX -I . -c SX12XX/SX127XLT.cpp -o SX12XX/SX127XLT_wiring.o
g++ -c base64.c -o base64.o	
g++ -lrt -lpthread -lwiringPi -lwiringPiDev  SX127X_lora_gateway_wiring.o arduinoPi.o SX12XX/SX127XLT_wiring.o base64.o -o SX127X_lora_gateway_wiring
/usr/bin/ld: SX127X_lora_gateway_wiring.o: in function `setup()':
SX12XX_lora_gateway.cpp:(.text+0x9c8): undefined reference to `delay'
/usr/bin/ld: SX127X_lora_gateway_wiring.o: in function `loop()':
SX12XX_lora_gateway.cpp:(.text+0xc98): undefined reference to `millis'
/usr/bin/ld: SX12XX_lora_gateway.cpp:(.text+0x1124): undefined reference to `millis'
/usr/bin/ld: SX12XX_lora_gateway.cpp:(.text+0x1308): undefined reference to `millis'
/usr/bin/ld: SX12XX_lora_gateway.cpp:(.text+0x1470): undefined reference to `delay'
/usr/bin/ld: SX12XX_lora_gateway.cpp:(.text+0x14a4): undefined reference to `delay'
/usr/bin/ld: SX12XX_lora_gateway.cpp:(.text+0x16c8): undefined reference to `millis'
/usr/bin/ld: SX12XX_lora_gateway.cpp:(.text+0x18f4): undefined reference to `millis'
/usr/bin/ld: SX12XX_lora_gateway.cpp:(.text+0x1b3c): undefined reference to `millis'
/usr/bin/ld: arduinoPi.o: in function `SPIPi::begin()':
arduinoPi.cpp:(.text+0x180c): undefined reference to `wiringPiSPISetup'
/usr/bin/ld: arduinoPi.o: in function `SPIPi::transfer(unsigned char)':
arduinoPi.cpp:(.text+0x18e8): undefined reference to `wiringPiSPIDataRW'
/usr/bin/ld: arduinoPi.o: in function `SPIPi::transfernb(char*, char*, unsigned int)':
arduinoPi.cpp:(.text+0x1928): undefined reference to `wiringPiSPIDataRW'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::begin(signed char, signed char, signed char, signed char, signed char, unsigned char)':
SX127XLT.cpp:(.text+0x88): undefined reference to `wiringPiSetup'
/usr/bin/ld: SX127XLT.cpp:(.text+0x10c): undefined reference to `pinMode'
/usr/bin/ld: SX127XLT.cpp:(.text+0x120): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x134): undefined reference to `pinMode'
/usr/bin/ld: SX127XLT.cpp:(.text+0x148): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x16c): undefined reference to `pinMode'
/usr/bin/ld: SX127XLT.cpp:(.text+0x190): undefined reference to `pinMode'
/usr/bin/ld: SX127XLT.cpp:(.text+0x1b4): undefined reference to `pinMode'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::begin(signed char, signed char, signed char, unsigned char)':
SX127XLT.cpp:(.text+0x224): undefined reference to `wiringPiSetup'
/usr/bin/ld: SX127XLT.cpp:(.text+0x2a8): undefined reference to `pinMode'
/usr/bin/ld: SX127XLT.cpp:(.text+0x2bc): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x2d0): undefined reference to `pinMode'
/usr/bin/ld: SX127XLT.cpp:(.text+0x2e4): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x308): undefined reference to `pinMode'
/usr/bin/ld: SX127XLT.cpp:(.text+0x32c): undefined reference to `pinMode'
/usr/bin/ld: SX127XLT.cpp:(.text+0x350): undefined reference to `pinMode'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::resetDevice()':
SX127XLT.cpp:(.text+0x3bc): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3c4): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3d8): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3e0): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3f8): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x400): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x414): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x41c): undefined reference to `delay'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::setSleep(unsigned char)':
SX127XLT.cpp:(.text+0x4c4): undefined reference to `delay'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::calibrateImage(unsigned char)':
SX127XLT.cpp:(.text+0x654): undefined reference to `delay'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::isReceiveDone()':
SX127XLT.cpp:(.text+0x990): undefined reference to `digitalRead'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::isTransmitDone()':
SX127XLT.cpp:(.text+0x9d0): undefined reference to `digitalRead'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::writeRegister(unsigned char, unsigned char)':
SX127XLT.cpp:(.text+0xa40): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0xa54): undefined reference to `wiringPiSPIDataRW'
/usr/bin/ld: SX127XLT.cpp:(.text+0xa68): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::readRegister(unsigned char)':
SX127XLT.cpp:(.text+0xab8): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0xacc): undefined reference to `wiringPiSPIDataRW'
/usr/bin/ld: SX127XLT.cpp:(.text+0xae0): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::isRXdone()':
SX127XLT.cpp:(.text+0x2bb8): undefined reference to `digitalRead'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::isTXdone()':
SX127XLT.cpp:(.text+0x2bf8): undefined reference to `digitalRead'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::receive(unsigned char*, unsigned char, unsigned int, unsigned char)':
SX127XLT.cpp:(.text+0x2de4): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x2dec): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x2e2c): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x2e6c): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x2eac): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x2ecc): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x2f08): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x2f48): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3008): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3074): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::receiveAddressed(unsigned char*, unsigned char, unsigned int, unsigned char)':
SX127XLT.cpp:(.text+0x3170): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3178): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x31b8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x31f8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3238): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3258): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3294): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x32d4): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3374): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3488): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3514): undefined reference to `delay'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::receiveRTSAddressed(unsigned char*, unsigned char, unsigned int, unsigned char)':
SX127XLT.cpp:(.text+0x371c): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x372c): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x376c): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x37ac): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x37ec): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3814): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x384c): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x388c): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3914): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3a24): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::readPacket(unsigned char*, unsigned char)':
SX127XLT.cpp:(.text+0x3b20): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3b88): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::readPacketAddressed(unsigned char*, unsigned char)':
SX127XLT.cpp:(.text+0x3c3c): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o:SX127XLT.cpp:(.text+0x3d14): more undefined references to `digitalWrite' follow
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::transmit(unsigned char*, unsigned char, unsigned int, signed char, unsigned char)':
SX127XLT.cpp:(.text+0x3eec): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x3f2c): undefined reference to `millis'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::transmitAddressed(unsigned char*, unsigned char, char, char, char, unsigned int, signed char, unsigned char)':
SX127XLT.cpp:(.text+0x4040): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x410c): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x41f0): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x4230): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x42fc): undefined reference to `delay'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::receiveSXBuffer(unsigned char, unsigned int, unsigned char)':
SX127XLT.cpp:(.text+0x4df0): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x4df8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x4e38): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x4e78): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x4eb8): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x4ec0): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x4ee8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x4f28): undefined reference to `millis'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::transmitSXBuffer(unsigned char, unsigned char, unsigned int, signed char, unsigned char)':
SX127XLT.cpp:(.text+0x50e8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x5128): undefined reference to `millis'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o:SX127XLT.cpp:(.text+0x5174): more undefined references to `millis' follow
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::printSXBufferHEX(unsigned char, unsigned char)':
SX127XLT.cpp:(.text+0x5210): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x5278): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::printSXBufferASCII(unsigned char, unsigned char)':
SX127XLT.cpp:(.text+0x52d8): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x5338): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::fillSXBuffer(unsigned char, unsigned char, unsigned char)':
SX127XLT.cpp:(.text+0x53b0): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o:SX127XLT.cpp:(.text+0x5400): more undefined references to `digitalWrite' follow
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::rxtxInit(signed char, signed char)':
SX127XLT.cpp:(.text+0x6094): undefined reference to `pinMode'
/usr/bin/ld: SX127XLT.cpp:(.text+0x60a4): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x60b4): undefined reference to `pinMode'
/usr/bin/ld: SX127XLT.cpp:(.text+0x60c4): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::rxEnable()':
SX127XLT.cpp:(.text+0x60f4): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6108): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::txEnable()':
SX127XLT.cpp:(.text+0x6138): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x614c): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o:SX127XLT.cpp:(.text+0x61bc): more undefined references to `digitalWrite' follow
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::toneFM(unsigned short, unsigned int, unsigned int, float, signed char)':
SX127XLT.cpp:(.text+0x61f0): undefined reference to `wiringPiSPIDataRW'
/usr/bin/ld: SX127XLT.cpp:(.text+0x621c): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x637c): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x63b0): undefined reference to `wiringPiSPIDataRW'
/usr/bin/ld: SX127XLT.cpp:(.text+0x63c4): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x63cc): undefined reference to `delayMicroseconds'
/usr/bin/ld: SX127XLT.cpp:(.text+0x63e0): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6414): undefined reference to `wiringPiSPIDataRW'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6428): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6430): undefined reference to `delayMicroseconds'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6454): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6488): undefined reference to `wiringPiSPIDataRW'
/usr/bin/ld: SX127XLT.cpp:(.text+0x649c): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::getDeviceTemperature()':
SX127XLT.cpp:(.text+0x65e4): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x660c): undefined reference to `delay'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::setRfFrequencyDirect(unsigned char, unsigned char, unsigned char)':
SX127XLT.cpp:(.text+0x6754): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6788): undefined reference to `wiringPiSPIDataRW'
/usr/bin/ld: SX127XLT.cpp:(.text+0x679c): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::getRfFrequencyRegisters(unsigned char*)':
SX127XLT.cpp:(.text+0x67d0): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6804): undefined reference to `wiringPiSPIDataRW'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6844): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::startFSKRTTY(unsigned int, unsigned char, unsigned short, unsigned short, unsigned short)':
SX127XLT.cpp:(.text+0x699c): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x69b4): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x69e8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6a04): undefined reference to `millis'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::transmitFSKRTTY(unsigned char, unsigned char, unsigned char, unsigned char, unsigned short, signed char)':
SX127XLT.cpp:(.text+0x6a74): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6a94): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6ab8): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6b04): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6b08): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6b48): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6b90): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6bd0): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6c00): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6c38): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6cb4): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6cfc): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6d78): undefined reference to `micros'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o:SX127XLT.cpp:(.text+0x6df4): more undefined references to `micros' follow
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::transmitFSKRTTY(unsigned char, unsigned char, unsigned char, unsigned char, unsigned short, signed char)':
SX127XLT.cpp:(.text+0x6e7c): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6ea0): undefined reference to `micros'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::transmitFSKRTTY(unsigned char, unsigned short, signed char)':
SX127XLT.cpp:(.text+0x6f08): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6f28): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6f4c): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6f98): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6f9c): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x6fd8): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7014): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7054): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7084): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x70bc): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x70ec): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7110): undefined reference to `micros'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::transmitReliable(unsigned char*, unsigned char, char, char, char, unsigned int, signed char, unsigned char)':
SX127XLT.cpp:(.text+0x736c): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x74c4): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x759c): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x75dc): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x76a8): undefined reference to `delay'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::receiveReliable(unsigned char*, unsigned char, char, char, char, unsigned int, unsigned char)':
SX127XLT.cpp:(.text+0x7ae0): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7ae8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7b28): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7b68): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7ba8): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7bc8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7c04): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7c44): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7ce4): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7e94): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x7f98): undefined reference to `delay'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::receiveFT(unsigned char*, unsigned char, char, char, char, unsigned int, unsigned char)':
SX127XLT.cpp:(.text+0x8180): undefined reference to `digitalRead'
/usr/bin/ld: SX127XLT.cpp:(.text+0x81a4): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x81c4): undefined reference to `digitalRead'
/usr/bin/ld: SX127XLT.cpp:(.text+0x81d4): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x8218): undefined reference to `digitalRead'
/usr/bin/ld: SX127XLT.cpp:(.text+0x82a4): undefined reference to `digitalWrite'
/usr/bin/ld: SX127XLT.cpp:(.text+0x83dc): undefined reference to `digitalWrite'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::doCAD(unsigned char)':
SX127XLT.cpp:(.text+0x85b0): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x85dc): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x85e8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x860c): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x8644): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x866c): undefined reference to `micros'
/usr/bin/ld: SX127XLT.cpp:(.text+0x875c): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x8838): undefined reference to `millis'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::CarrierSense1(unsigned char, bool, bool)':
SX127XLT.cpp:(.text+0x8ca4): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x8cc8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x8d90): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x8d94): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x8db8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x8eb8): undefined reference to `delay'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::CarrierSense2(unsigned char, bool)':
SX127XLT.cpp:(.text+0x9084): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x90a8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x92f4): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x92f8): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x931c): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x9420): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x946c): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x94a4): undefined reference to `millis'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o:SX127XLT.cpp:(.text+0x963c): more undefined references to `millis' follow
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::CarrierSense3(unsigned char)':
SX127XLT.cpp:(.text+0x96f8): undefined reference to `delay'
/usr/bin/ld: SX127XLT.cpp:(.text+0x976c): undefined reference to `delay'
/usr/bin/ld: SX12XX/SX127XLT_wiring.o: in function `SX127XLT::CollisionAvoidance0(unsigned char, unsigned char)':
SX127XLT.cpp:(.text+0x9a60): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x9a84): undefined reference to `millis'
/usr/bin/ld: SX127XLT.cpp:(.text+0x9f4c): undefined reference to `delay'
collect2: error: ld returned 1 exit status
make: *** [makefile:412: SX127X_lora_gateway_wiring] Error 1

asprakash avatar Jun 24 '22 13:06 asprakash

Hi, first I think that your RPI0 is not detected by our script, see lines: Revision code is 0x902120 type code is (hex) 12 type code is (dec) 18 Don't know, sorry

are you compiling for the new RPI0W2 with 64-bit OS? If yes, then you also need to get the wiring lib for 64-bit OS. see https://github.com/CongducPham/LowCostLoRaGw/blob/master/gw_full_latest/README-WiringPi-64bit-OS.md

I believe there are some errors due to that.

hope that helps. regards,

CongducPham avatar Jul 03 '22 07:07 CongducPham

Here is a patch to fix this compilation problem:

@@ -363,7 +357,7 @@ SX1280_ranging_slave_pi4: SX1280_ranging_slave.o arduPi_pi4.o SX12XX/SX128XLT_ar
 #SX12XX test gateway 
 ####################
 SX126X_simple_lora_gateway_wiring: SX126X_simple_lora_gateway_wiring.o arduinoPi.o SX12XX/SX126XLT_wiring.o base64.o
-       g++ -lrt -lpthread -lwiringPi SX126X_simple_lora_gateway_wiring.o arduinoPi.o SX12XX/SX126XLT_wiring.o base64.o -o SX126X_simple_lora_gateway_wiring
+       g++ -lrt -lpthread -lwiringPi SX126X_simple_lora_gateway_wiring.o arduinoPi.o SX12XX/SX126XLT_wiring.o base64.o -o SX126X_simple_lora_gateway_wiring -lwiringPi
        rm -f lora_gateway

kholia avatar Jul 17 '23 15:07 kholia