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.

AMIC110: Run CC-LINK sample project in standalone with TMDXICE110

Part Number: AMIC110
Other Parts Discussed in Thread: TMDXICE110,

Hi TI experts,

I want to write the following sample project to SPI FLASH of TMDXICE110 and run TMDXICE110 in standalone.

C:\ti\pdk_am335x_1_0_11\packages\MyExampleProjects\NIMU_ICSS_CCLinkSlave_iceAMIC110_wSoCLib_armExampleproject

However, because the size of the bin file of this project is large, it can not be loaded into FLASH.

Could you tell me how to write this project to SPI FLASH on TMDXICE110?

This project's out file is 2,775,096 bytes as follows.

The bin file will be 23, 105, 536 bytes in size.(The size is about 10 times larger)

I changed this bin file to NIMU_ICSS_CCLinkSlave_iceAMIC110_wSoCLib_armExample project_ti.bin by using tiimage.exe.
The size of this file is 23, 105, 544 bytes, which is also big.

I am referring to "Booting Via McSPI" on the following linkBest regards,

processors.wiki.ti.com/.../AM437x

NOTE: TMDXICE110's SPI FLASH is 8MB. Therefore, we can not write this binary to SPI FLASH.

Sasaki

  • Hi Sasaki,

    From the TI design document - www.ti.com/.../tidudf7.pdf , it seems the cc-link project is only tested with CCS loading. I will check it out internally and then get back to you.

    Regards,
    Garrett
  • Sasaki-san.

    Can you please provide the map file for the application. TO convert the executable to bootable image, the project uses objdump utility which will create a contiguous binary so if there is heap or stack region that is large, it will add that to the binary. To reduce the size of the image, can you refer to the following usage notes, to see if the boot image size reduces:

    software-dl.ti.com/.../index_Foundational_Components.html

    Please refer to : Removing Heap section from application binary section.

    Regards,
    Rahul
  • Hi Rahul-san,

    Thank you for your support.

    I tried it ,but the problem did not improve.

    I attach a map file. Please tell me if there are other improvement methods.

    NIMU_ICSS_CCLinkSlave_iceAMIC110_wSoCLib_armExampleproject.txt

    Best regards,

    Sasaki

  • Sasaki-san,

    That is little strange. Can you indicate which option you tried for eliminating the heap?

    We have a CCLINK based demo on AMIC110 in the demos folder for processor_sdk_rtos_am335x_5_X_x_xx\demos. I checked the app size generated there and it is only 288 KB so I have not yet root cause the issue with your binary.

    Can you also provide the output log of

    nm --print-size --size-sort -r NIMU_ICSS_CCLinkSlave_iceAMIC110_wSoCLib_armExampleproject.out

    The nm.exe utility is part of the GCC compiler install that is located under
    gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabi\bin

    This gives a sorted order of different sections in the binary. If you are having issues, please provide th binary and we can capture the log at our end to at this issue. I suspect some alignment or memory hole in the binary is causing this issue with objdump utility in GCC.

    Regards,
    Rahul
  • Hi Rahul-san,

    Thank you for your support!

    Rahul Prabhu said:

    That is little strange. Can you indicate which option you tried for eliminating the heap?

    I tested "option1".

    Rahul Prabhu said:

    Can you also provide the output log of

    nm --print-size --size-sort -r NIMU_ICSS_CCLinkSlave_iceAMIC110_wSoCLib_armExampleproject.out

    The nm.exe utility is part of the GCC compiler install that is located under
    gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabi\bin

    This gives a sorted order of different sections in the binary. If you are having issues, please provide th binary and we can capture the log at our end to at this issue. I suspect some alignment or memory hole in the binary is causing this issue with objdump utility in GCC.

    I attach a log. Verification please.

    nm_log.txt

    I also attach my project file.

    NIMU_ICSS_CCLinkSlave_iceAMIC110_wSoCLib_armExampleproject.zip

    Thanks and regards,

    Sasaki

  • Sasaki-san,

    I believe I now understand the reason for the increase in size of the application. To understand this a little better, Using “objdump.exe –h” and by opening your .bin file, I was able to notice a 20MB zero buffer in your binary from offset 0x3b400 that ends at offset 0x1600000. Here is the code/data section summary that shows this 20 MB hole in the .out:

    NIMU_ICSS_CCLinkSlave_iceAMIC110_wSoCLib_armExampleproject.out:     file format elf32-little
    
    Sections:
    Idx Name          Size      VMA       LMA       File off  Algn
      0 .c_int00      000000b4  80000000  80000000  00010000  2**2
                      CONTENTS, ALLOC, LOAD, READONLY, CODE
      1 ti.sysbios.family.arm.a8.mmuTableSection 00004000  80200000  80200000  000f0000  2**14
                      ALLOC
      2 xdc.meta      00000138  800000b4  800000b4  00109000  2**2
                      CONTENTS, READONLY
      3 .text         00036fdc  800001f0  800001f0  000101f0  2**4
                      CONTENTS, ALLOC, LOAD, READONLY, CODE
      4 .rodata       000027a7  800371cc  800371cc  000471cc  2**2
                      CONTENTS, ALLOC, LOAD, READONLY, DATA
      5 .vectors      00000040  80039c00  80039c00  00049c00  2**10
                      CONTENTS, ALLOC, LOAD, READONLY, DATA
      6 .ARM.exidx    00000008  80204000  80204000  000f4000  2**2
                      CONTENTS, ALLOC, LOAD, READONLY, DATA
      7 .data         000017f4  80204008  80039c40  00054008  2**2
                      CONTENTS, ALLOC, LOAD, DATA
      8 .far:NDK_MMBUFFER 0000c1c0  802057fc  8003b434  000557fc  2**2
                      CONTENTS, ALLOC, LOAD, DATA
      9 .far:NDK_PACKETMEM 0004b900  80211a00  800475f4  00061a00  2**7
                      CONTENTS, ALLOC, LOAD, DATA
     10 .bss          0000d6d0  8025d300  80092ef4  000ad300  2**3
                      ALLOC
     11 .stack        00028000  8026a9d0  80092ef8  000ba9d0  2**3
                      CONTENTS, ALLOC, LOAD, DATA
     12 .comment      0000007f  00000000  00000000  00109138  2**0
                      CONTENTS, READONLY
     13 .ARM.attributes 0000003b  00000000  00000000  001091b7  2**0
                      CONTENTS, READONLY
     14 .debug_aranges 00002e90  00000000  00000000  001091f8  2**3
                      CONTENTS, READONLY, DEBUGGING
     15 .debug_info   0011b480  00000000  00000000  0010c088  2**0
                      CONTENTS, READONLY, DEBUGGING
     16 .debug_abbrev 00014d1d  00000000  00000000  00227508  2**0
                      CONTENTS, READONLY, DEBUGGING
     17 .debug_line   0002898b  00000000  00000000  0023c225  2**0
                      CONTENTS, READONLY, DEBUGGING
     18 .debug_frame  00009b24  00000000  00000000  00264bb0  2**2
                      CONTENTS, READONLY, DEBUGGING
     19 .debug_str    00036666  00000000  00000000  0026e6d4  2**0
                      CONTENTS, READONLY, DEBUGGING
     20 .debug_loc    00020f7a  00000000  00000000  002a4d3a  2**0
                      CONTENTS, READONLY, DEBUGGING
     21 .debug_ranges 00003520  00000000  00000000  002c5cb4  2**0
                      CONTENTS, READONLY, DEBUGGING
     22 PRU0_REV1_IMEM 00002000  81600000  81600000  00100000  2**2
                      CONTENTS, ALLOC, LOAD, DATA
     23 PRU0_REV1_DMEM 00002000  81602000  81602000  00102000  2**0
                      CONTENTS, ALLOC, LOAD, DATA
     24 PRU0_REV1_EXT 00001000  81604000  81604000  00104000  2**0
                      ALLOC
     25 PRU1_REV1_IMEM 00002000  81605000  81605000  00105000  2**2
                      CONTENTS, ALLOC, LOAD, DATA
     26 PRU1_REV1_DMEM 00002000  81607000  81607000  00107000  2**0
                      CONTENTS, ALLOC, LOAD, DATA
     27 PRU1_REV1_EXT 00001000  81609000  81609000  00109000  2**0
                      ALLOC
    


    Changes to reduce the size were:

    Reduced code and data memory sections in config_am335x_a8.bld at location pdk_am335x_1_0_11/packages/ti/build/am335x/config_am335x_a8.bld

    APP_CODE_SIZE = 1*MB
    APP_CACHED_DATA_SIZE = 1*MB

    You will need to rebuild the application. Resulting may be in the order of 2-3MB which should allow you to put it on the SPI flash.

    Regards,
    Rahul

  • Hi Rahul-san,

    Thank you for your support!

    I tried that method and the problem improved.

    Best regards,

    Sasaki