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/TMS320F28379D: FLASH memory

Part Number: TMS320F28379D

Tool/software: Code Composer Studio

hello, 

I want to create 2 projects with 2 separate builds let us call it a.out and b.out.

a.out is the main application file where the complete program runs. the a.out application is stored in FLASH Sector E,F,G

b.out has only the constants (values) these constants will be used by a.out application. the constants b.out is loaded in FLASH sector K

I have updated the linker files according to the documentation provided for both a.out and b.out programs.

 I am able to verify the values of constants in a.out application which was provided in b.out.

But i have a doubt here a.out and b.out both executable have main function as entry point, can i develop this without having a main in b.out for constants only.

thanks.

Nagesh

  • Nagesh,

    There is no any functionality for main() in b.out and you simply have an empty main function- correct?

    Thanks and regards,

    Vamsi

  • hi Vamsi,

    thank you for the information, yes main is currently empty.

    thanks

    Nagesh

  • Nagesh,

    Ok, did you try to use dsect or noload type for the .text section (details in link below)? Would that work for you?

    http://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html

    Thanks and regards,

    Vamsi

  • Hi Vamsi, 

    I did not try that yet as i am not aware of it will through the link you provided in detail. 

    I just wanted to to know if its possible to achieve what i want to build for b.out file without having a main() function.

    thanks,

    Nagesh

  • NAGESH RK said:

    I want to create 2 projects with 2 separate builds let us call it a.out and b.out.

    a.out is the main application file where the complete program runs. the a.out application is stored in FLASH Sector E,F,G

    b.out has only the constants (values) these constants will be used by a.out application. the constants b.out is loaded in FLASH sector K

    You can accomplish that without making b.out a completely separate project and executable. In the source code for b.out that defines the tables, use either #pragma DATA_SECTION or #pragma SET_DATA_SECTION to put those tables in input sections you name.  For details on those pragmas, please search the C28x compiler manual.  In the linker command file, collect those input sections into one output section, and allocate that output section into the memory range for FLASH sector K.

    Thanks and regards,

    -George

  • hi George,

    My requirement is to have the constants loaded in FLASH sector K without disturbing the application a.out. the functionality of a.out will change according to the constants loaded in flash K which i can update remotely.

    So i am expecting b.out to be present.

    thanks,

    Nagesh 

  • Here is how to use CCS to create a project that only contains one data table.

    When the new project is created, under Project templates and examples, select Empty Assembly-Only Project.  Add one C source file to the project, which defines a data table.  Model it on this simple example ...

    #define LENGTH 256
    #pragma DATA_SECTION(data_table, "special_section_name")
    
    const int data_table[LENGTH] = {
        100,
        200,
        300,
        400,
        500
    
        /* and so on */
    
    };

    When the project is created, you tell CCS which processor is used.  Based on that choice, a linker command file is automatically added to the project.  Edit that linker command file.  In the SECTIONS directive, remove everything, then add one line similar to ...

       special_section_name > FLASHK

    This entry creates an output section named special_section_name.  It is made up of all the input sections with that same name.  In this case, there is one such input section, from the one object file in the project.  This output section is allocated to the FLASHK memory range.

    When the project is built, the linker issues a diagnostic similar to ...

    warning #10202-D: no suitable entry-point found; setting to 0

    Ignore this diagnostic.  If it cannot be ignored, it can be suppressed with the linker option --diag_suppress=10202.

    Thanks and regards,

    -George