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.

LP-CC1352P7: migration from audio example @CC1352P1

Part Number: LP-CC1352P7
Other Parts Discussed in Thread: CC1352P7, TLV320AIC3254, SYSCONFIG

Tool/software:

Hi,

I want to migrate a "audiohal_packetizer_echo_CC1352P1_LAUNCHXL_tirtos_ccs" project @ CC1352P1 unning in TI-RTOS

to a "audiohal_packetizer_echo_LP_CC1352P7_1_tirtos7_gcc" @ CC1352P7-1 running in TI-RTOS7.

After overwriting audiohal_packetizer_echo_CC1352P1_LAUNCHXL_tirtos_ccs in "i2secho_CC1352P1_LAUNCHXL_tirtos7_gcc" example,

modifying audiohal_packetizer_echo.c and main_tirtos.c, and

adding COM_TI_SIMPLELINK_AUDIO_PLUGIN_INSTALL_DIR to C/C++ Build>Environment, the following errors occurred when building.

>>>> console messages >>>>
**** Build of configuration Debug for project audiohal_packetizer_echo_LP_CC1352P7_1_tirtos7_gcc ****

"C:\\ti\\ccs1281\\ccs\\utils\\bin\\gmake" -k -j 8 all -O

Building file: "../audiohal_packetizer_echo.c"
Invoking: GNU Compiler
"C:/ti/gcc_arm_none_eabi_9_2_1/bin/arm-none-eabi-gcc-9.2.1.exe" -c -mcpu=cortex-m4 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -I"C:/ti/workspace_v12/audiohal_packetizer_echo_LP_CC1352P7_1_tirtos7_gcc" -I"C:/ti/workspace_v12/audiohal_packetizer_echo_LP_CC1352P7_1_tirtos7_gcc/Debug" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/kernel/tirtos7/packages" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source/ti/posix/gcc" -I"C:/ti/gcc_arm_none_eabi_9_2_1/arm-none-eabi/include/newlib-nano" -I"C:/ti/gcc_arm_none_eabi_9_2_1/arm-none-eabi/include" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/stream" -O3 -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF"audiohal_packetizer_echo.d_raw" -MT"audiohal_packetizer_echo.o" -I"C:/ti/workspace_v12/audiohal_packetizer_echo_LP_CC1352P7_1_tirtos7_gcc/Debug/syscfg" -std=c99 @"syscfg/ti_utils_build_compiler.opt" -o"audiohal_packetizer_echo.o" "../audiohal_packetizer_echo.c"
subdir_rules.mk:9: recipe for target 'audiohal_packetizer_echo.o' failed
gmake: *** No rule to make target 'C:/ti/ccs1281/ccs/eclipse/COM_TI_SIMPLELINK_AUDIO_PLUGIN_INSTALL_DIR/source/ti/audio/hal/AudioHAL.c', needed by 'AudioHAL/AudioHAL.o'.
gmake: *** No rule to make target 'C:/ti/ccs1281/ccs/eclipse/COM_TI_SIMPLELINK_AUDIO_PLUGIN_INSTALL_DIR/source/ti/audio/hal/codec/AudioHALCodec.c', needed by 'AudioHAL/AudioHALCodec.o'.
gmake: *** No rule to make target 'C:/ti/ccs1281/ccs/eclipse/COM_TI_SIMPLELINK_AUDIO_PLUGIN_INSTALL_DIR/source/ti/audio/hal/codec/AudioHAL_I2C.c', needed by 'AudioHAL/AudioHAL_I2C.o'.
gmake: *** No rule to make target 'C:/ti/ccs1281/ccs/eclipse/COM_TI_SIMPLELINK_AUDIO_PLUGIN_INSTALL_DIR/source/ti/audio/hal/codec/MCLKCC26XX.c', needed by 'AudioHAL/MCLKCC26XX.o'.
gmake: *** No rule to make target 'C:/ti/ccs1281/ccs/eclipse/COM_TI_SIMPLELINK_AUDIO_PLUGIN_INSTALL_DIR/source/ti/audio/hal/codec/TLV320AIC3254.c', needed by 'AudioHAL/TLV320AIC3254.o'.
gmake: *** No rule to make target 'C:/ti/ccs1281/ccs/eclipse/COM_TI_SIMPLELINK_AUDIO_PLUGIN_INSTALL_DIR/source/ti/audio/stream/Packetizer.c', needed by 'AudioStream/Packetizer.o'.
../audiohal_packetizer_echo.c:79:1: warning: variably modified 'bitStream' at file scope
79 | uint8_t bitStream[PACKETIZER_HEADER_SIZE + ADPCM_ENC_FRAME_SIZE(ADPCM_PCM_FRAME_SIZE(SAMPLE_RATE))];
| ^~~~~~~
../audiohal_packetizer_echo.c: In function 'mainThread':
../audiohal_packetizer_echo.c:190:34: error: 'Board_AUDIOHAL_CODEC' undeclared (first use in this function)
190 | tlv320Handle = AudioHAL_open(Board_AUDIOHAL_CODEC, &audioHalParams);
| ^~~~~~~~~~~~~~~~~~~~
../audiohal_packetizer_echo.c:190:34: note: each undeclared identifier is reported only once for each function it appears in
gmake: *** [audiohal_packetizer_echo.o] Error 1
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

<<<< console messages <<<<

In the case of "gmake: *** No rule to make target", automatically-generated files(*.mk) are generated wrong.

I would greatly appreciate it if you could tell me how to solve above problems.

Thank you very much.

Best regards,

JM KIM

  • Hi Kim,

    I see here two migrations.

    CC1352P1 to CC1352P7 and TI-RTOS to TI-RTOS7.

    I would suggest you to start with the TI-RTOS to TI-RTOS7 migration guide: https://dev.ti.com/tirex/explore/node?node=A__AORV2P9xKyaQCr.Dunw8Rg__com.ti.SIMPLELINK_CC13XX_CC26XX_SDK__BSEc4rl__LATEST

    Once this works you can change the chip and LaunchPad to CC1352P7 using SysConfig.

    Please let me know if this works.

    Kind regards,
    Theo

  • Hi Theo,

    Thank you for your comment.

    I think I have already changed the chip and LaunchPad to CC1352P7 using SysConfig.

    Because I used i2secho example of CC1352P7 using TI-RTOS7.

    The problem is to migrate audiohal_packetizer_echo of CC1352P1 using TI-RTOS.

    When I copy audiohal_packetizer_echo.c and AudioHAL sources from audiohal_packetizer_echo example,

    'Auto make' failed to generate *.mk files correctly.

    So I changed the absolute path location in Properties->Resource>Linked Resources.

    There are many compilation errors as shown in the log below.

    Would you comment on the easily migration TI-RTOS based code to TI-RTOS7 code?

    Thank you very much.

    Best Regards,

    JM KIM

    <<LOG


    **** Build of configuration Debug for project i2secho_LP_CC1352P7_1_tirtos7_ticlang5 ****

    "C:\\ti\\ccs1281\\ccs\\utils\\bin\\gmake" -k -j 8 all -O

    Building file: "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/AudioHALCodec.c"
    Invoking: Arm Compiler
    "C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mlittle-endian -mthumb -Oz -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/kernel/tirtos7/packages" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source/ti/posix/ticlang" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec" -gdwarf-3 -march=armv7e-m -MMD -MP -MF"AudioHAL/AudioHALCodec.d_raw" -MT"AudioHAL/AudioHALCodec.o" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug/syscfg" @"syscfg/ti_utils_build_compiler.opt" -o"AudioHAL/AudioHALCodec.o" "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/AudioHALCodec.c"
    AudioHAL/subdir_rules.mk:16: recipe for target 'AudioHAL/AudioHALCodec.o' failed
    C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/AudioHALCodec.c:526:74: error: use of undeclared identifier 'I2S_SLAVE'
    i2sParams.moduleRole = (object->role == AUDIOHAL_SLAVE)? I2S_SLAVE : I2S_MASTER;
    ^
    C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/AudioHALCodec.c:526:86: error: use of undeclared identifier 'I2S_MASTER'
    i2sParams.moduleRole = (object->role == AUDIOHAL_SLAVE)? I2S_SLAVE : I2S_MASTER;
    ^
    C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/AudioHALCodec.c:532:40: error: use of undeclared identifier 'I2S_MASTER'; did you mean 'I2S_TARGET'?
    isMaster = i2sParams.moduleRole == I2S_MASTER;
    ^~~~~~~~~~
    I2S_TARGET
    C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source\ti/drivers/I2S.h:759:5: note: 'I2S_TARGET' declared here
    I2S_TARGET = 0, /*!< Module is a target, clocks are externally generated. */
    ^
    3 errors generated.
    gmake: *** [AudioHAL/AudioHALCodec.o] Error 1
    Building file: "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/AudioHAL_I2C.c"
    Invoking: Arm Compiler
    "C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mlittle-endian -mthumb -Oz -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/kernel/tirtos7/packages" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source/ti/posix/ticlang" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec" -gdwarf-3 -march=armv7e-m -MMD -MP -MF"AudioHAL/AudioHAL_I2C.d_raw" -MT"AudioHAL/AudioHAL_I2C.o" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug/syscfg" @"syscfg/ti_utils_build_compiler.opt" -o"AudioHAL/AudioHAL_I2C.o" "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/AudioHAL_I2C.c"
    AudioHAL/subdir_rules.mk:23: recipe for target 'AudioHAL/AudioHAL_I2C.o' failed
    C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/AudioHAL_I2C.c:94:24: error: no member named 'slaveAddress' in 'I2C_Transaction'
    i2cTransaction.slaveAddress = codecI2CAddr;
    ~~~~~~~~~~~~~~ ^
    1 error generated.
    gmake: *** [AudioHAL/AudioHAL_I2C.o] Error 1
    Building file: "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/AudioHAL.c"
    Invoking: Arm Compiler
    "C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mlittle-endian -mthumb -Oz -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/kernel/tirtos7/packages" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source/ti/posix/ticlang" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec" -gdwarf-3 -march=armv7e-m -MMD -MP -MF"AudioHAL/AudioHAL.d_raw" -MT"AudioHAL/AudioHAL.o" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug/syscfg" @"syscfg/ti_utils_build_compiler.opt" -o"AudioHAL/AudioHAL.o" "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/AudioHAL.c"
    Finished building: "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/AudioHAL.c"

    Building file: "../i2secho.c"
    Invoking: Arm Compiler
    "C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mlittle-endian -mthumb -Oz -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/kernel/tirtos7/packages" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source/ti/posix/ticlang" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec" -gdwarf-3 -march=armv7e-m -MMD -MP -MF"i2secho.d_raw" -MT"i2secho.o" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug/syscfg" @"syscfg/ti_utils_build_compiler.opt" -o"i2secho.o" "../i2secho.c"
    ../i2secho.c:73:9: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
    uint8_t bitStream[PACKETIZER_HEADER_SIZE + ADPCM_ENC_FRAME_SIZE(ADPCM_PCM_FRAME_SIZE(SAMPLE_RATE))];
    ^
    1 warning generated.
    Finished building: "../i2secho.c"

    Building file: "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/TLV320AIC3254.c"
    Invoking: Arm Compiler
    "C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mlittle-endian -mthumb -Oz -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/kernel/tirtos7/packages" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source/ti/posix/ticlang" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec" -gdwarf-3 -march=armv7e-m -MMD -MP -MF"AudioHAL/TLV320AIC3254.d_raw" -MT"AudioHAL/TLV320AIC3254.o" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug/syscfg" @"syscfg/ti_utils_build_compiler.opt" -o"AudioHAL/TLV320AIC3254.o" "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/TLV320AIC3254.c"
    Finished building: "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/TLV320AIC3254.c"

    Building file: "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/MCLKCC26XX.c"
    Invoking: Arm Compiler
    "C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/bin/tiarmclang.exe" -c -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mlittle-endian -mthumb -Oz -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/kernel/tirtos7/packages" -I"C:/ti/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/source/ti/posix/ticlang" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal" -I"C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec" -gdwarf-3 -march=armv7e-m -MMD -MP -MF"AudioHAL/MCLKCC26XX.d_raw" -MT"AudioHAL/MCLKCC26XX.o" -I"C:/ti/workspace_v12/i2secho_LP_CC1352P7_1_tirtos7_ticlang5/Debug/syscfg" @"syscfg/ti_utils_build_compiler.opt" -o"AudioHAL/MCLKCC26XX.o" "C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/MCLKCC26XX.c"
    AudioHAL/subdir_rules.mk:30: recipe for target 'AudioHAL/MCLKCC26XX.o' failed
    C:/ti/simplelink_audio_plugin_3_30_00_06/source/ti/audio/hal/codec/MCLKCC26XX.c:41:10: fatal error: 'ti/drivers/pin/PINCC26XX.h' file not found
    #include <ti/drivers/pin/PINCC26XX.h>
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    gmake: *** [AudioHAL/MCLKCC26XX.o] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    LOG

  • Hi Kim,

    here the exact section I was referring to: https://dev.ti.com/tirex/explore/content/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/docs/ble5stack/ble_user_guide/html/tirtos/bios7_migration.html

    You should start from the CC1352P1 audiohal_packetizer_echo_CC1352P1_LAUNCHXL_tirtos_ccs project and migrate it first to TI-RTOS7 following the guide.

    If this works then you can migrate the board to CC1352P7 using SysConfig.

    Otherwise it is really hard to find the issues.
    Could you try it this way?

    Kind regards,
    Theo


  • Hi Theo,

    Thank you for your kind comment.
    I have already read the migration document.
    But I can not understand it exactly.

    I think I have migrated Audiohal_packetizer_echo example from TI-RTOS to TI-RTOS7.
    But audiohal_packetizer_echo example has sw and hw features.
    So it has different drivers header files and hard coded header files.
    We are going to change the sources from ti-rtos to ti-rtos7 and sysconfig generated head files.

    Thank you very much.
    Best regards,

    JM KIM

  • Hi JM,

    in this case the porting is a bit ore difficult.

    I checked the examples with one of our experts and it will be easier to start from a TI-RTOS7 project and then add the missing from the TI-RTOS project.

    That means you select a TI-RTOS7 project and include the drivers. 
    This will result in multiple errors that will require that you resolve them one by one changing the drivers code.

    Unfortunately there is no other way and we don't have a ported version.

    Kind regards,
    Theo