#define PACKED, ALIGN and SECTION

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

#define PACKED, ALIGN and SECTION

Postby sebraa » Wed Jul 30, 2014 6:40 pm

Hi,

the Epiphany SDK defines PACKED, ALIGN and SECTION, which in my opinion is unfortunate. I am not sure these macros belong to the (mandatory; since e_dma.h uses it) part of the SDK, since they are just convenience macros around non-standard GCC features and as such should be controlled by the programmer only.

The problem turns up if one wants to share a file between host and target (in my case, a header file for data structures), because for the host, I must define the macro, while for the target, I must not define them. It wouldn't be so bad if they had been named E_PACKED and similar to avoid name clashes, but wrapping these (and these only) is just ugly in my opinion.

So my proposal would be to either remove them (and update the documentation to contain them as examples), or to prefix them with E_, like everything else in the library.

What do you think?

Best Regards,
Sebastian
sebraa
 
Posts: 495
Joined: Mon Jul 21, 2014 7:54 pm

Re: #define PACKED, ALIGN and SECTION

Postby jeremybennett » Thu Jul 31, 2014 7:06 pm

Hi Sebastian,

Interesting idea. I suggest you post it as an enhancement issue on the SDK github, so it can be tracked.

Thanks,


Jeremy
User avatar
jeremybennett
 
Posts: 61
Joined: Mon Dec 17, 2012 9:06 am


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 8 guests