• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » BIOS » BIOS forum » F2808 'C' section assignments
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

F2808 'C' section assignments

F2808 'C' section assignments

This question is answered
Carl Klaes1
Posted by Carl Klaes1
on Jun 19 2012 09:16 AM
Prodigy205 points

I have 2 files of lookup tables that I want in FLASH sectors A & B respectively for updating the operating parameters.

I use BIOS to assign:

FLASH_TBL1  base: 3E8000, len: 4000, space: code

FLASH_TBL2  base: 3EC000, len: 4000, space: code

FLASH             base:3F000, len 7F80, space: code

How do I get the linker to put the tables in the proper place - they are declared as constants.  The #pragma CODE_SECTION wants a function name to place, so how do I place a tables section?

THANKS!

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • BrandonAzbell
    Posted by BrandonAzbell
    on Jun 19 2012 10:46 AM
    Suggested Answer
    Guru55185 points

    Use the #pragma DATA_SECTION described in Section 6.10.5 of the TMS320C28x Optimizing C/C++ Compiler v6.0 User's Guide.

    Brandon

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Carl Klaes1
    Posted by Carl Klaes1
    on Jun 19 2012 11:48 AM
    Prodigy205 points

    OK, I put in the #pragma DATA_SECTION statements and changed the Table sections to data, page 1 in the bios memory settings.  If I don't do anything else It compiles and links with a warning that the sections are undefined.  If I go ahead and flash the part, there are no tables where they should be.  If I put

    SECTIONS{

    TABLE1 : > FLASH_TABLE1 etc

    I get error: can't find any memory areas for allocation of TABLE1...

     

    Thanks for the help!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • BrandonAzbell
    Posted by BrandonAzbell
    on Jun 19 2012 12:40 PM
    Guru55185 points

    Just so that I am clear, you have defined a memory segment called FLASH_TBL1 but in the linker command file you are allocating TABLE1 to FLASH_TABLE1?

    Shouldn't it be :

    SECTIONS{

    TABLE1 : > FLASH_TBL1

    Brandon

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Carl Klaes1
    Posted by Carl Klaes1
    on Jun 19 2012 13:40 PM
    Prodigy205 points

    Sorry, I just fudged the names for expediency.  The names match.  To re-state, in BIOS I declare:

    FLASH_TBL1 base: 0x3E8000, len:0x4000, space:data

    FLASH_TBL2 base: 0x3EC000, len:0x4000, space:data

    FLASH base:0x3F000, len 0x7F80, space:code

     

    I put pragma statements in the table files.  For the table targeted to FLASH_TBL1 I use:

    #pragma DATA_SECTION(tFluxZero, "FZTBLS")

     

    And several tables / constants targeted to FLASH_TBL2 using this format:

    #pragma DATA_SECTION(SiMax, "TBLS")

    #pragma DATA_SECTION(TiMax, "TBLS")

    #pragma DATA_SECTION(Imot, "TBLS")

     

    const Uint16 SiMax = 16;                       

    const Uint16 TiMax = 16;

    const Uint16 Imot[17][17] =                    

     

    Finally I try including these two lines in the ‘SECTIONS’ of the user.cmd file

     

    SECTIONS

    {

     

    .

    /*** Section FZTBLS      ***/

                FZTBLS                        : > FLASH_TBL1,                     PAGE = 1        

     

    /*** Section TBLS                      ***/

                TBLS                            : > FLASH_TBL2,                     PAGE = 1

    }

     

    And that is when I get the errors:

    >> warning: can't find a memory area named 'FLASH_TBL1' on page 1 for

                allocation of 'FZTBLS'

    >>   error: can't find any memory areas for allocation of 'FZTBLS'

    >>   error: can't allocate 'FZTBLS' into 'FLASH_TBL1' (page 1)

    >> warning: can't find a memory area named 'FLASH_TBL2' on page 1 for allocation

                of 'TBLS'

    >>   error: can't find any memory areas for allocation of 'TBLS'

    >>   error: can't allocate 'TBLS' into 'FLASH_TBL2' (page 1)

    >>   error: errors in input - ./Debug/SR_F2808.out not built

     

    Thanks Again!

    Carl

     

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • BrandonAzbell
    Posted by BrandonAzbell
    on Jun 19 2012 15:31 PM
    Guru55185 points

    This may sound obvious, but is the linker command file that BIOS generates included in the project?

    Somewhere, a linker command file needs to have a MEMORY statement declaration for FLASH_TBL1 and FLASH_TBL2.

    Brandon

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sasha Slijepcevic
    Posted by Sasha Slijepcevic
    on Jun 19 2012 16:11 PM
    Genius15700 points

    Carl,
    which version of BIOS are you using? How did you specify your memory layout, in which file?

    If my reply answers your question please mark the thread as answered.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Carl Klaes1
    Posted by Carl Klaes1
    on Jun 20 2012 08:18 AM
    Prodigy205 points

    I have

    CCS 3.3.38

    IDE 5.98.0.219

    BIOS 5.31.02

    Code Gen Tools v4.1.3

     I set up the memory in the BIOS.  I may be missing a step somewhere, because even though I add memory sections in the Memory Section Manager they don't show up in the script window and looking at the generated _cfg.cmd file I can see that my new sections are not included.

     /* MODULE MEM */

    -stack 0x200

    MEMORY {

       PAGE 1:   M0SARAM:    origin = 0x400,         len = 0x400

       PAGE 1:   L0SARAM:    origin = 0x8000,        len = 0x1000

       PAGE 0:   OTP:        origin = 0x3d7800,      len = 0x400

       PAGE 0:   FLASH:      origin = 0x3e8000,      len = 0xff80

       PAGE 0:   H0SARAM:    origin = 0xa000,        len = 0x2000

       PAGE 0:   BOOTROM:    origin = 0x3ff000,      len = 0xfc0

       PAGE 1:   PIEVECT:    origin = 0xd00,         len = 0x100

       PAGE 0:   L1SARAM:    origin = 0x9000,        len = 0x1000

       PAGE 0:   BEGIN_M0:   origin = 0x0,           len = 0x2

       PAGE 0:   BEGIN_FLASH: origin = 0x3f7ff6,     len = 0x2

       PAGE 0:   CSM_RSVD:   origin = 0x3f7f80,      len = 0x76

       PAGE 0:   PASSWORDS:  origin = 0x3f7ff8,      len = 0x8

    }

     

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sasha Slijepcevic
    Posted by Sasha Slijepcevic
    on Jun 20 2012 13:08 PM
    Genius15700 points

    Carl,
    when you add a memory object in the Memory Manager, you are not seeing the corresponding statements being created in the right pane of gconf, where the Tconf script is generated? Is that specific to the Memory Manager? If you create other objects, logs for example, do they appear in the Tconf script? Any warnings when you click on Save icon?

    If my reply answers your question please mark the thread as answered.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Carl Klaes1
    Posted by Carl Klaes1
    on Jun 20 2012 13:55 PM
    Prodigy205 points

    So, the .tcf file does have some updates.  The original configuration is at the beginning and the updates are at the end of the file.  No warnings are generated when I save.

    /* applying user changes */

    bios.L1SARAM = bios.MEM.create("L1SARAM");

    bios.L1SARAM.base = 0x9000;

    bios.L1SARAM.len = 0x1000;

    bios.L1SARAM.createHeap = 0;

    bios.BEGIN_M0 = bios.MEM.create("BEGIN_M0");

    bios.BEGIN_M0.len = 0x2;

    bios.BEGIN_M0.createHeap = 0;

    bios.BEGIN_M0.space = "code";

    bios.MEM.EBSSSEG = prog.get("M0SARAM");

    bios.L0SARAM.len = 0x1000;

    bios.FLASH.base = 0x3e8000;

    bios.FLASH.len = 0xfff6;

    bios.H0SARAM.base = 0xa000;

    bios.LNK_dataPump.order = 1;

    bios.RTA_dispatcher.order = 0x2;

    bios.IDL_cpuLoad.order = 0x3;

    bios.PIE_INT1_6.fxn = prog.extern("ADCINT_ISR");

    bios.PIE_INT1_8.fxn = prog.extern("WAKEINT_ISR");

    bios.PRD_clock.order = 1;

    bios.M0SARAM.base = 0x2;

    bios.M0SARAM.len = 0x3fe;

    bios.M0SARAM.createHeap = 0;

    bios.M0SARAM.base = 0x400;

    bios.M0SARAM.len = 0x40

    :

    :

    bios.MEM.instance("FLASH").base = 0x3ef000;

    bios.MEM.instance("FLASH").len = 0x7f80;

    bios.MEM.create("FLASH_TBLS");

    bios.MEM.instance("FLASH_TBLS").base = 0x000003;

    bios.MEM.instance("FLASH_TBLS").len = 0x4000;

    bios.MEM.instance("FLASH_TBLS").createHeap = 0;

    bios.MEM.instance("FLASH_TBLS").space = "code";

    bios.MEM.create("FLASH_FZTBL");

    bios.MEM.instance("FLASH_FZTBL").base = 0x3e8000;

    bios.MEM.instance("FLASH_FZTBL").createHeap = 0;

    bios.MEM.instance("FLASH_FZTBL").len = 0x4000;

    bios.MEM.instance("FLASH_FZTBL").space = "code";

    bios.MEM.instance("FLASH_TBLS").base = 0x3ec000;

    bios.MEM.instance("FLASH").base = 0x3f0000;

    bios.MEM.instance("FLASH_FZTBL").space = "data";

    bios.MEM.instance("FLASH_TBLS").space = "data";

    bios.MEM.instance("FLASH_FZTBL").destroy();

    bios.MEM.create("FLASH_TBL1");

    bios.MEM.instance("FLASH_TBL1").base = 0x3e8000;

    bios.MEM.instance("FLASH_TBL1").createHeap = 0;

    bios.MEM.instance("FLASH_TBL1").len = 0x4000;

    bios.MEM.instance("FLASH_TBLS").destroy();

    bios.MEM.create("FLASH_TBL2");

    bios.MEM.instance("FLASH_TBL2").base = 0x3ec000;

    bios.MEM.instance("FLASH_TBL2").createHeap = 0;

    bios.MEM.instance("FLASH_TBL2").len = 0x4000;

    // !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT!

    if (config.hasReportedError == false) {

    prog.gen();

    }

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sasha Slijepcevic
    Posted by Sasha Slijepcevic
    on Jun 20 2012 15:09 PM
    Genius15700 points

    Ok, so your TCF script contains your new memory objects, but when you build the project the objects are not in the generated linker command file, correct? If you go to Debug directory of your project, you'll find a file with the extension .cdb. Can you please post it together with the linker command file after you clean and rebuild your project? Please also post the complete output from the console window.

    If my reply answers your question please mark the thread as answered.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Carl Klaes1
    Posted by Carl Klaes1
    on Jun 21 2012 08:55 AM
    Prodigy205 points

    I don’t find the .cdb file attached to the project in CCS and  I don’t find it in the debug directory either.  There are two .cdb files that I attached in the main project directory.

    I have three .cmd files in the project that are attached along with the build output file.

    Thanks!

    Carl

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sasha Slijepcevic
    Posted by Sasha Slijepcevic
    on Jun 21 2012 13:04 PM
    Genius15700 points

    Carl,
    I don't see any attached files. Can you try again?

    If my reply answers your question please mark the thread as answered.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Carl Klaes1
    Posted by Carl Klaes1
    on Jun 22 2012 07:45 AM
    Prodigy205 points

    I hope it worked this time.  This format of communication is very tedious.  Any chance I could get a direct email and or phone help?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sasha Slijepcevic
    Posted by Sasha Slijepcevic
    on Jun 22 2012 11:56 AM
    Verified Answer
    Verified by David Friedland
    Genius15700 points

    I still don't see any attached files. You can try adding me as a friend on the forum, and then you'll be able to send private messages. Just click on my name and then you'll see that option on the right-hand side of the screen.
    It's not going to work siginificantly faster than posting on the forum, but at least you don't have to post possibly proprietary code on the Web. If you decide to do that, please zip up the whole project and send it to me, as well as the complete output from the console window.

    The phone help is not generally available. Such requests usually go through some business channels and then I am asked by my supervisor to work with the customer. Even in such a case I would have to look at the project first, before the phone communication is of any help.  

    If my reply answers your question please mark the thread as answered.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Carl Klaes1
    Posted by Carl Klaes1
    on Jun 25 2012 11:57 AM
    Prodigy205 points

    I've been having alot of trouble with this site / process because of recent upgrades  in our internet security.  I posted the files in my folder.  I hope you can access them.

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use