Community
Participate
Working Groups
Currently gnu targets are built with ITarget.alignDirectiveSupported as the default of "false". This requires runtime fix ups of statically allocated buffers. For example, SYS/BIOS's HeapBuf and Task use Memory.staticPlace, which calls obj.$$alloc(). Currently obj.$$alloc() only supports TI alignment, so alignment fix-up at runtime is needed for gnu. Request that obj.$$alloc() be enhanced to support alignment for gnu too. There is no pragma comparable to TI's for this, but "attribute" can be used. From the description of the "aligned" attribute in the gcc docs: aligned (alignment) This attribute specifies a minimum alignment for the variable or structure field, measured in bytes. For example, the declaration: int x __attribute__ ((aligned (16))) = 0; causes the compiler to allocate the global variable x on a 16-byte boundary.
in xdc/services/intern/gen/Config.java we generate GNU attributes for section placement but not alignment. It looks like we can simply add alignment in the same way.
"fixed" in xdc-y09 by adding GCC alignment directives when alignment is non-zero and GCC version is > 4. See xdc/services/internal/gen/Config.java
Verified new attribute alignment directives generated with new gnu builds. Looked at xdc/services/intern/gen/Config.java.
shipped in XDCtools 3.23 (http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_23_00_32)