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.

Compiler/IWR1443BOOST: Trying to send config without using demo visualizer

Part Number: IWR1443BOOST

Tool/software: TI C/C++ Compiler

Hi,

I've seen a couple posts on this already. I'm using SDK 2.1 with IWR1443BOOST. I want to customize the CLI code instead of removing it (this approach seems more messy).

I'm currently referencing 

So far, I've added ini_cfg.h and ini_cfg.c to the project in the workspace, and added MmwDemo_IniRSSDSSCfg() at the end of MmwDemo_CLIInit () like the post said. I included ini_cfg.h at the beginning of the mmw_cli.c file. However, I'm getting compilation errors saying that uart_handle is not defined in cli.h, which confuses me since I don't see how this error relates to ini_cfg.

I've also tried putting ini_cfg.h and ini_cfg.c in the sdk (C:\ti\mmwave_sdk_02_01_00_04\packages\ti\demo\xwr14xx\mmw), which doesn't work either. Maybe I need to recompile the sdk files?

Also, should I be commenting out the functions defined as extern in ini_cfg.c that are originally defined in mmw_cli.c?

In summary my question is where to put these files, am I missing any steps here, or is there a better way to do this?

Thanks in advance!

  • Hi Sabrina,

    Please follow the threads mentioned in the following post:

    https://e2e.ti.com/support/sensors/f/1023/p/741912/2740529#2740529

    Make sure to follow the second thread mentioned there as well to avoid any errors when making the changes.

    Regards

    -Nitin

  • Thanks Nitin, I'll try it out with hard-coding the cli.c file in utils folder.

    However, if I wanted to use ini_cfg.h and ini_cfg.c, are you suggesting that I add it to C:\ti\mmwave_sdk_02_01_00_04\packages\ti\utils\cli\src and recompile the CLI library, and add MmwDemo_IniRSSDSSCfg() at the end of MmwDemo_CLIInit() in mmw_cli.c in my workspace? I don't think this is what's intended if I want to make this method work. I just want to know if there is a way to send config without demo visualizer without recompiling the cli library each time.

    Another question I have is how come C:\ti\mmwave_sdk_02_01_00_04\packages\ti\utils\cli\cli.h initiates things like the UART handle when it does not have the drivers included (they are included in mmw_cli.c instead?). 

    Thanks!

  • Hi Sabrina,

    1. We have a provided only one example of hard-coding the configuration and that requires recompiling cli library each time as we add the configuration to the core cli files. There can be other ways you can handle this in software but if you want to use another method (init_cg.c and init_cfg.c), you would need to develop it yourself.

    2. The program is compiled as one image and the UART driver is initialized in MmwDemo_mssInitTask() before calling CLI_open to create the CLI task. So the UART Handle is valid for the CLI task.

    Regards
    -Nitin
  • Hi Nitin,

    Thanks for clearing that up! I have another question regarding the SPI test programs found in the driver folder to ask you.

    I'm trying to set up SPI communication between two IWR1443BOOST devices. I found the test programs found in ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/spi/test/xwr14xx, and want to use this to test that communication. Importing this project into CCS failed, so I ported the projectspec file included in the following post for the awr1642 to the iwr1443.

    The code successfully compiles, loads, and runs on the device. However, from the console output while setup is successful, any test involving SPI_transfer of data fails "Debug: SPI_transfer with data size = 1 failed with error=6.". Console output is shown below, for a test instance where only gXWR1xxxSlaveWithFTDITest and gXWR1xxxSlaveWithXWR1xxx were set to true:

    When the executable is run on the device, the console output appears as the tests are done, over the course of a couple seconds. I want to fix the tests which fail: "Debug: SPI_transfer with data size = 1 failed with error=6" "Debug: SPI_transfer with - data size = 11 failed with error=6" "Debug: SPI_transfer failed with NULL pointers for both TX and RX"    What is error=6?

    Every test which regards the actual transfer of data fails in every configuration thus far attempted. For data to transfer successfully it must presumably be sent to something which would send it back. If the primary device runs the 'gXWR1xxxMasterWithXWR1xxx' test, how should the slave device be configured? Which tests should be toggled? How should they be triggered such that the slave is ready and operational when the Master tests happen?

    Another main confusion is how the physical hardware setup of the test should be done. First, I am correct in loading one device with the 'gXWR1xxxMasterWithXWR1xxx' boolean set to true, and the other with 'gXWR1xxxSlaveWithXWR1xxx' set to true (thus far each device is loaded by a different computer/CCS workspace)?

    The projectspec file used is also attached here.

    <?xml version="1.0" encoding="UTF-8"?>
    
    <projectSpec>
        <project
            name="spitest_mss_14xx"
            deviceFamily="ARM"
            isTargetManual="false"
            device="Cortex R.IWR1443"
            endianness="little"
            cgtVersion="16.9.6.LTS"
            connection="common/targetdb/connections/TIXDS110_Connection.xml"
            toolChain="TI"
            linkerCommandFile="mss_mmw_linker.cmd"
            preannouncebuildStep="Deleting old BIN format image"
            preBuildStep="rm -f ${PROJECT_ROOT}/xwr14xx_mmw.bin;"
            postannouncebuildStep="Preparing BIN format image"
            postBuildStep="${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/create_ConfigRPRC/create_ConfigRPRC.exe -s 0x00000006;${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/out2rprc/out2rprc.exe xwr14xx_mmw_mss.xer4f xwr14xx_mmw_mss.bin;${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/multicore_image_generator/MulticoreImageGen.exe LE 37 0x00000006 xwr14xx_mmw.bin 0xCF910000 xwr14xx_mmw_mss.bin 0xb5510000 ${COM_TI_MMWAVE_SDK_INSTALL_DIR}/firmware/radarss/xwr14xx_radarss_rprc.bin; ${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/crc_multicore_image/crc_multicore_image.exe xwr14xx_mmw.bin xwr14xx_mmw.bin.tmp;${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/append_bin_crc/gen_bincrc32.exe xwr14xx_mmw.bin;"
            description="spi driver test"
            launchWizard="false"
            configurations="Debug, Release"
            compilerBuildOptions="
            -mv7R4 --code_state=16 --float_support=VFPv3D16 -me -O3 -eo=.oer4f
            -I${PROJECT_ROOT}
            -I${CG_TOOL_ROOT}/include
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages
            -I${COM_TI_MMWAVE_SDK_INCLUDE_PATH}
            -D${COM_TI_MMWAVE_SDK_SYMBOLS}
            -D${BIOS_SYMBOLS}
            -DSOC_XWR14XX
            -DSUBSYS_MSS
            -DDOWNLOAD_FROM_CCS
            -DMMWAVE_L3RAM_NUM_BANK=6
            -DMMWAVE_SHMEM_TCMA_NUM_BANK=0
            -DMMWAVE_SHMEM_TCMB_NUM_BANK=0
            -DMMWAVE_SHMEM_BANK_SIZE=0x10000
            -DDebugP_ASSERT_ENABLED
            -D_LITTLE_ENDIAN
            -g --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --enum_type=packed --abi=eabi"
            linkerBuildOptions="
            -mxwr14xx_mmw_mss.map -oxwr14xx_mmw_mss.xer4f
            -I${COM_TI_MMWAVE_SDK_LIBRARY_PATH}
            -I${CG_TOOL_ROOT}/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/control/mmwave/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/control/mmwavelink/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/crc/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/dma/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/esm/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/gpio/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/mailbox/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/osal/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/pinmux/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/soc/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/uart/lib
    		-I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/spi/lib
            -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/utils/cli/lib
    		-I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/utils/testlogger/lib
            -llibosal_xwr14xx.aer4f
            -llibesm_xwr14xx.aer4f
            -llibgpio_xwr14xx.aer4f
            -llibsoc_xwr14xx.aer4f
            -llibpinmux_xwr14xx.aer4f
            -llibcrc_xwr14xx.aer4f
            -llibdma_xwr14xx.aer4f
            -llibuart_xwr14xx.aer4f
            -llibmailbox_xwr14xx.aer4f
            -llibmmwavelink_xwr14xx.aer4f
            -llibmmwave_xwr14xx.aer4f
            -llibcli_xwr14xx.aer4f
    		-llibtestlogger_xwr14xx.aer4f
    		-llibspi_xwr14xx.aer4f
            --define=MMWAVE_L3RAM_NUM_BANK=6
            --define=MMWAVE_SHMEM_TCMA_NUM_BANK=0
            --define=MMWAVE_SHMEM_TCMB_NUM_BANK=0
            --define=MMWAVE_SHMEM_BANK_SIZE=0x10000
            --reread_libs --diag_warning=225 --diag_wrap=off --display_error_number --warn_sections --xml_link_info=xwr14xx_mmw_linkInfo.xml --rom_model --unused_section_elimination=on --disable_auto_rts -lrtsv7R4_T_le_v3D16_eabi.lib">
    
            <!-- Project properties -->
            <property name="type" value="rtsc"/>
            <property name="products" value="com.ti.rtsc.SYSBIOS:6.53.02.00;com.ti.MMWAVE_SDK:2.1.0.04;"/>
            <property name="xdcToolsVersion" value="3.50.04.43_core"/>
            <property name="target" value="ti.targets.arm.elf.R4F"/>
            <property name="platform" value="ti.platforms.cortexR:IWR14XX:false:200"/>
            <property name="endianness" value="little"/>
            <property name="output_format" value="elf"/>
            <property name="buildProfile" value="release"/>
    
            <!-- Project files -->
            <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/drivers/spi/test/xwr14xx/main.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/drivers/spi/test/xwr14xx/mss.cfg" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/drivers/spi/test/common/test_common.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/drivers/spi/test/common/test_common.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/drivers/spi/test/xwr14xx/mss_spi_linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy"/>
            <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/platform/xwr14xx/r4f_linker.cmd" openOnCreation="false" excludeFromBuild="false"/>
    
        </project>
    </projectSpec>
    

  • Hi Sabrina,

    This is a separate topic. Please create a new thread for this question so that it can be assigned appropriately.

    Regards
    -Nitin