|
今天用mega8 写 nrf24l01程序,出现error,不知道什么原因,网上也找不到合适的,麻烦各位大神帮忙看看~
rm -rf main.o ad.o led.o 2401.o receive.elf dep/* receive.hex receive.eep receive.lss receive.map
Build succeeded with 0 Warnings...
In file included from ../main.c:10:
../2401.h: In function 'nRF24L01_TxPacket':
../2401.h:199: warning: pointer targets in passing argument 2 of 'SPI_Write_Buf' differ in signedness
../2401.h:207:2: warning: "/*" within comment
../2401.h: In function 'init_NRF24L01':
../2401.h:214: warning: pointer targets in passing argument 2 of 'SPI_Write_Buf' differ in signedness
../2401.h:215: warning: pointer targets in passing argument 2 of 'SPI_Write_Buf' differ in signedness
../main.c: In function 'main':
../main.c:21: warning: implicit declaration of function 'nrf2401_init'
avr-gcc -mmcu=atmega8 -Wall -gdwarf-2 -std=gnu99 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT ad.o -MF dep/ad.o.d -c ../ad.c
In file included from ../ad.c:3:
../2401.h: In function 'nRF24L01_TxPacket':
../2401.h:199: warning: pointer targets in passing argument 2 of 'SPI_Write_Buf' differ in signedness
../2401.h:207:2: warning: "/*" within comment
../2401.h: In function 'init_NRF24L01':
../2401.h:214: warning: pointer targets in passing argument 2 of 'SPI_Write_Buf' differ in signedness
../2401.h:215: warning: pointer targets in passing argument 2 of 'SPI_Write_Buf' differ in signedness
In file included from ../2401.c:4:
../2401.h: In function 'nRF24L01_TxPacket':
../2401.h:199: warning: pointer targets in passing argument 2 of 'SPI_Write_Buf' differ in signedness
../2401.h:207:2: warning: "/*" within comment
../2401.h: In function 'init_NRF24L01':
../2401.h:214: warning: pointer targets in passing argument 2 of 'SPI_Write_Buf' differ in signedness
../2401.h:215: warning: pointer targets in passing argument 2 of 'SPI_Write_Buf' differ in signedness
avr-gcc -mmcu=atmega8 -Wl,-Map=receive.map main.o ad.o led.o 2401.o -o receive.elf
ad.o: In function `Delay':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:101: multiple definition of `Delay'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:101: first defined here
ad.o: In function `SPI_RW':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:108: multiple definition of `SPI_RW'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:108: first defined here
ad.o: In function `SPI_RW_Reg':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:147: multiple definition of `SPI_RW_Reg'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:147: first defined here
ad.o: In function `SPI_Write_Buf':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:180: multiple definition of `SPI_Write_Buf'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:180: first defined here
ad.o: In function `nRF24L01_TxPacket':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:197: multiple definition of `nRF24L01_TxPacket'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:197: first defined here
ad.o:(.data+0x1): multiple definition of `TX_ADDRESS'
main.o:(.data+0x1): first defined here
ad.o: In function `init_NRF24L01':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:211: multiple definition of `init_NRF24L01'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:211: first defined here
ad.o:(.data+0x6): multiple definition of `RX_ADDRESS'
main.o:(.data+0x6): first defined here
ad.o: In function `UART_INIT':
D:\T-CTRL\T-ctrl-pro\default/../uartx.h:12: multiple definition of `UART_INIT'
main.o:D:\T-CTRL\T-ctrl-pro\default/../uartx.h:12: first defined here
ad.o: In function `UART_Putchar':
D:\T-CTRL\T-ctrl-pro\default/../uartx.h:23: multiple definition of `UART_Putchar'
main.o:D:\T-CTRL\T-ctrl-pro\default/../uartx.h:23: first defined here
ad.o: In function `UART_Putstring':
D:\T-CTRL\T-ctrl-pro\default/../uartx.h:29: multiple definition of `UART_Putstring'
main.o:D:\T-CTRL\T-ctrl-pro\default/../uartx.h:29: first defined here
ad.o:(.data+0x0): multiple definition of `TxBuf'
main.o:(.data+0x0): first defined here
2401.o: In function `Delay':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:101: multiple definition of `Delay'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:101: first defined here
2401.o: In function `SPI_RW':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:108: multiple definition of `SPI_RW'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:108: first defined here
2401.o: In function `SPI_RW_Reg':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:147: multiple definition of `SPI_RW_Reg'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:147: first defined here
2401.o: In function `SPI_Write_Buf':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:180: multiple definition of `SPI_Write_Buf'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:180: first defined here
2401.o: In function `nRF24L01_TxPacket':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:197: multiple definition of `nRF24L01_TxPacket'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:197: first defined here
2401.o:(.data+0x1): multiple definition of `TX_ADDRESS'
main.o:(.data+0x1): first defined here
2401.o: In function `init_NRF24L01':
D:\T-CTRL\T-ctrl-pro\default/../2401.h:211: multiple definition of `init_NRF24L01'
main.o:D:\T-CTRL\T-ctrl-pro\default/../2401.h:211: first defined here
2401.o:(.data+0x6): multiple definition of `RX_ADDRESS'
main.o:(.data+0x6): first defined here
2401.o:(.data+0x0): multiple definition of `TxBuf'
main.o:(.data+0x0): first defined here
make: *** [receive.elf] Error 1
Build failed with 1 errors and 58 warnings...
|
阿莫论坛20周年了!感谢大家的支持与爱护!!
知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)
|