Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE
Hello TI,
I am reaching out regarding a GCC compatibility issue observed with the Flash API on the TMS320F28388D (CM core).
When executing the Flash API from RAM with GCC, several functions (such as CM_FLASHREGS_LOCK and CM_FLASHREGS_UNLOCK) access absolute addresses instead of using the base address provided via Fapi_initializeAPI().
For example, the CM_FLASHREGS_LOCK function dereferences address 0x00001FD8, which is not within the CM’s RAM or Flash register region:
movw r1,#0x1FD8
movt r1,#0x0
ldr r1,[r1]
ldr.w r1,[r1,#0x2FC]
mov.w r0,#0x5A5A5A5A
str.w r0,[r2,#0x2FC]
bx r14
This absolute addressing prevents the Flash API from being relocated to RAM and leads to bus faults during execution.
The issue appears to originate from internal symbols or linker-defined constants assumed by TI’s build environment.
Summary:
Device: TMS320F28388D
Core: CM
Compiler: GCC
Library: C2000Ware → libraries/flash_api/f2838x/cm/include/FlashAPI
Problem: Flash API uses fixed addresses (e.g. 0x1FD8) → breaks RAM execution under GCC
Goal: Enable Flash API execution from RAM using GCC toolchain
Could you please confirm:
Whether a GCC-compatible or relocatable version of the Flash API exists or is planned, and
If not, whether there is a recommended workaround or patch (e.g. redefining the address symbols or modifying the linker command file)?
This limitation currently blocks our flash programming support in Lauterbach tools, so any guidance or update would be greatly appreciated.
Best regards,
Dhia