This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1642: Building Library Similar to the SDK

Part Number: AWR1642

Hi Radar Team,

My customer wants to create an SDK-like library. He needs this for the his team in a different country so that they have the ability to link to their applications and provide some services to connect to the SBL. It will contain some utilities that require reading from the eFlash so will need the QSPI.

His first attempt was to create a library project, but this did not allow linking with the QSPI SDK. He is now trying to do it with an executable project but this requires a main() function for it to compile successfully. He says that even if he forced this, it would cause linking issues when they would build the application since there would be 2 instances of main(). Since we built our SDK similarly, do we have any recommendations on how to accomplish this?

Thanks!
Barend

  • Barend,

    I am trying to understand in the context of the SDK what the customer is trying to do.

    The SDK has 2 main components: OOB Demo and Drivers.

    Can you please provide more details/example of what the customer is trying to accomplish?

    Thank you
    Cesar
  • Hi Barend,

    If I understand correctly, the customer is wanting to create a standalone library that will link into an application. This is what all of the mmWave SDK's drivers do.

    He/they should not be trying to link any other library into this code - such as QSPI.  It should simply reference it via #include statements. There will be no main() because it is a library.  I suspect the point of failure is that they are trying to link it as an executable instead of an archive (library).  An executable *does* need to link in all referenced libraries as well as provide an entry point for the program.

    If you trace the CRC driver's makefile for linking you find:

    crcDrv: buildDirectories $(CRC_R4F_DRV_LIB_OBJECTS) $(CRC_C674_DRV_LIB_OBJECTS)
    	if [ ! -d "lib" ]; then mkdir lib; fi
    	echo "Archiving $@"
    	$(R4F_AR) $(R4F_AR_OPTS) $(CRC_R4F_DRV_LIB) $(CRC_R4F_DRV_LIB_OBJECTS)
    ifneq ($(filter $(MMWAVE_SDK_DEVICE_TYPE),xwr16xx xwr18xx xwr68xx), )
    	$(C674_AR) $(C674_AR_OPTS) $(CRC_C674_DRV_LIB) $(CRC_C674_DRV_LIB_OBJECTS)
    endif
    

    Where: C674_AR = $(C674_CODEGEN_INSTALL_PATH)/bin/ar6x

     

    The CRC driver's test code (which is an executable) uses a different tool: 

    dssTest: buildDirectories dssRTSC $(CRC_DSS_TEST_OBJECTS)
    $(C674_LD) $(C674_LDFLAGS) $(CRC_DSS_TEST_LOC_LIBS) $(CRC_DSS_TEST_STD_LIBS) \

    Where: C674_LD = $(C674_CODEGEN_INSTALL_PATH)/bin/cl6x