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/EVMK2H: HEAPSIZE not defined

Part Number: EVMK2H

Tool/software: TI C/C++ Compiler

Hi,

I have recently bought EVMK2H platform. I am trying to build a simple hello world on ARM core of EVMk2H board using GCC Linaro compiler

CCS version = v7.1

Processor SDK installed = PROCESSOR-SDK-RTOS-K2HK  03_02_00_05

I followed the below link to build the hello world example on ARM core of EVMK2H:

processors.wiki.ti.com/.../Processor_SDK_Bare_Metal_Examples 

When i try to build the project I get this error:

**** Build of configuration Debug for project stest8 ****

/home/user/ti/ccs7.1/ccsv7/utils/bin/gmake -k -j 4 all -O
Building file: ../main.c
Invoking: GNU Compiler
"/home/user/ti/ccs7.1/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc" -c -mcpu=cortex-a15 -mtune=cortex-a15 -marm -mfloat-abi=hard -I"/home/user/workspace_v7/stest8" -I"/home/user/ti/ccs7.1/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -specs="nosys.specs" -MMD -MP -MF"main.d" -MT"main.o" -o"main.o"  "../main.c"
Finished building: ../main.c
 
Building target: stest8.out
Invoking: GNU Linker
"/home/user/ti/ccs7.1/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc" -mtune=cortex-a15 -marm -g -gdwarf-3 -gstrict-dwarf -Wall -specs="nosys.specs" -mfloat-abi=hard -Wl,-Map,"stest8.map" -o"stest8.out" "./main.o" -Wl,-T"../66AK2Gxx.lds"  
makefile:138: recipe for target 'stest8.out' failed
../66AK2Gxx.lds:158: undefined symbol `HEAPSIZE' referenced in expression
collect2: error: ld returned 1 exit status
gmake[1]: *** [stest8.out] Error 1
gmake: *** [all] Error 2
makefile:134: recipe for target 'all' failed

**** Build Finished ****

 

Could anyone help me resolve this issue. The issue seems to be 66AK2Gxx.lds file.

  • Shahid,

    Please note Processor SDK RTOS is not supporting CCSv7 yet. Please refer to the release notes for the compatible version for your version of the SDK.

    The instructions were created using CCSv6 so may need some updates. I have added these instructions to wiki, check note for Keystone device users under Step 6 of the Cortex A15 section.

    Regards,
    Rahul
  • Hi Rahul,

    Thank you for your response.

    Ok now i am using CCSv6 instead of CCSv7. And i am trying to bulid the Hello world example on CCSv6 using GCC Linaro compiler.

    Actually i have already tried adding these lines in the 66AK2Gxx.lds file.  

    STACKSIZE = 0x0001000;

    HEAPSIZE = 0x00000400;

    Now my code seems to have build properly but when i go to into Debug, arm_A15_0 core is always running and it does not print Hello world on console.

    Looks like it is not able to find Entry point(main), and it is always in the running state. Please check the build log below(I have highlighted the warning in red)


     

     

    Build Log :-

    **** Build of configuration Debug for project stest_gcc_arm_genericarma15 ****

    /home/shahid/ti/ccsv6/utils/bin/gmake -k all

    Building file: ../main.c

    Invoking: GNU Compiler

    "/home/shahid/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc" -c -I"/home/shahid/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include" -g -gdwarf-3 -gstrict-dwarf -Wall -specs="nosys.specs" -MMD -MP -MF"main.d" -MT"main.o" -o"main.o"  "../main.c"

    Finished building: ../main.c

    Building target: stest_gcc_arm_genericarma15.out

    Invoking: GNU Linker

    "/home/shahid/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc" -g -gdwarf-3 -gstrict-dwarf -Wall -specs="nosys.specs" -Wl,-Map,"stest_gcc_arm_genericarma15.map" -o"stest_gcc_arm_genericarma15.out" "./main.o" -Wl,-T"../66AK2Gxx.lds"  

    /home/shahid/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol Entry; defaulting to 0c000000

    Finished building target: stest_gcc_arm_genericarma15.out

    **** Build Finished ****

    What Entry should i define to direct it start from main address?

     

    Regards,

    Shahid

  • Shahid,

    Refer to step 5 on the wiki. YOu need to add the file startup_ARMCA15.S to your project. This file sets up the ARM interrupt vectors and sets up the entry point. My understanding is that GNU GCC compiler is not a TI compiler so to complete the initialization of ARM interrupt vectors and setting the entry point you need to add this assembly file to bare-metal projects.

    Another thing to be aware of is the the standard printf on ARM with GNU GCC compiler requires, you to link Semihosting library (librdimon) to your project so ensure that your linker settings has this library.

    Hope this helps you past this issue.

    Regards,
    Rahul