По теме - А как запустить MySensorsRaspberryPiTCP на OrangePi PC с DietPi от Сергея?
Простой повтор
инструкций приводит к ошибке на сборке MyGateway
Код: Выделить всё
root@DietPi:~/MySensorsRaspberryPiTCP# make all-------------------------------------------------+
g++ -c -o MyGateway.o MyGateway.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -mtune=arm1176jzf-s -march=armv6zk -I. -I/usr/local/include/RF24
In file included from /usr/include/features.h:374:0,
from /usr/include/string.h:25,
from MyMessage.h:26,
from MySensor.h:18,
from MyGateway.h:16,
from MyGateway.cpp:13:
/usr/include/string.h: In function ‘void* memchr(void*, int, size_t)’:
/usr/include/string.h:83:41: sorry, unimplemented: Thumb-1 hard-float VFP ABI
memchr (void *__s, int __c, size_t __n) __THROW
^
Makefile:49: ошибка выполнения рецепта для цели «MyGateway.o»
make: *** [MyGateway.o] Ошибка 1
root@DietPi:~/MySensorsRaspberryPiTCP#
Гугл сказа что ругается на неправильный выбор arm
подправил Makefile
Код: Выделить всё
ifeq (${PIREV},$(filter ${PIREV},a01041 a21041))
# a01041 and a21041 are PI 2 Model B and armv7
CCFLAGS += -march=armv7-a
else
# anything else is armv6
CCFLAGS += -march=armv6zk
endif
ручками подменив на
Код: Выделить всё
ifeq (${PIREV},$(filter ${PIREV},a01041 a21041))
# a01041 and a21041 are PI 2 Model B and armv7
CCFLAGS += -march=armv7-a
else
# anything else is armv6
CCFLAGS += -march=armv7-a
endif
make all пробежал дальше до PiGatewayTCP.cpp и снова встал
Код: Выделить всё
root@DietPi:~/MySensorsRaspberryPiTCP# make all
g++ -c -o PiGatewayTCP.o PiGatewayTCP.cpp -Wall -Ofast -mfpu=vfp -lpthread -g -D__Raspberry_Pi -mfloat-abi=hard -mtune=arm1176jzf-s -march=armv7-a -I. -I/usr/local/include/RF24
In file included from ./MySensor.h:18:0,
from ./MyGateway.h:16,
from PiGatewayTCP.cpp:39:
/usr/include/c++/4.9/bits/streambuf.tcc: In member function ‘virtual std::streamsize std::basic_streambuf<_CharT, _Traits>::xsgetn(std::basic_streambuf<_CharT, _Traits>::char_type*, std::streamsize)’:
./MyMessage.h:20:19: error: expected unqualified-id before ‘(’ token
#define min(a,b) (a<b?a:b)
^
/usr/include/c++/4.9/bits/streambuf.tcc: In member function ‘virtual std::streamsize std::basic_streambuf<_CharT, _Traits>::xsputn(const char_type*, std::streamsize)’:
./MyMessage.h:20:19: error: expected unqualified-id before ‘(’ token
#define min(a,b) (a<b?a:b)
^
/usr/include/c++/4.9/bits/istream.tcc: In member function ‘std::streamsize std::basic_istream<_CharT, _Traits>::readsome(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize)’:
./MyMessage.h:20:19: error: expected unqualified-id before ‘(’ token
#define min(a,b) (a<b?a:b)
^
PiGatewayTCP.cpp: In function ‘int main(int, char**)’:
PiGatewayTCP.cpp:255:21: error: ‘RPI_V2_GPIO_P1_22’ was not declared in this scope
gw = new MyGateway(RPI_V2_GPIO_P1_22, BCM2835_SPI_CS0,
^
PiGatewayTCP.cpp:255:40: error: ‘BCM2835_SPI_CS0’ was not declared in this scope
gw = new MyGateway(RPI_V2_GPIO_P1_22, BCM2835_SPI_CS0,
^
PiGatewayTCP.cpp:256:4: error: ‘BCM2835_SPI_SPEED_8MHZ’ was not declared in this scope
BCM2835_SPI_SPEED_8MHZ, 1);
^
Makefile:49: ошибка выполнения рецепта для цели «PiGatewayTCP.o»
make: *** [PiGatewayTCP.o] Ошибка 1
Ну тут пока торможу
ЗЫ:
cat /proc/cpuinfo
Processor : ARMv7 Processor rev 5 (v7l)
processor : 0
BogoMIPS : 4800.00
processor : 1
BogoMIPS : 4800.00
processor : 2
BogoMIPS : 4800.00
processor : 3
BogoMIPS : 4800.00
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : sun8i
Revision : 0000
Serial : 54005035470424340b4e