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/TMS320F28069M: Rules for assigning MEMORY to SECTIONS (where does .cio belong?)

Part Number: TMS320F28069M


Tool/software: TI C/C++ Compiler

Hello,

I am trying to add my own .cio section to the memory. Looking into the linker command file, I can see that:

a) some memory ranges overlap nicely, ex:

BEGIN: origin (0x50) + length (0x02) = BOOT_RSVD: origin (0x02)

BOOT_RSVD: origin (0x02) + length (0x4E) = RAMM0: origin (0x50)

RAMM0: origin (0x50) + length (0x3B0) = RAMM1: origin (0x400)

...and so on.

b) BUT there are a few memory ranges that seem to leave some unused space. Ex:

RAMM1: origin (0x400) + length (0x400) = 0x800


and the next section starts from 0x8000:


RAML0_L8 : origin = 0x008000,

(1) Does it mean that I can safely increase RAMM1 length to 7C00?

I have actually tried that (even with a smaller value to keep some margin) and then assigned .cio section to RAMM1. The result? I get following console message when running the program (probably connected to printf function):

"Invalid CIO command (0) in the CIO buffer at address (0x800) was not recognized. Please check the device and program memory maps."

The map file says that .cio was assigned specifically to 0x800.

(2) Can it be that there is some memory overlap at 0x800 after I increased the size of RAMM1 over this default limit? I cannot see any other section at this value!

Another question is:

(3)  What is the best memory range to allocate .cio section to? By default (if not implemented in the linker file) it is placed in USB_RAM. Is it OK to use the same range?

  • Hi,

    (1) Does it mean that I can safely increase RAMM1 length to 7C00?

    I have actually tried that (even with a smaller value to keep some margin) and then assigned .cio section to RAMM1. The result? I get following console message when running the program (probably connected to printf function):

    "Invalid CIO command (0) in the CIO buffer at address (0x800) was not recognized. Please check the device and program memory maps."

    The map file says that .cio was assigned specifically to 0x800.

    No, you can not use that space because that is not RAM space. Please refer the Memory Map section of device manual.

    (3)  What is the best memory range to allocate .cio section to? By default (if not implemented in the linker file) it is placed in USB_RAM. Is it OK to use the same range?

    You should be able to map in some valid RAM section. USB_RAM is for USB use only and  not for this.

    Regards,

    Vivek Singh

  • Thank you! A memory map from the datasheet is a great help. I moved the .stack section to RAML0_L8, is it a good choice?
  • Got one more question.



    There is a linker file called F2806x_Headers_nonBIOS.cmd which places specific registers in the memory. How does it relate to the basic linker command file (F28069F_ram_ln.cmd)? Can I use it as a complement or is it some form of a substitute?

  • Jakub

    Both those linkers are necessary in your project. The headers linker handles placing the register structs properly into memory. The other handles all your other project memory allocations.

    Best regards
    Chris