Re: Inconsistent d16/d20 attributes

Peter Bigot <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.user
Message-ID <CAPOJ94PUfgMp44Li_TnEGqThtO+k3yOxB+6DoRLPta8Yb3QxNg@mail.gmail.com>
I'm unable to duplicate that with the following program using msp430-gcc
-Os -mmcu=msp430fr5969 -c x.c and similar variants.

The attributes are documented at
https://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Gcc47:20-Bit_Designbut
it should not be necessary for you to be aware of them for this sort
of
code.

Peter

#include <msp430.h>
#include <stdint.h>

extern uint8_t v;

int doit ()
{
  P4OUT |= v;
  return 1;
}



On Fri, Sep 6, 2013 at 12:14 PM, Andrew Wygle <[email protected]> wrote:

> Hello all,
>
> I'm new to this list, I've been using mspgcc to develop for the new
> MSP430FR5969 (the 64k FRAM MSP), and I recently ran into an error when
> trying to assign to port 4 of that device.
>
> The line of code is:
> P4OUT |= var;
> where var is an 8-bit unsigned integer less than 8 in this particular case.
>
> The reported error is:
> error: merged types have inconsistent d16/d20 attributes.
>
> This would seem to indicate some kind of data type width error. This is
> born out by the fact that if I change var to be an unsigned 16-bit integer,
> the assignment works just fine. However, P4 should be an 8-bit (byte) wide
> port. I'd never seen the d16/d20 notation before, and I wasn't able to find
> any information on it through Google, so I'd like to hopefully understand
> what I'm doing wrong and why I'm seeing this error.
>
> Thanks for the assistance.
>
> ~Andrew Wygle
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk

_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.