[EXT_EP-11796] Add support for pointers to byte peripheral members of a structure Created: 18/Jun/24  Updated: 20/Jun/24  Resolved: 20/Jun/24

Status: Declined
Project: Embedded Software & Tools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Not Prioritized
Reporter: TI User Assignee: TI User
Resolution: Won't Implement Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Product: Code Generation Tools
Internal ID: CODEGEN-12564
Found In Release: C2000_22.6.1.LTS
Affected Platform/Device: default
Decline Reason: This capability is not supported by C28 hw/compiler.

 Description   

This code is simplified view of how structures are created in C2000Ware header files for some HW registers.

typedef unsigned long bp_32 __attribute__((byte_peripheral));

struct tag_name
{
   bp_32 reg1;
   bp_32 reg2;
};

extern volatile struct tag_name HWRegs;

The customer requests the ability to create a pointer to a member of such a structure.

void fxn()
{
   volatile bp_32 *ptr = &HWRegs.reg2;
   /* ignore diagnostic about ptr never referenced */
}

Currently, this code gets these diagnostics ...

% cl2000 file.c
"file.c", line 13: warning: variable "ptr" was declared but never referenced
error #99923: "file.c", line 13: Illegal use of intrinsic: __byte_peripheral_32

>> Compilation failure

Generated at Sat Dec 13 11:34:43 CST 2025 using Jira 10.3.7#10030007-sha1:a563685562f94d165eb4e158cfb2a142338d8c54.