Some background: Back in the day (early 1990s when I first started
using gcc), gcc strongly rejected the use of pragmas, for various
reasons you can find through google.  Although newer standards
eliminate some of the reasons why they were considered a bad design,
that history explains why gcc uses variable and function attributes
for so many things.

The GCC maintainers evidently relaxed their objections enough to add
something under REGISTER_TARGET_PRAGMAs, but I haven't looked into the
details of that approach, or whether it's still acceptable upstream,
or even if anybody uses it.  Any enhancement to gcc that recognizes
pragmas will need extra care to make sure it doesn't grossly diverge
from the use of pragmas in other back-ends or fundamental gcc
philosophy.

All of which is why such an obvious feature doesn't exist in mspgcc at
this time, and why I didn't even bother creating a ticket to track it
until about a month ago when the inability to run examples unmodified
started irritating me enough to overcome my adherence to the gcc party
line.

Peter

On Sun, Feb 12, 2012 at 12:24 PM, Reginald Beardsley
<pulask...@yahoo.com> wrote:
> Peter,
>
> The interrupt handling was what prompted my post.  I'll go peruse the pragma 
> handling in gcc and setup a workspace that tracks development.  However, I 
> think I'll sit down w/ the C99 standard and review the pragma rules first.
>
> I very much agree that the #include should be device neutral.  But that's a 
> pretty minor glitch.
>
> Have Fun!
> Reg
>
>
> --- On Sun, 2/12/12, Peter Bigot <big...@acm.org> wrote:
>
>> From: Peter Bigot <big...@acm.org>
>> Subject: Re: [Mspgcc-users] mspgcc support from TI
>> To: "Reginald Beardsley" <pulask...@yahoo.com>
>> Date: Sunday, February 12, 2012, 11:35 AM
>> A goal is to have source
>> compatibility among the tools, where possible.
>>
>> For the most part, that should already be true.  A
>> major exception is
>> interrupt declaration.  If you want to experiment, look
>> at
>> https://sourceforge.net/tracker/?func=detail&aid=3474171&group_id=42303&atid=432701
>> and the REGISTER_TARGET_PRAGMAS support in gcc.
>>
>> There's also the __even_in_range intrinsic that needs to be
>> supported,
>> see 
>> https://sourceforge.net/tracker/?func=detail&aid=3474172&group_id=42303&atid=432701
>>
>> To ease integration, use a development workspace as
>> described at
>> https://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Devel:git#Creating_a_Workspace
>>
>> I don't think either of these can be addressed without
>> learning GCC
>> internals, though, so your awk scripts might be a better
>> solution for
>> you.  There's also an isr_compat.h header left over in
>> msp430-libc
>> that's intended to work with all platforms.
>>
>> You might also have problems where examples include
>> MCU-specific
>> headers.  I consider that a fault in the examples, as I
>> believe the
>> standard practice for all compilers should be to include
>> <msp430.h>,
>> which will then include the correct header based on the
>> toolchain MCU
>> configuration.
>>
>> Peter
>>
>> On Sun, Feb 12, 2012 at 11:24 AM, Reginald Beardsley
>> <pulask...@yahoo.com>
>> wrote:
>> > Many thanks to TI and all concerned for my nice $4.30
>> toy.  I love the blinky lights :-)
>> >
>> > I've started working my way through the examples in
>> slac011.zip (which by the way is hard to find at ti.com
>> because of the version letter.  You find a pdf describing
>> the contents, but not the zip file).
>> >
>> > Naturally the code does not work as-is w/ gcc.
>> >
>> > Do we want CCS & IAR compatible code to work w/
>> gcc?
>> >
>> > If so, how do we want to go about it?  I'll be glad to
>> do a bunch of the work if someone will point me in the right
>> direction and keep me in line.
>> >
>> > The alternative is I will write awk scripts to perform
>> the preprocessing needed to transform the code into
>> something gcc accepts.  I'm very comfortable doing that,
>> but there might be a better alternative.  I don't know the
>> gcc internals well enough to say.  However, I'm willing to
>> learn more if I don't have to read the entire source tree.
>> >
>> > Have Fun!
>> > Reg
>> >
>> >
>>

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to