Part Number: TMS320F280025C
Other Parts Discussed in Thread: C2000WARE
Tool/software:
Hello,
in a project, I want to link in the global variable definitions from f28002x_globalvariabledefs.c. I tried c2000Ware, version 5.02, 5.04, and 5.05, all with the very same result: The section UidRegsFile from f28002x_globalvariabledefs.c does not fit into the UID memory, as defined in f28002x_headers_nonbios.cmd:
"/Applications/ti/c2000/C2000Ware_5_05_00_00/device_support/f28002x/headers/cmd/f28002x_headers_nonBIOS.cmd", line 224: error #10099-D:
program will not fit into available memory, or the section contains a call
site that requires a trampoline that can't be generated for this section.
run placement with alignment/blocking fails for section "UidRegsFile" size
0x10 page 1. Available memory ranges:
UID size: 0x10 unused: 0x10 max hole: 0x10
`UidRegs` is defined like this:
#ifdef __cplusplus
#pragma DATA_SECTION("UidRegsFile")
#else
#pragma DATA_SECTION(UidRegs,"UidRegsFile");
#endif
volatile struct UID_REGS UidRegs;
In the linker script (f28002x_headers_nonbios.cmd), `UidRegsFile` is placed into `UID`:
UidRegsFile : > UID, type=NOINIT
and in the very same linker script, `UID` is defined as:
UID : origin = 0x000701F4, length = 0x00000010
According to the definition of `struct UID_REGS` (taken from f28002x_otp.h), the size of the structure is 0x10 (8 Uint32 members). That "should" fit into the UID memory, so I suspected that the problem is not the size of the data structure, but the alignment of the structure (and that the error message is a little bit misleading). I change the size of the UID memory to 0x20. Linking worked, and according to the map file, that UID_REGS were placed at 00070200 (not 00701F4)!
I toke "TMS320F28002x Real-Time Microcontrollers" reference manual (SPRUIN7C) and according to that, UidRegs should start at 0x0007_01E8 (not at 00701F4). Changing the linker scripts entry for the UID memory to that start address, would fix the linker error.
Is this a know issue? Is my analysis correct?
best regards
Torsten