Makefile TRANSPORT linker dependencies

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
chrisinabox
Level 1
Level 1
First reply posted First question asked Welcome!

Hi,

I'm currently working on an application using the CYW920706WCDEVAL board. At the moment I'm using a couple of the example project to get started - in particular the a2dp sink and spi bridge example projects. 

Individually I can get the projects to build fine but when I attempted to build some of the SPI functionality into the a2dp example I kept getting linker errors when attempting to find the functions defined in wiced_spi.h:

project_name/main.c:336: undefined reference to `spi_register_tx_rx_handler'
/modustoolbox/tools_2.3/gcc/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: project_name/build/CYW920706WCDEVAL/Debug/spi.o: in function `spi_master_dev_ready_interrupt_handler':
project_name/spi.c:121: undefined reference to `spi_set_event'
/modustoolbox/tools_2.3/gcc/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: project_name/build/CYW920706WCDEVAL/Debug/spi.o: in function `spi_master_start_tx':
project_name/spi.c:228: undefined reference to `spi_set_event'

After some digging I was able to get the project to build by changing the TRANSPORT in the makefile:

TRANSPORT?=SPI
 
This is where before it was - TRANSPORT?=UART.
 
I have been unable to find any documentation for this but clearly this line changes some of the project decencies/libraries. What exactly is this line in the makefile doing and where can I find the documentation to explain this behavior?
 
Thanks

 

0 Likes
3 Replies
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi @chrisinabox ,

The uart_spi bridge app helps to send commands over SPI which are received over UART. Therefore, the Transport needs to be changes to SPI so that application can use SPI interface to send commands further. Probably this needs to be documented clearly. 

However, in uart_spi_bridge.c (in MTB), you will find some explanation in comments.

0 Likes

In my application I am not concerned with receiving commands on the UART, I would just like to use the SPI to configure a separate IC. 

You response suggests that I cannot have the application use the SPI interface without setting the transport correctly? The a2dp demo application won't work without the transport being set to UART as BT Classic pairing no longer works.


Am I missing something here or just misunderstanding the application structure?

 

Thanks

0 Likes
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

You should be able to use A2DP sink independently without using SPI transport. Please check- https://github.com/cypresssemiconductorco/mtb-example-btsdk-audio-a2dp-sink

 

0 Likes