My app makes use of the UART functions but it does not compile anymore. It seems that there is some conflicts between libat and libdriver.
-With no changes or even if including "driver/uart.h":
Code: Select all
xtensa-lx106-elf-gcc -L../lib -nostdlib -T../ld/eagle.app.v6.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lc -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lcrypto -lmain -ljson -lupgrade -lssl -lwps -lsmartconfig -lairkiss user/.output/eagle/debug/lib/libuser.a -lat -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out
user/.output/eagle/debug/lib/libuser.a(user_main.o): In function `msgbroadcast':
/mnt/Share/app/user/user_main.c:145: undefined reference to `uart0_tx_buffer'
user/.output/eagle/debug/lib/libuser.a(user_main.o): In function `bf_sndbroad':
/mnt/Share/app/user/user_main.c:164: undefined reference to `uart0_tx_buffer'
collect2: error: ld returned 1 exit status
-When modifying the app makefile by adding -ldriver in LINKFLAGS:
Code: Select all
xtensa-lx106-elf-gcc -L../lib -nostdlib -T../ld/eagle.app.v6.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lc -lgcc -lhal -lphy -lpp -lnet80211 -llwip -lwpa -lcrypto -lmain -ljson -lupgrade -lssl -lwps -lsmartconfig -lairkiss -ldriver user/.output/eagle/debug/lib/libuser.a -lat -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out
../lib/libdriver.a(uart.o): In function `uart_tx_one_char':
(.text.uart_tx_one_char+0x8): multiple definition of `uart_tx_one_char'
../lib/libat.a(uart.o):(.text+0xb0): first defined here
../lib/libdriver.a(uart.o): In function `uart0_sendStr':
(.irom0.text+0x1e8): multiple definition of `at_port_print'
../lib/libat.a(uart.o):(.irom0.text+0x228): first defined here
../lib/libdriver.a(uart.o): In function `uart_init':
(.irom0.text+0x224): multiple definition of `uart_init'
../lib/libat.a(uart.o):(.irom0.text+0x290): first defined here
../lib/libdriver.a(uart.o): In function `uart_reattach':
(.irom0.text+0x270): multiple definition of `uart_reattach'
../lib/libat.a(uart.o):(.irom0.text+0x2d0): first defined here
../lib/libdriver.a(uart.o): In function `uart_tx_one_char_no_wait':
(.text.uart_tx_one_char_no_wait+0x8): multiple definition of `uart_tx_one_char_no_wait'
../lib/libat.a(uart.o):(.text+0x238): first defined here
../lib/libdriver.a(uart.o): In function `uart1_sendStr_no_wait':
(.text.uart1_sendStr_no_wait+0x4): multiple definition of `uart1_sendStr_no_wait'
../lib/libat.a(uart.o):(.text+0x25c): first defined here
../lib/libdriver.a(uart.o): In function `uart_rx_intr_disable':
(.text.uart_rx_intr_disable+0x4): multiple definition of `uart_rx_intr_disable'
../lib/libat.a(uart.o):(.text+0x688): first defined here
../lib/libdriver.a(uart.o): In function `uart_rx_intr_enable':
(.text.uart_rx_intr_enable+0x4): multiple definition of `uart_rx_intr_enable'
../lib/libat.a(uart.o):(.text+0x6b0): first defined here
../lib/libdriver.a(uart.o): In function `UART_SetWordLength':
(.irom0.text+0x334): multiple definition of `UART_SetWordLength'
../lib/libat.a(uart.o):(.irom0.text+0x918): first defined here
../lib/libdriver.a(uart.o): In function `UART_SetStopBits':
(.irom0.text+0x360): multiple definition of `UART_SetStopBits'
../lib/libat.a(uart.o):(.irom0.text+0x948): first defined here
../lib/libdriver.a(uart.o): In function `UART_SetLineInverse':
(.irom0.text+0x394): multiple definition of `UART_SetLineInverse'
../lib/libat.a(uart.o):(.irom0.text+0x97c): first defined here
../lib/libdriver.a(uart.o): In function `UART_SetParity':
(.irom0.text+0x3c8): multiple definition of `UART_SetParity'
../lib/libat.a(uart.o):(.irom0.text+0x9b4): first defined here
../lib/libdriver.a(uart.o): In function `UART_SetBaudrate':
(.irom0.text+0x40c): multiple definition of `UART_SetBaudrate'
../lib/libat.a(uart.o):(.irom0.text+0x9f8): first defined here
../lib/libdriver.a(uart.o): In function `UART_SetFlowCtrl':
(.irom0.text+0x458): multiple definition of `UART_SetFlowCtrl'
../lib/libat.a(uart.o):(.irom0.text+0xa44): first defined here
../lib/libdriver.a(uart.o): In function `UART_WaitTxFifoEmpty':
(.irom0.text+0x534): multiple definition of `UART_WaitTxFifoEmpty'
../lib/libat.a(uart.o):(.irom0.text+0xbec): first defined here
../lib/libdriver.a(uart.o): In function `UART_CheckOutputFinished':
(.irom0.text+0x5a0): multiple definition of `UART_CheckOutputFinished'
../lib/libat.a(uart.o):(.irom0.text+0xb40): first defined here
../lib/libdriver.a(uart.o): In function `UART_ResetFifo':
(.irom0.text+0x610): multiple definition of `UART_ResetFifo'
../lib/libat.a(uart.o):(.irom0.text+0xc20): first defined here
../lib/libdriver.a(uart.o): In function `UART_ClearIntrStatus':
(.irom0.text+0x648): multiple definition of `UART_ClearIntrStatus'
../lib/libat.a(uart.o):(.irom0.text+0xc5c): first defined here
../lib/libdriver.a(uart.o): In function `UART_SetIntrEna':
(.irom0.text+0x664): multiple definition of `UART_SetIntrEna'
../lib/libat.a(uart.o):(.irom0.text+0xc78): first defined here
../lib/libdriver.a(uart.o): In function `UART_SetPrintPort':
(.irom0.text+0x698): multiple definition of `UART_SetPrintPort'
../lib/libat.a(uart.o):(.irom0.text+0xca4): first defined here
collect2: error: ld returned 1 exit status