AnsweredAssumed Answered

Problems compiling "__attribute__((at"

Question asked by LPCware Support on Mar 31, 2016

Some other toolchains provide a compiler extension __attribute__((at(addr))) which acts as a request that the variable that it is applied to is placed at location addr. For example:


static HostController _controller __attribute__((at(USB_RAM_BASE)));


The GNU toolchain as used by the LPCXpresso IDE provides no direct equivalent of this 'at' attribute.

Often the 'at' attribute is being used to simply place a buffer variable into a specific bank of RAM. This will often be possible just using the section macros provided in the header cr_section_macros.h.


For more information, please see the FAQ "Placing data at an address".