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.

--rom_model or --ram_model mode for booting?

Anonymous
Anonymous

Hi,

I would like to ask a question on initialization mode.

On page 31, SPRU187R, TMS320C6000 Optimizing Compiler v 7.2 Beta:

 

What is the difference between the two initialization modes? Is it 

 

Global and static variable

Load time

Initialized by emulator

Run time

Initialized by c_int00() 

?

If the .out file is to be used for booting, should I choose run time initialization (--rom_model) instead of --ram_model? Since there is no emulator in this case, it seems to me that load time initialization cannot be used.

But is it true? Can AIS (Application Image Script) and bootloader assume the previous role of emulator, to do load time initialization for the program?

Zheng

 

  • Use --rom_model.

    Thanks and regards,

    -George

  • Anonymous
    0 Anonymous in reply to George Mock

    George,

    I will try it, and I appreciate the answer. However, at times I find your answers are always terse. Could you oblige to give some more explanation on the reasoning?

    BTW, which forum is the most appropriate to ask questions on AIS/bootloader? Is there a dedicated forum, or should be forum for the specific device (DaVinci forum for my case)? 

     

    Zheng

  • The option --ram_model works when you load the program with CCS.  But almost nowhere else.

    The ram model boot scheme presumes your system supplies the entire .out file to a loader, and this loader knows the format of the .out file, and how to access the .cinit section within that .out file, and how to process the records contained in the .cinit section to then initialize system memory.  The loader built in to CCS can do all that.  But it very unlikely that you will implement such a loader and use it in your end system.

    Thanks and regards,

    -George

  • Anonymous
    0 Anonymous in reply to George Mock

    George,

    Thanks for the clear explanation.

    George said:

    But it very unlikely that you will implement such a loader and use it in your end system.

    Then who is going to assume the duty of this loader in an end system? Do you mean if setting to --rom_model, then cint_00() would initialize .global and static sections?

    But before cint_00() could start working, who is going to load cint_00() itself from external storage into the memory (L1, L2, DDR2)? Who is going to load .data, remaining of .text and other sections into the memory? For any software program to accomplish this, it must also have the knowledge of the format of .out file just as the CCS loader. So does people take pains to learn the object file format? Could bootloader + AIS completely automate this?

    Would you mind having a look Bootloader + AIS = placement ?

     

    Zheng

  • Hi,

     

    The out format is not used outside CCS. The out file must be processed by some tools and only then written to NV memory. Bootloader deals with simple bin/ais files or something similar and doesn't know anything about .data .cinit sections. These are C specific things, and one can write in assembly.

  • Anonymous
    0 Anonymous in reply to Bartosz Bosowiec

    Bartosz,

    Bartosz Bosowiec said:

    Bootloader deals with simple bin/ais files or something similar and doesn't know anything about .data .cinit sections.


    This true. But can I regard Bootloader as an interpreter for AIS commands? AIS commands are simple, and bootloader translates them into machine instructions, which in turn do the copy (section placement) work.


    Bartosz Bosowiec said:

    These are C specific things, and one can write in assembly.

    I guess the purpose of AIS is to eliminate this assembly-written secondary bootloader?
     
       
    Zheng

  • Yes, you can regard (some) bootloaders as interpreters for AIS. The purpose of AIS is to speed up loading, as you can configure many things in few bytes of loaded image. However, one can rarely go without secondary bootloader as the primary one is too limited.

  • Anonymous
    0 Anonymous in reply to Bartosz Bosowiec

    Bartosz,

    I see it, many thanks for the answer:)

     

    Zheng