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/TMS320F28377D: 32K limit. How to assign code to other FLASH Banks.

Part Number: TMS320F28377D

Tool/software: Code Composer Studio

Hi Guys, I have a serious problem with CCS9. 

My assembler code has just reached 38K and the largest FLASH BANK in the F28377D is 32K from a total of 1MB FLASH. When building my code CCS9 errors saying this:

error #10099-D: program will not fit into available memory.  placement with alignment/blocking fails for section ".text" size 0x814c page 0.  Available memory ranges:

   FLASHB       size: 0x2000       unused: 0x1efd       max hole: 0x1efb    

   FLASHC       size: 0x2000       unused: 0x2000       max hole: 0x2000    

   FLASHD       size: 0x2000       unused: 0x2000       max hole: 0x2000    

   FLASHE       size: 0x8000       unused: 0x8000       max hole: 0x8000    

error #10010: errors encountered during linking; "max1010_gpu.out" not built

How can I tell CCS9 to write my code starting from FLASH A and then continue to FLASH B, then C, then D and so on until the end of flash memory.

My F28377D has 1MB of flash memory, and I can only use 32K of it. I'm not to happy about that.

Please help as this is quite urgent.

Thanks Guys

Pete

  • The C28x linker command files supplied with CCS usually have a line similar to ...

       .text               : >> FLASHB | FLASHC | FLASHD | FLASHE      PAGE = 0, ALIGN(4)
    

    This splits up the .text output section, on input section boundaries, into the specified flash memory ranges.  For more background, please see the article TI Linker Command File Primer.  Focus on understanding the terms input section and output section.  Then focus on the sub-chapter about section splitting.

    Does this ...

    Peter Adamcik said:
    My assembler code has just reached 38K

    ... appear in a single source file?  If so, section splitting does not solve your problem.  There are other, a bit more difficult, changes you need to make to the linker command file.

    Thanks and regards,

    -George

  • Hi George, I read half of the TI Linker Command File Primer and it says to put this >> in front of the .txt >> FLASH B | FLASH C | etc.

    I looked in the 2837xFLASH_Ink_CPU1.cmd file and it is already in there. See:

    SECTIONS

    {

       /* Allocate program areas: */

       .cinit              : > FLASHB      PAGE = 0, ALIGN(4)

       .pinit              : > FLASHB,     PAGE = 0, ALIGN(4)

       .text               : >> FLASHB | FLASHC | FLASHD | FLASHE      PAGE = 0, ALIGN(4)

       codestart           : > BEGIN       PAGE = 0, ALIGN(4)

    So according to the text I just read it CCS9 should start writing my code at FLASHB and when B is full to continue into FLASH E but it doesn't.

    I don't know why the makers of CCS didn't do this as default. I think all users would like their code to start at the beginning os FLASH memory and continue through the other FLASH banks till it's full as one linear flash memory.

    I'll keep reading the docs and see where I end up. 

    Thanks George for you help.

    Peter :)

  • It is probably the case that one of your input sections is larger than any of the flash memory ranges.  I suspect that the 38K of assembler code all appears in a single file.  Is that correct?

    Thanks and regards,

    -George

  • Hi George, yes that is correct. I have 31k of .word graphics images and about 5k of assembly code and all won't fit in to on FLASH bank. Then largest FLASH bank is 32K as you know.

    I haven't had time to read up on the info you gave me as I'm in the middle of designing new hardware at the moment.

    Any ideas on writing my assembly code plus data starting from FLASH A and continuing to FLASH B... etc?

    Pete

     

  • Peter Adamcik said:
    I have 31k of .word graphics images and about 5k of assembly code

    You need to put each image and each function into separate subsections of .text.  For more background, please search the C28x assembly tools manual for the sub-chapter titled Subsections.  It will look similar to ...

        .sect    ".text:image1"
        ; image1 data
        .sect    ".text:image2"
        ; image2 data
        .sect    ".text:function1"
        ; instructions for function1
        .sect    ".text:function2"
        ; instructions for function2
    

    Then the linker is able to allocate these subsections into different memory ranges like FLASHB, FLASHC, etc.

    Thanks and regards,

    -George