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.

Why is the heap not recognized by the source file?

Hi,

I created a dynamic task in Tiva-C 1294 LaunchPad project. The .cfg file clearly shows the heap it there, but the build of source .c file fails with error:

Description Resource Path Location Type
#20 identifier "task1Heap" is undefined hello.c /hello_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT line 99 C/C++ Problem

Here is the screen picture:

I have checked that the file "/hello_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT/Debug/configPkg/package/cfg/hello_pem4f.c" has no task1Heap variable, while .cfg file has its definition:

/* ================ Driver configuration ================ */
var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS');
var heapMem0Params = new HeapMem.Params();
heapMem0Params.instance.name = "null";
heapMem0Params.size = 8192;
var task1Heap = HeapMem.create(heapMem0Params);

What is wrong with this Tiva-C file project?

Thanks,

  • Here is the error message echoed in the Console window. Hopefully someone can identifies the cause. Thanks,

    **** Build of configuration Debug for project hello_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT ****
    
    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -j4 -k all 
            1 file(s) copied.
    making ../src/sysbios/sysbios.aem4f ...
    'Building file: ../hello.c'
    'Building file: ../hello.cfg'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.4/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.4/include" --include_path="C:/Users/CCS6_1_Tiva_C/TI_workspace_C1294_ticgt_RTOS_1/hello_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT" --include_path="C:/ti/tirtos_tivac_2_14_00_10/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_14_00_10/packages/ti/drivers/wifi/cc3100/Simplelink" --include_path="C:/ti/tirtos_tivac_2_14_00_10/packages/ti/drivers/wifi/cc3100/Simplelink/Include" -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --define=ccs --define=TIVAWARE --display_error_number --diag_warning=225 --diag_warning=255 --diag_wrap=off --gen_func_subsections=on --preproc_with_compile --preproc_dependency="hello.pp" --cmd_file="./configPkg/compiler.opt"  "../hello.c"
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_31_01_33_core/xs" --xdcpath="C:/ti/tirtos_tivac_2_14_00_10/packages;C:/ti/tirtos_tivac_2_14_00_10/products/bios_6_42_01_20/packages;C:/ti/tirtos_tivac_2_14_00_10/products/ndk_2_24_03_35/packages;C:/ti/tirtos_tivac_2_14_00_10/products/uia_2_00_02_39/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.tiva:TM4C1294NCPDT -r release -c "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.4" --compileOptions "-mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path=\"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.4/include\" --include_path=\"C:/Users/CCS6_1_Tiva_C/TI_workspace_C1294_ticgt_RTOS_1/hello_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT\" --include_path=\"C:/ti/tirtos_tivac_2_14_00_10/products/TivaWare_C_Series-2.1.1.71b\" --include_path=\"C:/ti/tirtos_tivac_2_14_00_10/packages/ti/drivers/wifi/cc3100/Simplelink\" --include_path=\"C:/ti/tirtos_tivac_2_14_00_10/packages/ti/drivers/wifi/cc3100/Simplelink/Include\" -g --gcc --define=ccs=\"ccs\" --define=PART_TM4C1294NCPDT --define=ccs --define=TIVAWARE --display_error_number --diag_warning=225 --diag_warning=255 --diag_wrap=off --gen_func_subsections=on  " "../hello.cfg"
    gmake[1]: Entering directory `C:/Users/CCS6_1_Tiva_C/TI_workspace_C1294_ticgt_RTOS_1/hello_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT/src/sysbios'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `C:/Users/CCS6_1_Tiva_C/TI_workspace_C1294_ticgt_RTOS_1/hello_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT/src/sysbios'
    "../hello.c", line 99: error #20: identifier "task1Heap" is undefined
    1 error detected in the compilation of "../hello.c".
    
    >> Compilation failure
    gmake: *** [hello.obj] Error 1
    configuring hello.xem4f from package/cfg/hello_pem4f.cfg ...
    generating custom ti.sysbios library makefile ... 
    Starting build of library sources ...
    making C:/Users/CCS6_1_Tiva_C/TI_workspace_C1294_ticgt_RTOS_1/hello_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT/src/sysbios/sysbios.aem4f ...
    gmake[1]: Entering directory `C:/Users/CCS6_1_Tiva_C/TI_workspace_C1294_ticgt_RTOS_1/hello_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT/src/sysbios'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `C:/Users/CCS6_1_Tiva_C/TI_workspace_C1294_ticgt_RTOS_1/hello_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT/src/sysbios'
    Build of libraries done.
    clem4f package/cfg/hello_pem4f.c ...
    'Finished building: ../hello.cfg'
    ' '
    gmake: Target `all' not remade because of errors.
    
    **** Build Finished ****

  • I see in your screen shot that the value for "Handle" is NULL.

    Did you set that value to NULL?

    Can you try entering "task1Heap" as the value for "Handle" and then rebuilding?

    Steve
  • Thanks. It is found I have to manually write it as global variable in cfg file. I don't see how to set it global in GUI yet.
  • Hi Robert,

    If you have resolved your issue, can you please mark this thread as "answered"?

    Thanks,

    Steve