리눅스
라즈베리파이 서보블라스터 깔려고 하는데 에러가 나는데 이유 좀 알려주세요.

gcc -Wall -g -O2 -L/opt/vc/lib -I/opt/vc/include -o servod servod.c mailbox.c -lm -lbcm_host

servod.c: In function ‘get_model_and_revision’:

servod.c:994:6: warning: implicit declaration of function ‘bcm_host_is_model_pi4’; did you mean ‘bcm_host_deinit’? [-Wimplicit-function-declaration]

  if (bcm_host_is_model_pi4()) {

      ^~~~~~~~~~~~~~~~~~~~~

      bcm_host_deinit

servod.c: In function ‘main’:

servod.c:1383:19: warning: implicit declaration of function ‘bcm_host_get_model_type’; did you mean ‘bcm_host_get_sdram_address’? [-Wimplicit-function-declaration]

   int bcm_model = bcm_host_get_model_type();

                   ^~~~~~~~~~~~~~~~~~~~~~~

                   bcm_host_get_sdram_address

/usr/bin/ld: /tmp/ccTGda9C.o: in function `get_model_and_revision':

/home/pi/PiBits/ServoBlaster/user/servod.c:994: undefined reference to `bcm_host_is_model_pi4'

/usr/bin/ld: /tmp/ccTGda9C.o: in function `main':

/home/pi/PiBits/ServoBlaster/user/servod.c:1383: undefined reference to `bcm_host_get_model_type'

collect2: error: ld returned 1 exit status

make: *** [Makefile:6: servod] 오류 1

pi@raspberrypi:~/PiBits/ServoBlaster/user $ make servod

'gcc -Wall -g -O2 -L/opt/vc/lib -I/opt/vc/include -o servod servod.c mailbox.c -lm -lbcm_host

servod.c: In function ‘get_model_and_revision’:

servod.c:994:6: warning: implicit declaration of function ‘bcm_host_is_model_pi4’; did you mean ‘bcm_host_deinit’? [-Wimplicit-function-declaration]

  if (bcm_host_is_model_pi4()) {

      ^~~~~~~~~~~~~~~~~~~~~

      bcm_host_deinit

servod.c: In function ‘main’:

servod.c:1383:19: warning: implicit declaration of function ‘bcm_host_get_model_type’; did you mean ‘bcm_host_get_sdram_address’? [-Wimplicit-function-declaration]

   int bcm_model = bcm_host_get_model_type();

                   ^~~~~~~~~~~~~~~~~~~~~~~

                   bcm_host_get_sdram_address

/usr/bin/ld: /tmp/cckA28YR.o: in function `get_model_and_revision':

/home/pi/PiBits/ServoBlaster/user/servod.c:994: undefined reference to `bcm_host_is_model_pi4'

/usr/bin/ld: /tmp/cckA28YR.o: in function `main':

/home/pi/PiBits/ServoBlaster/user/servod.c:1383: undefined reference to `bcm_host_get_model_type'

collect2: error: ld returned 1 exit status

make: *** [Makefile:6: servod] 오류 1

 

   int bcm_model 선언이 문제인지 아니면 bcm_host_get_model_type(); 이 문제인지 잘 모르겠습니다. 일단 

 라즈베리파이 모델은 라즈베리3 모델 B+ 입니다. 이유 좀 알고 싶어요.

댓글 1