infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 5 of 5

Thread: assigning a address to a Global Constant in PFlash.-AURIX - TC23x

  1. #1
    Beginner Beginner Lnr is on a distinguished road
    Join Date
    Oct 2018
    Posts
    5
    Points
    50

    assigning a address to a Global Constant in PFlash.-AURIX - TC23x

    How to allocate a Global Constant to some fixed Address in PFlash. Using Tasking Compiler(TriCore_v6.2r1) for Aurix TC23x.
    Able to assign a fixed address in DSPR like below.

    #define TEST_ADDRESS (0x70000000UL)
    uint32_t Test_Var __at(TEST_ADDRESS);

    Thanks!
    Last edited by Lnr; Mar 25th, 2019 at 07:26 PM. Reason: typo correction

  2. #2
    Beginner Beginner ulrichk is on a distinguished road
    Join Date
    Sep 2017
    Posts
    5
    Points
    85
    You can allocate a const value at an absolute address using the TASKING tools as follows:

    #define TEST_ADDRESS (0xA0000000UL)
    const uint32_t Test_Var __at(TEST_ADDRESS) = 0x12345678;

    Best regards,
    Ulrich

  3. #3
    Beginner Beginner Lnr is on a distinguished road
    Join Date
    Oct 2018
    Posts
    5
    Points
    50
    Hi Ulrich,

    Thanks. I tried below.

    #define TEST_ADDRESS (0xA000FFF8UL)
    const uint32_t Test_Var __at(TEST_ADDRESS) = 0x12345678;

    below is the linker error.

    ltc E112: cannot locate 1 section(s):
    ltc I455: requirement: 0x4 bytes of ROM area in space mpe:tc0:linear
    ltc I456: section type: absolute restriction - at address 0xa000fff8
    ltc I457: .rodata.main.Test_Var (157) (0x4 bytes)
    make: *** [apl.elf] Error 1

    can you help me with linker script changes or give some reference to update. Thanks.

  4. #4
    Beginner Beginner ulrichk is on a distinguished road
    Join Date
    Sep 2017
    Posts
    5
    Points
    85
    Naveen,

    you are trying to locate the const value at an address which is occupied by the Boot Mode Header 2 (BMHD2) which starts at address 0xa000ffe0, having a size of 0x20 bytes. The Boot mode header ranges are by default reserved in the TASKING tools. You can also configure them in the Eclipse menu:

    Project -> Properties -> Memory

    in the tab named 'Boot Mode Headers'. Therefore the linker complains. When you invalidate the BMHD2 then it's possible to locate the const value in that range.

    If you do not use the Eclipse environment you can add the required macros in the LSL file yourself as described in chapter 7.9.13. Boot Mode Headers of the TriCore tools user guide.

    A linker LSL language appnote for the TASKING tools is available at:

    https://resources.tasking.com/taskin...ricore-toolset

    Success!

    BR,
    Ulrich

  5. #5
    Beginner Beginner Lnr is on a distinguished road
    Join Date
    Oct 2018
    Posts
    5
    Points
    50
    Thanks Ulrich,
    error is resolved.

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


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 Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves 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.