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.

CC2340R5: How to merge two projects

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Hi TI members,

Below is my building environment:

Software

Version

Code Composer Studio

12.3.0.00005 

SimpleLink SDK

7.10.00.35

XDCtools

3.62.1.16_core

We are working on merging data_stream and host_test and use a GPIO value to decide whether to enter host_test or not.

But we encountered some issues:

In host_test_LP_EM_CC2340R5_freertos_ticlang/Release/syscfg/ti_drivers_config.h, we could see these parts:

extern const uint_least8_t CONFIG_GPIO_BTN1_CONST;
#define CONFIG_GPIO_BTN1 8

extern const uint_least8_t CONFIG_GPIO_BTN2_CONST;
#define CONFIG_GPIO_BTN2 19

But in data_stream_LP_EM_CC2340R5_freertos_ticlang, we didn't define any GPIO for button since we are using 4x4.

This led to errors as below:

gmake: *** [NPI/npi_task.o] Error 1
Building file: "C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c"
Invoking: Arm Compiler
"C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-armllvm_2.1.3.LTS/bin/tiarmclang.exe" -c @"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg/ti_ble_app_config.opt" @"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg/ti_build_config.opt" @"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/config/build_components.opt" @"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/config/factory_config.opt" -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -Oz -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang" -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug" -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/app" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/controller/cc26xx/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/rom" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/common/cc26xx" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/icall/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/hal/src/target/_common" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/common/cc26xx/npi/stack" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/hal/src/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/heapmgr" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/profiles/dev_info" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/profiles/simple_profile" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/icall/src/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/osal/src/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/services/src/saddr" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/services/src/sdata" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/common/nv" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/common/cc26xx" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/icall/src" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/devices/cc23x0r5" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/devices/cc23x0r5/settings" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/drivers/rcl" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/boards/cc23x0r5" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/posix/ticlang" -I"C:/ti/FreeRTOSv202104.00/FreeRTOS/Source/include" -I"C:/ti/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/ARM_CM0" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/kernel/freertos" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc" -Dti_log_Log_ENABLE -DICALL_NO_APP_EVENTS -DCC23X0 -DDeviceFamily_CC23X0R5 -DNVOCMP_NWSAMEITEM=1 -DFLASH_ONLY_BUILD -DUSE_RCL -DFREERTOS -DNVOCMP_POSIX_MUTEX -gdwarf-3 -ffunction-sections -MMD -MP -MF"NPI/Transport/npi_tl.d_raw" -MT"NPI/Transport/npi_tl.o" -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg" -std=c99 @"syscfg/ti_build_config.opt" @"syscfg/ti_ble_app_config.opt" @"syscfg/ti_utils_build_compiler.opt" -o"NPI/Transport/npi_tl.o" "C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c"
NPI/Transport/subdir_rules.mk:9: recipe for target 'NPI/Transport/npi_tl.o' failed
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:185:5: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
SRDY_DISABLE();
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:92:54: note: expanded from macro 'SRDY_DISABLE'
#define SRDY_DISABLE() GPIO_write(SRDY_PIN, 1) /* RTS high */
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
#define SRDY_PIN CONFIG_GPIO_BTN2
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:188:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
GPIO_setConfig(MRDY_PIN, GPIO_CFG_INPUT_INTERNAL | GPIO_CFG_IN_INT_BOTH_EDGES | GPIO_CFG_PULL_UP_INTERNAL);
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
#define MRDY_PIN CONFIG_GPIO_BTN1
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:189:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
GPIO_setConfig(SRDY_PIN, GPIO_CFG_OUTPUT_INTERNAL | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_HIGH);
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
#define SRDY_PIN CONFIG_GPIO_BTN2
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:191:22: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
GPIO_setCallback(MRDY_PIN, NPITL_MRDYPinHwiFxn);
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
#define MRDY_PIN CONFIG_GPIO_BTN1
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:193:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
GPIO_enableInt(MRDY_PIN);
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
#define MRDY_PIN CONFIG_GPIO_BTN1
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:194:28: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
mrdy_state = GPIO_read(MRDY_PIN);
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
#define MRDY_PIN CONFIG_GPIO_BTN1
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:210:23: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
return !GPIO_read(SRDY_PIN);
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
#define SRDY_PIN CONFIG_GPIO_BTN2
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:279:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
if ( GPIO_read(MRDY_PIN) == 0 ||
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
#define MRDY_PIN CONFIG_GPIO_BTN1
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:286:9: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
SRDY_ENABLE();
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:91:54: note: expanded from macro 'SRDY_ENABLE'
#define SRDY_ENABLE() GPIO_write(SRDY_PIN, 0) /* RTS low */
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
#define SRDY_PIN CONFIG_GPIO_BTN2
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:328:33: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
if (mrdy_state != GPIO_read(MRDY_PIN))
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
#define MRDY_PIN CONFIG_GPIO_BTN1
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:330:32: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
mrdy_state = GPIO_read(MRDY_PIN);
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
#define MRDY_PIN CONFIG_GPIO_BTN1
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:387:28: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
mrdy_state = GPIO_read(MRDY_PIN);
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
#define MRDY_PIN CONFIG_GPIO_BTN1
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:390:5: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
SRDY_DISABLE();
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:92:54: note: expanded from macro 'SRDY_DISABLE'
#define SRDY_DISABLE() GPIO_write(SRDY_PIN, 1) /* RTS high */
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
#define SRDY_PIN CONFIG_GPIO_BTN2
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_tl.c:463:5: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
SRDY_ENABLE();
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:91:54: note: expanded from macro 'SRDY_ENABLE'
#define SRDY_ENABLE() GPIO_write(SRDY_PIN, 0) /* RTS low */
^
C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
#define SRDY_PIN CONFIG_GPIO_BTN2

Please help to suggest how we should do to merge the two projects into one.

Thanks.

BR,

YuWen

  • Hello YuWen,

    Thanks for reaching out.

    Please help me with the following questions:

    1. Is it possible to work with the last SDK version (70.20)?
    2. Have you look into the basic_ble_ptm (Production Test Mode) example inside the last SDK?
    3. Can you use the button configured with name "CONFIG_GPIO_BUTTON_X_INPUT" and edit it with the same name as the one used on the host_test example?

    Best regards,

    David.

  • Hi,

    About your queries:

    1. Won't our current SDK version simplelink_lowpower_f3_sdk_7_10_00_35 work on merging these two projects?

    Is it really neccesary to migrate our codebases to SDK 7.20?

    2. I knew there is basic_ble_ptm in our current SDK, but I found some iCall related functions not called in the main function in basic_ble_ptm.

    For example, this is what I saw in main() of host_test:


    And this is the one in basic_ble_ptm:


    I wasn't sure where were the HCI commands were initialized, but we think basic_ble_ptm is quite different from host_test.

    3. Sorry, I didn't quite understand what you meant.

    Did you mean to align the definitions of CONFIG_GPIO_BUTTON_X_INPUT in both our data_stream and host_test?

    But our data_stream didn't get any button to be defined. Only host_test project came with definitions of button but didn't get used, either.

    BR,

    YuWen

  • Hello YuWen,

    1. Yes please, it is important to consider the SDK 7.20 migration.
    2. Have you tried the HCI commands you require using the basic_ble_ptm? If not, could you please do this first to evaluate if merging the other programs is necessary.

    Best regards,

    David.

  • Hi,

    1. Are there modifications about the CONFIG_GPIO_BUTTON_X_INPUT done in 7.20?

    If not, then migrating to another SDK version would be risky for us since we would need to do all function verifications all over again.

    2. We didn't / wouldn't consider using basic_ble_ptm because we have had a special version of data_stream done by TI, and we have also done quite a lot modifications on it to fit our needs. We wouldn't like to do all the work again and we wouldn't have time to do so (since our production schedule is quite tight), either.

    And merging the two projects (our modified data_stream + original host_test) is the fastest way that we cam up with by now.

    Please help to identify how to fix the issue we have mentioned if SDK 7.20 wouldn't have any differences on this part.

    Thanks.

  • Hello YuWen,

    I would suggest to compare the basic_ble and basic_ble_ptm project. The different elements identified are the ones that have to be implemented on the project, for instance:

    • The file app_ptm.c should be added and PTM_start() should be called in the function App_StackInitDoneHandler()
    • The folder DPL (available in the folder named common) and its content have to be added to the project
    • In SysConfig, FreeRTOS heapSize may have to be slightly reduced
    • The GPIO used to decide whether the device should boot in PTM mode should be added
    • Note: the device role and the pairing mode do NOT need to be altered

    To use a GPIO in order to select whether the device boots in PTM mode or in “normal” mode I would suggest to read state of the GPIO in  App_StackInitDoneHandler() and either call PTM_start() or not. Note: if PTM_start() is called, the other xxx_start() functions should not be called.

    About migrating to the new version, please make sure you are aware of the bug fixes introduced by SDK 7.20 (see release notes).  

    Best regards,

    David.

  • Hello YuWen,

    Have you been able to look further into this case?

    Let me know.

    Best regards,

    David.

  • Hi David,

    Sorry for replying late.

    I have tried some of your suggestions as below, but met some weird problems.

    Done ones:

    • The file app_ptm.c should be added and PTM_start() should be called in the function App_StackInitDoneHandler()
    • The folder DPL (available in the folder named common) and its content have to be added to the project

    I have copied common/DPL and common/NPI/npi_task.c to data_stram project.

    And I ensured that there was common/DPL/Queue_freertos.h in data_stream.

    But I kept getting the following error:

    common/NPI/subdir_rules.mk:9: recipe for target 'common/NPI/npi_task.o' failed
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/npi_task.c:56:10: fatal error: 'Queue_freertos.h' file not found
    #include <Queue_freertos.h>
    ^~~~~~~~~~~~~~~~~~
    1 error generated.

    And I wasn't sure if this happened because the copied file "npi_task.c" became local file rather than a Linked file it originally was.

    Can you help look into this problem?

    Thanks.

    BR,

  • Hello YuWen,

    I will look into that and try to replicate the error using the SDK you are working with.

    Have you added the files to the project using CCS or directly through the file directory?

    BR,

    David.

  • Hi David,

    I added them using CCS's copy and paste functioning.

    Does this make sense for you?

    The properties of the folder looked like this:

    Thanks.

    BR,

    YuWen

  • Hello YuWen,

    Have you tried right click on the project name - Add Files - and then select "Link to files" option?

    BR,

    David.

  • Hi David,

    Thanks for the advice.

    After I added the files from common/NPI, I met some GPIO definitions errors:

    Building file: "../common/NPI/npi_tl.c"
    Invoking: Arm Compiler
    "C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-armllvm_2.1.3.LTS/bin/tiarmclang.exe" -c @"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg/ti_ble_app_config.opt" @"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg/ti_build_config.opt" @"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/config/build_components.opt" @"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/config/factory_config.opt" -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -Oz -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang" -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug" -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/app" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/controller/cc26xx/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/rom" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/common/cc26xx" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/icall/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/hal/src/target/_common" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/common/cc26xx/npi/stack" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/hal/src/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/heapmgr" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/profiles/dev_info" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/profiles/simple_profile" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/icall/src/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/osal/src/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/services/src/saddr" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/services/src/sdata" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/common/nv" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/common/cc26xx" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/icall/src" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/devices/cc23x0r5" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/devices/cc23x0r5/settings" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/drivers/rcl" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/boards/cc23x0r5" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/posix/ticlang" -I"C:/ti/FreeRTOSv202104.00/FreeRTOS/Source/include" -I"C:/ti/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/ARM_CM0" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/kernel/freertos" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc" -Dti_log_Log_ENABLE -DICALL_NO_APP_EVENTS -DCC23X0 -DDeviceFamily_CC23X0R5 -DNVOCMP_NWSAMEITEM=1 -DFLASH_ONLY_BUILD -DUSE_RCL -DFREERTOS -DNVOCMP_POSIX_MUTEX -gdwarf-3 -ffunction-sections -MMD -MP -MF"common/NPI/npi_tl.d_raw" -MT"common/NPI/npi_tl.o" -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg" -std=c99 @"syscfg/ti_build_config.opt" @"syscfg/ti_ble_app_config.opt" @"syscfg/ti_utils_build_compiler.opt" -o"common/NPI/npi_tl.o" "../common/NPI/npi_tl.c"
    common/NPI/subdir_rules.mk:9: recipe for target 'common/NPI/npi_tl.o' failed
    ../common/NPI/npi_tl.c:185:5: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    SRDY_DISABLE();
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:92:54: note: expanded from macro 'SRDY_DISABLE'
    #define SRDY_DISABLE() GPIO_write(SRDY_PIN, 1) /* RTS high */
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    ../common/NPI/npi_tl.c:188:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    GPIO_setConfig(MRDY_PIN, GPIO_CFG_INPUT_INTERNAL | GPIO_CFG_IN_INT_BOTH_EDGES | GPIO_CFG_PULL_UP_INTERNAL);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:189:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    GPIO_setConfig(SRDY_PIN, GPIO_CFG_OUTPUT_INTERNAL | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_HIGH);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    ../common/NPI/npi_tl.c:191:22: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    GPIO_setCallback(MRDY_PIN, NPITL_MRDYPinHwiFxn);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:193:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    GPIO_enableInt(MRDY_PIN);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:194:28: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    mrdy_state = GPIO_read(MRDY_PIN);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:210:23: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    return !GPIO_read(SRDY_PIN);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    ../common/NPI/npi_tl.c:279:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    if ( GPIO_read(MRDY_PIN) == 0 ||
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:286:9: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    SRDY_ENABLE();
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:91:54: note: expanded from macro 'SRDY_ENABLE'
    #define SRDY_ENABLE() GPIO_write(SRDY_PIN, 0) /* RTS low */
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    ../common/NPI/npi_tl.c:328:33: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    if (mrdy_state != GPIO_read(MRDY_PIN))
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:330:32: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    mrdy_state = GPIO_read(MRDY_PIN);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:387:28: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    mrdy_state = GPIO_read(MRDY_PIN);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:390:5: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    SRDY_DISABLE();
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:92:54: note: expanded from macro 'SRDY_DISABLE'
    #define SRDY_DISABLE() GPIO_write(SRDY_PIN, 1) /* RTS high */
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    ../common/NPI/npi_tl.c:463:5: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    SRDY_ENABLE();
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:91:54: note: expanded from macro 'SRDY_ENABLE'
    #define SRDY_ENABLE() GPIO_write(SRDY_PIN, 0) /* RTS low */
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    14 errors generated.
    gmake: *** [common/NPI/npi_tl.o] Error 1

    We are not having any button currently, and this error is similar to what I met in the beginning of this discussion.

    I also tried 7.20.0.10, and it also stucked as the same place.

    So I thought it didn't matter what SDK we used.

    Can you help look into this?

    Thanks.

    BR,

    YuWen

  • Hi David,

    Do HCI commands require these parts?

    I think these GPIO controls are the main problems.

    Thanks.

    BR,

    YuWen

  • Hi David,

    I temporarily defined CONFIG_GPIO_BTN1 and CONFIG_GPIO_BTN2, even though we are not using any GPIO as button.

    Then I met another kind of error:

    Building target: "data_stream_LP_EM_CC2340R5_freertos_ticlang.out"
    Invoking: Arm Linker
    "C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-armllvm_2.1.3.LTS/bin/tiarmclang.exe" @"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg/ti_ble_app_config.opt" @"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg/ti_build_config.opt" @"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/ble5stack_flash/config/build_components.opt" @"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/ble5stack_flash/config/factory_config.opt" -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -Oz -Dti_log_Log_ENABLE -DICALL_NO_APP_EVENTS -DCC23X0 -DDeviceFamily_CC23X0R5 -DNVOCMP_NWSAMEITEM=1 -DFLASH_ONLY_BUILD -DUSE_RCL -DFREERTOS -DNVOCMP_POSIX_MUTEX -gdwarf-3 -ffunction-sections -Wl,-m"data_stream_LP_EM_CC2340R5_freertos_ticlang.map" -Wl,-i"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source" -Wl,-i"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg" -Wl,-i"C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-armllvm_2.1.3.LTS/lib" -Wl,--reread_libs -Wl,--diag_suppress=16002-D -Wl,--diag_suppress=10247-D -Wl,--diag_suppress=10325-D -Wl,--diag_suppress=10229-D -Wl,--diag_suppress=16032-D -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="data_stream_LP_EM_CC2340R5_freertos_ticlang_linkInfo.xml" -Wl,--rom_model -o "data_stream_LP_EM_CC2340R5_freertos_ticlang.out" "./syscfg/ti_ble_config.o" "./syscfg/ti_devices_config.o" "./syscfg/ti_drivers_config.o" "./syscfg/ti_log_config.o" "./syscfg/ti_freertos_config.o" "./syscfg/ti_freertos_portable_config.o" "./main_freertos.o" "./Startup/rcl_settings_ble.o" "./app/Profiles/app_data_stream.o" "./app/Profiles/app_dev_info.o" "./app/app_broadcaster.o" "./app/app_central.o" "./app/app_connection.o" "./app/app_data.o" "./app/app_main.o" "./app/app_observer.o" "./app/app_pairing.o" "./app/app_peripheral.o" "./app/app_ptm.o" "./app/app_temperature.o" "./common/BLEAppUtil/bleapputil_init.o" "./common/BLEAppUtil/bleapputil_process.o" "./common/BLEAppUtil/bleapputil_stack_callbacks.o" "./common/BLEAppUtil/bleapputil_task.o" "./common/DPL/Queue_freertos.o" "./common/DPL/util.o" "./common/Drivers/NV/crc.o" "./common/Drivers/NV/nvocmp.o" "./common/MenuModule/menu_module.o" "./common/NPI/npi_frame_hci.o" "./common/NPI/npi_rxbuf.o" "./common/NPI/npi_task.o" "./common/NPI/npi_tl.o" "./common/Profiles/data_stream/data_stream_profile.o" "./common/Services/data_stream/data_stream_server.o" "./common/Services/dev_info/dev_info_service.o" "./common/Startup/ble_user_config_stack.o" "./common/Startup/osal_icall_ble.o" "./common/Startup/rom_init.o" "./common/iCall/icall_POSIX.o" "./common/iCall/icall_cc23x0.o" "./common/iCall/icall_user_config.o" "./common/iCallBLE/ble_stack_api.o" "./common/iCallBLE/ble_user_config.o" "./common/iCallBLE/icall_api_lite.o" "./common/iCallBLE/icall_hci_tl.o" "../cc23x0_app_freertos.cmd" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/third_party/spiffs/lib/ticlang/m0p/spiffs.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/log/lib/ticlang/m0p/log_cc23x0r5.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/drivers/rcl/lib/ticlang/m0p/rcl_cc23x0r5.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/drivers/lib/ticlang/m0p/drivers_cc23x0r5.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/display/lib/ticlang/m0p/display_cc23x0r5.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/third_party/ecc/lib/ticlang/m0p/ecc.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/devices/cc23x0r5/rf_patches/lib/ticlang/lrf_cc23x0r5.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/ble5stack_flash/lib_projects/CC2340R5/OneLib/lib/ticlang/m0p/OneLib.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/ble5stack_flash/lib_projects/CC2340R5/StackWrapper/lib/ticlang/m0p/StackWrapper.a" -Wl,-l"ti/devices/cc23x0r5/driverlib/lib/ticlang/driverlib.a" -Wl,-llibc.a
    makefile:218: recipe for target 'data_stream_LP_EM_CC2340R5_freertos_ticlang.out' failed
    "../cc23x0_app_freertos.cmd", line 265: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. run placement with alignment fails for section ".data" size 0xca8. Available memory ranges:
    SRAM size: 0x9000 unused: 0x751 max hole: 0x3bd

    undefined first referenced
    symbol in file
    --------- ----------------
    NPITLUART_handleMrdyEvent ./common/NPI/npi_tl.o
    NPITLUART_initializeTransport ./common/NPI/npi_tl.o
    NPITLUART_stopTransfer ./common/NPI/npi_tl.o
    NPITLUART_writeTransport ./common/NPI/npi_tl.o

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "data_stream_LP_EM_CC2340R5_freertos_ticlang.out" not built
    tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [data_stream_LP_EM_CC2340R5_freertos_ticlang.out] Error 1
    gmake: *** [all] Error 2
    makefile:214: recipe for target 'all' failed

    I initially thought it was some references issue.

    But I didn't find NPITLUART_handleMrdyEvent  in common/NPI/npi_tl.c.

    Please help to check what was wrong.

    Thanks.

    BR,

    YuWen

  • YuWen,

    Which SDK version have you decided to work with? Just to be sure and continue from this point forward on the same lines.

    The functions that are showing error are coming from npi_tl_uart.c, have you added the 5 files from NPI folder?

    BR,

    David.

  • Hi David,

    We understand your concern about using an old version of SDK, and it could be much more easy for you to debug.

    So I have tried using SDK 7.20.0.10.

    But whatever SDK I used, the GPIO issues I mentioned above still exists, and this is the main bottlenack we are facing.

    We need your help on this issue and provide us how to modify this.

    Otherwise, we are not going to have any progress on this topic.

    I have also added npi_tl_uart.c and all the 5 files from NPI folder. But we need your help on the GPIO issue.

    Building file: "../common/NPI/npi_tl.c"
    Invoking: Arm Compiler
    "C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-armllvm_2.1.3.LTS/bin/tiarmclang.exe" -c @"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg/ti_ble_app_config.opt" @"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg/ti_build_config.opt" @"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/config/build_components.opt" @"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/config/factory_config.opt" -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -Oz -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang" -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug" -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/app" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/controller/cc26xx/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/rom" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/common/cc26xx" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/icall/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/hal/src/target/_common" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/common/cc26xx/npi/stack" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/hal/src/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/heapmgr" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/profiles/dev_info" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/profiles/simple_profile" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/icall/src/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/osal/src/inc" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/services/src/saddr" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/services/src/sdata" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/common/nv" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/common/cc26xx" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/icall/src" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/devices/cc23x0r5" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/devices/cc23x0r5/settings" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/drivers/rcl" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/boards/cc23x0r5" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/posix/ticlang" -I"C:/ti/FreeRTOSv202104.00/FreeRTOS/Source/include" -I"C:/ti/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/ARM_CM0" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/kernel/freertos" -I"C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src/inc" -Dti_log_Log_ENABLE -DICALL_NO_APP_EVENTS -DCC23X0 -DDeviceFamily_CC23X0R5 -DNVOCMP_NWSAMEITEM=1 -DFLASH_ONLY_BUILD -DUSE_RCL -DFREERTOS -DNVOCMP_POSIX_MUTEX -gdwarf-3 -ffunction-sections -MMD -MP -MF"common/NPI/npi_tl.d_raw" -MT"common/NPI/npi_tl.o" -I"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg" -std=c99 @"syscfg/ti_build_config.opt" @"syscfg/ti_ble_app_config.opt" @"syscfg/ti_utils_build_compiler.opt" -o"common/NPI/npi_tl.o" "../common/NPI/npi_tl.c"
    common/NPI/subdir_rules.mk:9: recipe for target 'common/NPI/npi_tl.o' failed
    ../common/NPI/npi_tl.c:185:5: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    SRDY_DISABLE();
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:92:54: note: expanded from macro 'SRDY_DISABLE'
    #define SRDY_DISABLE() GPIO_write(SRDY_PIN, 1) /* RTS high */
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    ../common/NPI/npi_tl.c:188:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    GPIO_setConfig(MRDY_PIN, GPIO_CFG_INPUT_INTERNAL | GPIO_CFG_IN_INT_BOTH_EDGES | GPIO_CFG_PULL_UP_INTERNAL);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:189:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    GPIO_setConfig(SRDY_PIN, GPIO_CFG_OUTPUT_INTERNAL | GPIO_CFG_OUT_STR_HIGH | GPIO_CFG_OUT_HIGH);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    ../common/NPI/npi_tl.c:191:22: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    GPIO_setCallback(MRDY_PIN, NPITL_MRDYPinHwiFxn);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:193:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    GPIO_enableInt(MRDY_PIN);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:194:28: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    mrdy_state = GPIO_read(MRDY_PIN);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:210:23: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    return !GPIO_read(SRDY_PIN);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    ../common/NPI/npi_tl.c:279:20: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    if ( GPIO_read(MRDY_PIN) == 0 ||
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:286:9: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    SRDY_ENABLE();
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:91:54: note: expanded from macro 'SRDY_ENABLE'
    #define SRDY_ENABLE() GPIO_write(SRDY_PIN, 0) /* RTS low */
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    ../common/NPI/npi_tl.c:328:33: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    if (mrdy_state != GPIO_read(MRDY_PIN))
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:330:32: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    mrdy_state = GPIO_read(MRDY_PIN);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:387:28: error: use of undeclared identifier 'CONFIG_GPIO_BTN1'
    mrdy_state = GPIO_read(MRDY_PIN);
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:88:22: note: expanded from macro 'MRDY_PIN'
    #define MRDY_PIN CONFIG_GPIO_BTN1
    ^
    ../common/NPI/npi_tl.c:390:5: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    SRDY_DISABLE();
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:92:54: note: expanded from macro 'SRDY_DISABLE'
    #define SRDY_DISABLE() GPIO_write(SRDY_PIN, 1) /* RTS high */
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    ../common/NPI/npi_tl.c:463:5: error: use of undeclared identifier 'CONFIG_GPIO_BTN2'
    SRDY_ENABLE();
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:91:54: note: expanded from macro 'SRDY_ENABLE'
    #define SRDY_ENABLE() GPIO_write(SRDY_PIN, 0) /* RTS low */
    ^
    C:/ti/simplelink_lowpower_f3_sdk_7_10_00_35/source/ti/ble5stack_flash/npi/src\inc/npi_config.h:89:22: note: expanded from macro 'SRDY_PIN'
    #define SRDY_PIN CONFIG_GPIO_BTN2
    ^
    14 errors generated.
    gmake: *** [common/NPI/npi_tl.o] Error 1

    Thanks.

    BR,

    YuWen

  • Hello YuWen,

    Can you try changing the GPIO button names at the .syscfg file?

    Should be something like this:

    BR,

    David.

  • Hi David,

    As I mentioned above, I have done exactly the same as you suggested.

    And I think this could only be a temporarily way to suppress the error.

    But we are not going to use any GPIOs as button.

    I sincerely suggest you to look into what we have tried and truely look into the problems.

  • Hello YuWen,

    Up to this point, the following steps have been done:

    1. app_ptm.c from basic_ble_ptm project has been included on basic_ble inside the app directory.
    2. extern bStatus_t PTM_start(void); function has been defined inside app_main.c
    3. status = PTM_start(); has been included in App_StackInitDoneHandler() function inside app_main.c
    4. NPI and DLP files from basic_ble_ptm project have been included on basic_ble inside the common directory.

    For this application, we will require UART Tx and UART Rx as already defined on both projects (basic_ble and basic_ble_ptm). However, to avoid using other GPIOs (like the buttons for example), we need to make sure PTM mode is enabled and that NPI Flow Control is disabled on basic_ble project. Please consider the following steps on basic_ble:

    1. Enable PTM:
    2. Eliminate the buttons definition from TI Drivers APPS in .syscfg (which should eliminate the definition on the GPIO section as well).
    3. Comment out the button functionality from menu_module.c
      // Open the buttons
      //handle_left = Button_open(CONFIG_BUTTON_0, &params);
      //handle_right = Button_open(CONFIG_BUTTON_1, &params);

    That should avoid the GPIO errors.

    Let me know to continue from there.

    BR,

    David.

  • Hi David,

    Just to ensure that we are aligned:

    1. app_ptm.c from basic_ble_ptm project has been included on basic_ble inside the app directory.

    -> As I have mentioned, we are using data_stream instead of basic_ble, would that matters?

    1. extern bStatus_t PTM_start(void); function has been defined inside app_main.c

    -> 

    I define it in app_main.h.

    1. status = PTM_start(); has been included in App_StackInitDoneHandler() function inside app_main.c

    -> Considering that you have told me not to called PTM_start along with other XXX_start(), I defined another "App_StackInitDoneHandler_PTM()" to call PTM_start, and use the GPIO status to decide wether to call this App_StackInitDoneHandler_PTM() or the original "App_StackInitDoneHandler()".

    1. NPI and DLP files from basic_ble_ptm project have been included on basic_ble inside the common directory.

    -> As I have mentioned, we are using data_stream instead of basic_ble. (same as item 1)


    Does this seem correct to you?

    we need to make sure PTM mode is enabled and that NPI Flow Control is disabled on basic_ble project.

    -> Thanks for your advice!

    After I applied this configurations, the errors of GPIO definitions had been gone.

    Instead, I met another error:

    Building target: "data_stream_LP_EM_CC2340R5_freertos_ticlang.out"
    Invoking: Arm Linker
    "C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-armllvm_2.1.3.LTS/bin/tiarmclang.exe" @"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg/ti_ble_app_config.opt" @"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg/ti_build_config.opt" @"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/ble5stack_flash/config/build_components.opt" @"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/ble5stack_flash/config/factory_config.opt" -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -Oz -Dti_log_Log_ENABLE -DICALL_NO_APP_EVENTS -DCC23X0 -DDeviceFamily_CC23X0R5 -DNVOCMP_NWSAMEITEM=1 -DFLASH_ONLY_BUILD -DUSE_RCL -DFREERTOS -DNVOCMP_POSIX_MUTEX -gdwarf-3 -ffunction-sections -Wl,-m"data_stream_LP_EM_CC2340R5_freertos_ticlang.map" -Wl,-i"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source" -Wl,-i"X:/Project/data_stream_lp_em_cc2340r5_freertos_ticlang/Debug/syscfg" -Wl,-i"C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-armllvm_2.1.3.LTS/lib" -Wl,--reread_libs -Wl,--diag_suppress=16002-D -Wl,--diag_suppress=10247-D -Wl,--diag_suppress=10325-D -Wl,--diag_suppress=10229-D -Wl,--diag_suppress=16032-D -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="data_stream_LP_EM_CC2340R5_freertos_ticlang_linkInfo.xml" -Wl,--rom_model -o "data_stream_LP_EM_CC2340R5_freertos_ticlang.out" "./syscfg/ti_ble_config.o" "./syscfg/ti_devices_config.o" "./syscfg/ti_drivers_config.o" "./syscfg/ti_log_config.o" "./syscfg/ti_freertos_config.o" "./syscfg/ti_freertos_portable_config.o" "./main_freertos.o" "./app/Profiles/app_data_stream.o" "./app/Profiles/app_dev_info.o" "./app/app_broadcaster.o" "./app/app_central.o" "./app/app_connection.o" "./app/app_data.o" "./app/app_main.o" "./app/app_observer.o" "./app/app_pairing.o" "./app/app_peripheral.o" "./app/app_ptm.o" "./app/app_temperature.o" "./common/BLEAppUtil/bleapputil_init.o" "./common/BLEAppUtil/bleapputil_process.o" "./common/BLEAppUtil/bleapputil_stack_callbacks.o" "./common/BLEAppUtil/bleapputil_task.o" "./common/DPL/Queue_freertos.o" "./common/Drivers/NV/crc.o" "./common/Drivers/NV/nvocmp.o" "./common/MenuModule/menu_module.o" "./common/NPI/npi_frame_hci.o" "./common/NPI/npi_rxbuf.o" "./common/NPI/npi_task.o" "./common/NPI/npi_tl.o" "./common/NPI/npi_tl_uart.o" "./common/Profiles/data_stream/data_stream_profile.o" "./common/Services/data_stream/data_stream_server.o" "./common/Services/dev_info/dev_info_service.o" "./common/Startup/ble_user_config_stack.o" "./common/Startup/osal_icall_ble.o" "./common/Startup/rcl_settings_ble.o" "./common/Startup/rom_init.o" "./common/iCall/icall_POSIX.o" "./common/iCall/icall_cc23x0.o" "./common/iCall/icall_user_config.o" "./common/iCallBLE/ble_stack_api.o" "./common/iCallBLE/ble_user_config.o" "./common/iCallBLE/icall_api_lite.o" "./common/iCallBLE/icall_hci_tl.o" "../cc23x0_app_freertos.cmd" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/third_party/spiffs/lib/ticlang/m0p/spiffs.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/log/lib/ticlang/m0p/log_cc23x0r5.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/drivers/rcl/lib/ticlang/m0p/rcl_cc23x0r5.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/drivers/lib/ticlang/m0p/drivers_cc23x0r5.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/display/lib/ticlang/m0p/display_cc23x0r5.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/third_party/ecc/lib/ticlang/m0p/ecc.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/devices/cc23x0r5/rf_patches/lib/ticlang/lrf_cc23x0r5.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/ble5stack_flash/lib_projects/CC2340R5/OneLib/lib/ticlang/m0p/OneLib.a" -Wl,-l"C:/ti/simplelink_lowpower_f3_sdk_7_20_01_10/source/ti/ble5stack_flash/lib_projects/CC2340R5/StackWrapper/lib/ticlang/m0p/StackWrapper.a" -Wl,-l"ti/devices/cc23x0r5/driverlib/lib/ticlang/driverlib.a" -Wl,-llibc.a
    makefile:216: recipe for target 'data_stream_LP_EM_CC2340R5_freertos_ticlang.out' failed
    "../cc23x0_app_freertos.cmd", line 265: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. run placement with alignment fails for section ".data" size 0xce0. Available memory ranges:
    SRAM size: 0x9000 unused: 0x67b max hole: 0x374
    error #10010: errors encountered during linking; "data_stream_LP_EM_CC2340R5_freertos_ticlang.out" not built
    tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [data_stream_LP_EM_CC2340R5_freertos_ticlang.out] Error 1
    gmake: *** [all] Error 2
    makefile:212: recipe for target 'all' failed

    Would you please help to look into this issue?

    Thanks.

    BR,

  • Hello YuWen,

    Glad the GPIOs errors are gone.

    Please do the following:

    1. Include (copy-paste) the icall_hci_tl.c files from basic_ble_ptm project (.../common/iCallBLE/icall_hci_tl.c) into the same folder on data_stream project.
    2. Go to Properties on data_stream project (right click on the project folder -> Properties) and carefully include the following three search paths:
      ${PROJECT_LOC}/common/DPL
      ${COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR}/source/ti/ble5stack_flash/npi/src
      ${COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR}/source/ti/ble5stack_flash/npi/src/inc

    Let me know how it goes.

    David

  • Hi David,

    I followed your advice and add the icall_hci_tl.c again since we already have one before you gave this advice.

    As for the search paths, we already had them before your suggestions:

    Please give us some constructive advice.

    Thses advices are not helping.

    Thanks.

    BR,

    YuWen

  • Hi YuWen,

    If I may, the issue you are encountering is due to:

    program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. run placement with alignment fails for section ".data" size 0xce0. Available memory ranges:
    SRAM size: 0x9000 unused: 0x67b max hole: 0x374

    Said differently, the amount of RAM needed by the program is larger than the 36 kB of RAM available on this device.

    I would recommend looking at the following guide to save RAM: https://software-dl.ti.com/simplelink/esd/simplelink_lowpower_f3_sdk/7.20.01.10/exports/docs/ble5stack/ble_user_guide/html/ble-stack-5.x/optimization-cc23xx.html#ram-optimization

    Best regards,

  • Hello YuWen,

    Please try with reducing the heap size as mentioned earlier.

    Go to SysConfig, FreeRTOS heapSize.

    Best Regards,

    David.