Mar 25, 2019
07:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 25, 2019
07:25 PM
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!
Able to assign a fixed address in DSPR like below.
#define TEST_ADDRESS (0x70000000UL)
uint32_t Test_Var __at(TEST_ADDRESS);
Thanks!
Solved! Go to Solution.
1 Solution
Mar 29, 2019
02:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 29, 2019
02:32 AM
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/tasking-whitepapers/linker-script-language-lsl-tips-tricks-for-tasking...
Success!
BR,
Ulrich
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/tasking-whitepapers/linker-script-language-lsl-tips-tricks-for-tasking...
Success!
BR,
Ulrich
5 Replies
Mar 26, 2019
11:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 26, 2019
11:51 PM
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
#define TEST_ADDRESS (0xA0000000UL)
const uint32_t Test_Var __at(TEST_ADDRESS) = 0x12345678;
Best regards,
Ulrich
Mar 28, 2019
07:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 28, 2019
07:12 PM
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.
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.
Mar 29, 2019
02:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 29, 2019
02:32 AM
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/tasking-whitepapers/linker-script-language-lsl-tips-tricks-for-tasking...
Success!
BR,
Ulrich
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/tasking-whitepapers/linker-script-language-lsl-tips-tricks-for-tasking...
Success!
BR,
Ulrich
Mar 29, 2019
09:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 29, 2019
09:47 AM
Thanks Ulrich,
error is resolved.
error is resolved.
Dec 23, 2019
02:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 23, 2019
02:07 AM
hello,
I need to resolve this error in tasking compiler !
I need to resolve this error in tasking compiler !