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.

CCS/EVMK2H: CCS/EVMK2H

Part Number: EVMK2H
Other Parts Discussed in Thread: SYSBIOS, 66AK2H12

Tool/software: Code Composer Studio

Hi,

I am using EVMK2H and CCSV7.

I am trying to run C:\ti\pdk_k2hk_4_0_7\packages\ti\boot\writer\nand\src example on the EVM to test NAND read/write functionality.

I have configured the target as

and I used C:\ti\ccsv7\ccs_base\emulation\boards\xtcievmk2x\gel file.

But when I run the code I am getting following error

[C66xx] NAND Writer Utility Version 01.00.00.05

Flashing block 0 (0 bytes of 6)
platform_device_write block # 0 failed!
Returned platform error number is 48
NAND write giving up
ti.sysbios.heaps.HeapMem: line 221: out of memory: handle=0x832ff8, size=131080

when I run the prebuilt binary It is working fine (C:\ti\pdk_k2hk_4_0_7\packages\ti\boot\writer\nand\evmk2h\bin).

Please help me to solve the issue.

Thank you,

Mahima Shanbag

  • The team is notified. They will post their feedback directly here.

    BR
    Tsvetolin Shulev
  • Mahima,

    I believe that you are not describing the issue completely here. I am able to use the pre-built as welll as build the utility from source and run the nand writer without any issues.

    another thing that I noticed in your log is the HeapMem error from SYSBIOS kernel. The nand writer is bare-metal code that has no dependency with TI RTOS so can you describe why you are seeing the SYSBIOS runtime error.

    If you are using the nandwriter code by integrating in the BIOS application, have you tried to increase the Heap memory in the configuration.

    Regards,
    Rahul
  • Hi Rahul,

    Thanks for your suggestion.

    I was using nandwriter example with sysbios. I tried increasing the heap size in .cfg file but i got following errors

    **** Build of configuration Debug for project EMIF_NAND_LATEST ****
    
    "C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 4 all -O 
    gmake[1]: Entering directory 'C:/Users/admin/workspace_v7/EMIF_NAND_LATEST/Debug'
    'Building file: ../hello.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_50_02_20_core/xs" --xdcpath="C:/ti/bios_6_52_00_12/packages;C:/ti/pdk_k2hk_4_0_7/packages/ti/csl;C:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p ti.platforms.evmC66AK2E -r release -c "C:/ti/ti-cgt-c6000_8.1.3" --compileOptions "-g --optimize_with_debug" "../hello.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring hello.xe66 from package/cfg/hello_pe66.cfg ...
    generating custom ti.sysbios library makefile ... 
    Starting build of library sources ...
    making C:/Users/admin/workspace_v7/EMIF_NAND_LATEST/src/sysbios/sysbios.ae66 ...
    gmake[1]: Entering directory `C:/Users/admin/workspace_v7/EMIF_NAND_LATEST/src/sysbios'
    cle66 C:/ti/bios_6_52_00_12/packages/ti/sysbios/BIOS.c ...
    asme66 C:/ti/bios_6_52_00_12/packages/ti/sysbios/family/c64p/Exception_asm.s64P ...
    asme66 C:/ti/bios_6_52_00_12/packages/ti/sysbios/family/c64p/Hwi_asm.s62 ...
    asme66 C:/ti/bios_6_52_00_12/packages/ti/sysbios/family/c64p/Hwi_asm_switch.s62 ...
    asme66 C:/ti/bios_6_52_00_12/packages/ti/sysbios/family/c64p/Hwi_disp_always.s64P ...
    asme66 C:/ti/bios_6_52_00_12/packages/ti/sysbios/rts/ti/tls_get_tp.asm ...
    asme66 C:/ti/bios_6_52_00_12/packages/ti/sysbios/family/c62/TaskSupport_asm.s62 ...
    asme66 C:/ti/bios_6_52_00_12/packages/ti/sysbios/timers/timer64/Timer_asm.s64P ...
    are66 BIOS.obj c64p_Exception_asm.obj c64p_Hwi_asm.obj c64p_Hwi_asm_switch.obj c64p_Hwi_disp_always.obj ti_tls_get_tp.obj c62_TaskSupport_asm.obj timer64_Timer_asm.obj ...
    gmake[1]: Leaving directory `C:/Users/admin/workspace_v7/EMIF_NAND_LATEST/src/sysbios'
    Build of libraries done.
    cle66 package/cfg/hello_pe66.c ...
    'Finished building: ../hello.cfg'
    ' '
    gmake[1]: Leaving directory 'C:/Users/admin/workspace_v7/EMIF_NAND_LATEST/Debug'
            1 file(s) copied.
    making ../src/sysbios/sysbios.ae66 ...
    gmake[1]: Nothing to be done for 'all'.
    'Building file: ../hello.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ti-cgt-c6000_8.1.3/bin/cl6x" -mv6500 --include_path="C:/ti/pdk_k2hk_4_0_7/packages/ti/board" --include_path="C:/ti/pdk_k2hk_4_0_7/packages/ti/board/diag/nand/src" --include_path="C:/ti/pdk_k2hk_4_0_7/packages/ti/boot/writer/nand/include" --include_path="C:/ti/pdk_k2hk_4_0_7/packages/ti/board/diag/common/K2G" --include_path="C:/Users/admin/workspace_v7/EMIF_NAND_LATEST" --include_path="C:/ti/ti-cgt-c6000_8.1.3/include" -g --diag_wrap=off --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="hello.d" --cmd_file="configPkg/compiler.opt" "../hello.c"
    'Finished building: ../hello.c'
    ' '
    making ../src/sysbios/sysbios.ae66 ...
    gmake[2]: Nothing to be done for 'all'.
    'Building target: EMIF_NAND_LATEST.out'
    'Invoking: C6000 Linker'
    "C:/ti/ti-cgt-c6000_8.1.3/bin/cl6x" -mv6500 -g --diag_wrap=off --diag_warning=225 --display_error_number -z -m"EMIF_NAND_LATEST.map" -i"C:/ti/pdk_k2hk_4_0_7/packages/ti/csl/lib/k2h/c66/release" -i"C:/ti/pdk_k2hk_4_0_7/packages/ti/platform/evmk2h/platform_lib/lib/debug" -i"C:/ti/ti-cgt-c6000_8.1.3/lib" -i"C:/ti/ti-cgt-c6000_8.1.3/include" --reread_libs --diag_wrap=off --warn_sections --display_error_number --xml_link_info="EMIF_NAND_LATEST_linkInfo.xml" --rom_model -o "EMIF_NAND_LATEST.out" "./hello.obj" -l"configPkg/linker.cmd" -lti.csl.ae66 -lti.platform.evmk2h.ae66 -llibc.a 
    <Linking>
    warning #10247-D: creating output section "platform_lib" without a SECTIONS specification
    "configPkg/linker.cmd", line 144: error #10099-D: program will not fit into available memory.  run placement with alignment fails for section ".far" size 0x141204 .  Available memory ranges:
       L2SRAM       size: 0x80000      unused: 0x7ee30      max hole: 0x7ee30   
    error #10010: errors encountered during linking; "EMIF_NAND_LATEST.out" not built
    gmake[1]: *** [EMIF_NAND_LATEST.out] Error 1
    gmake: *** [all] Error 2
    
    >> Compilation failure
    makefile:142: recipe for target 'EMIF_NAND_LATEST.out' failed
    makefile:138: recipe for target 'all' failed
    
    **** Build Finished ****
    

    Please help me to resolve the issues.

    I have another doubt,

    I tried using MCSDK example, I imported  C:\ti\MCSDK\mcsdk_bios_3_01_03_06\tools\writer\evmK2H project and it is working fine.

    Then i copied C:\ti\pdk_k2hk_4_0_7\packages\ti\boot\writer\nand\src\nanwriter.c to C:\ti\MCSDK\mcsdk_bios_3_01_03_06\tools\writer\src

    it is running without any issues.

    My question is the code which was giving me following error

    [C66xx] NAND Writer Utility Version 01.00.00.05

    Flashing block 0 (0 bytes of 6)
    platform_device_write block # 0 failed!
    Returned platform error number is 48
    NAND write giving up
    ti.sysbios.heaps.HeapMem: line 221: out of memory: handle=0x832ff8, size=131080

    when I tried running it as seperate project is working when I copied to C:\ti\MCSDK\mcsdk_bios_3_01_03_06\tools\writer\src.

    I am not getting what is the actual issue and where I missed.

    Please guide me .

    Thank you,

    Mahima Shanbag

  • Mahima,

    It is unclear what is the purpose of moving the files to different location and how your RTOS project is setup. without this insight, I am not sure we can provide relevant guidance on this issue. Please provide the project and clear guidance on how to reproduce this issue and we may be able provide the right guidance.

    Regards,
    Rahul
  • Hi Rahul,

    First I imported hello_66AK2H12_C66XX and then I copied C:\ti\pdk_k2hk_4_0_7\packages\ti\boot\writer\nand\src\nandwriter.c code into hello.c

    then I added the headers in the include options as below,

    then I added following libraries

    It was building fine but when I try to run on EVM it was giving

    [C66xx] NAND Writer Utility Version 01.00.00.05

    Flashing block 0 (0 bytes of 6)
    platform_device_write block # 0 failed!
    Returned platform error number is 48
    NAND write giving up
    ti.sysbios.heaps.HeapMem: line 221: out of memory: handle=0x832ff8, size=131080


    I increased the Heap size in .cfg file then also it is giving error

     
    making ../src/sysbios/sysbios.ae66 ...
    gmake[2]: Nothing to be done for 'all'.
    'Building target: EMIF_NAND_LATEST.out'
    'Invoking: C6000 Linker'
    "C:/ti/ti-cgt-c6000_8.1.3/bin/cl6x" -mv6500 -g --diag_wrap=off --diag_warning=225 --display_error_number -z -m"EMIF_NAND_LATEST.map" -i"C:/ti/pdk_k2hk_4_0_7/packages/ti/csl/lib/k2h/c66/release" -i"C:/ti/pdk_k2hk_4_0_7/packages/ti/platform/evmk2h/platform_lib/lib/debug" -i"C:/ti/ti-cgt-c6000_8.1.3/lib" -i"C:/ti/ti-cgt-c6000_8.1.3/include" --reread_libs --diag_wrap=off --warn_sections --display_error_number --xml_link_info="EMIF_NAND_LATEST_linkInfo.xml" --rom_model -o "EMIF_NAND_LATEST.out" "./hello.obj" -l"configPkg/linker.cmd" -lti.csl.ae66 -lti.platform.evmk2h.ae66 -llibc.a
    <Linking>
    warning #10247-D: creating output section "platform_lib" without a SECTIONS specification
    "configPkg/linker.cmd", line 144: error #10099-D: program will not fit into available memory.  run placement with alignment fails for section ".far" size 0x141204 .  Available memory ranges:
       L2SRAM       size: 0x80000      unused: 0x7ee30      max hole: 0x7ee30   
    error #10010: errors encountered during linking; "EMIF_NAND_LATEST.out" not built
    gmake[1]: *** [EMIF_NAND_LATEST.out] Error 1
    gmake: *** [all] Error 2

    >> Compilation failure
    makefile:142: recipe for target 'EMIF_NAND_LATEST.out' failed
    makefile:138: recipe for target 'all' fail


    Please help me to solve these issues.

    --------------->>>> It is unclear what is the purpose of moving the files to different location and how your RTOS project is setup

    I just tried with MCSDK example C:\ti\MCSDK\mcsdk_bios_3_01_03_06\tools\writer\evmK2H .

    In which is C:\ti\MCSDK\mcsdk_bios_3_01_03_06\tools\writer\src is same as C:\ti\pdk_k2hk_4_0_7\packages\ti\boot\writer\nand\src and it is working for me so I didnt understand what is the differencce between MCSDK and PDK .

    Thank you ,

    Mahima shanbag