Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » MSPGCC
  • » [Mspgcc-users] Mspgcc 3.2.3 is crashing [RSS Feed]

#1 June 19, 2008 07:20:53

Dima K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] Mspgcc 3.2.3 is crashing


Hi, all.

I'm seeing an "Internal compiler error" trying to build some TinyOS code with a
CVS build of Mspgcc, latest as of 6/17/2008. I'm using gcc 3.2.3 (mspgcc
3.3). Here's the session:

$ /usr/msp430/lib/gcc-lib/msp430/3.2.3/cc1 code.c -mmcu=msp430x149
code.c: In function `PropagationMsgPoolP___0___Vector___get':
code.c:6863: Internal compiler error in gen_lowpart, at emit-rtl.c:1197
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$

This doesn't appear to be a new issue, since I've seen mentions of it in the
lists. GCC seems to have fixed this back in GCC 3.3, but since the stable branch
of Mspgcc hasn't progressed to 3.3, this is not useful. Using the Mspgcc port
for gcc 3.3.6 lets me build the code, but produces code that doesn't work due to
a different bug that surfaced in 3.3.

A preprocessed file that triggers the bug can be found athttp://www.cds.caltech.edu/~dkogan/code.cNote that this is generated by TinyOS, and is thus very long and unreadable.

I also looked at the offending code. The line that GCC is complaining about is
the last line in this snippet:

typedef struct { char data; } __attribute__((packed)) nx_uint8_t;
typedef struct message_t {
nx_uint8_t header;
nx_uint8_t data;
nx_uint8_t footer;
nx_uint8_t metadata;
} __attribute__((packed)) message_t;
message_t PropagationMsgPoolP___0___data;
return &PropagationMsgPoolP___0___data;


This may not actually be the issue, though, since moving the code around changes
the reported error. Gcc actually generates a segfault at times. Does anybody
have any ideas? Currently I don't have a useable compiler. :(

Dima

Offline

#2 June 19, 2008 07:32:46

Hardy G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] Mspgcc 3.2.3 is crashing


Dima Kogan wrote:
:$ /usr/msp430/lib/gcc-lib/msp430/3.2.3/cc1 code.c -mmcu=msp430x149
code.c: In function `PropagationMsgPoolP___0___Vector___get':
code.c:6863: Internal compiler error in gen_lowpart, at emit-rtl.c:1197
Please submit a full bug report,
with preprocessed source if appropriate.:

Have you tried disabling HW multiplication via -mdisable-hwmul?

Hardy

Offline

#3 June 19, 2008 07:37:30

Hardy G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] Mspgcc 3.2.3 is crashing


Dima Kogan wrote:
:http://www.cds.caltech.edu/~dkogan/code.cMy first reply was a little bit too short shot... ;-)I've downloaded your code and tried to compile it with no problem(windows/cygwin, msggcc self-built):ha...@stchps376 /tmp/msp
$ msp430-gcc -Wall -mmcu=msp430x149 -o code.o code.ccode.c:2598: warning: inline function`XE1205SendReceiveP___signalPacketReceived___runTask' given attributenoinlinecode.c:6845: warning: inline function`XE1205SendReceiveP___signalPacketReceived___runTask' given attributenoinlineha...@stchps376 /tmp/msp
$ ls -ls
total 396
308 -rwxr-xr-x 1 hardy Kein 314941 Jun 19 08:33 code.c*
88 -rwxr-xr-x 1 hardy Kein 87742 Jun 19 08:36 code.o*

So what are your actual compiler options?

Hardy

Offline

#4 June 19, 2008 07:48:16

Dima K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] Mspgcc 3.2.3 is crashing


Thanks a lot for replying.

First off, disabling the hardware multiplier does stop the crashing! Do
you know why that is? Also, don't I need the hardware multiplier? Does
disabling it force multiplication to be done via software?

Second, I'm very intrigued that the build works for you. My compile
options are exactly as I said, with very little of interest. If I try
to build again, with your exact command, even, I get the crash:

$ msp430-gcc -Wall -mmcu=msp430x149 -o code.o code.c
code.c:2598: warning: inline function
`XE1205SendReceiveP___signalPacketReceived___runTask' given attribute noinline
code.c:6845: warning: inline function
`XE1205SendReceiveP___signalPacketReceived___runTask' given attribute noinline
code.c: In function `PropagationMsgPoolP___0___Vector___get':
code.c:6863: Internal compiler error in gen_lowpart, at emit-rtl.c:1197
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$

I build my mspgcc today, with the latest code from cvs. I'm using the newest
binutils with the binutils-ld patch from mspgcc. Can you tell me how/when you
built your compiler? Thank you very much.

Dima

On Thu, 19 Jun 2008 08:37:11 +0200
Hardy Griech <nt***@*ardys.de> wrote:

> Dima Kogan wrote:
> :
> >http://www.cds.caltech.edu/~dkogan/code.c>
> My first reply was a little bit too short shot... ;-)
>
> I've downloaded your code and tried to compile it with no problem
> (windows/cygwin, msggcc self-built):
>
> ha...@stchps376 /tmp/msp
> $ msp430-gcc -Wall -mmcu=msp430x149 -o code.o code.c
> code.c:2598: warning: inline function
> `XE1205SendReceiveP___signalPacketReceived___runTask' given attribute
> noinline
> code.c:6845: warning: inline function
> `XE1205SendReceiveP___signalPacketReceived___runTask' given attribute
> noinline
>
> ha...@stchps376 /tmp/msp
> $ ls -ls
> total 396
> 308 -rwxr-xr-x 1 hardy Kein 314941 Jun 19 08:33 code.c*
> 88 -rwxr-xr-x 1 hardy Kein 87742 Jun 19 08:36 code.o*
>
> So what are your actual compiler options?
>
> Hardy
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
>http://sourceforge.net/services/buy/index.php> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Offline

#5 June 19, 2008 08:37:18

Dima K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] Mspgcc 3.2.3 is crashing


Hi.

I'd like to have access to the hardware multiplier, so it would be
great if I could get copies of your patches. They don't seem to be the
same ones as what is checked into cvs. Can you post them here so that
everybody gets a copy?

Thank you very much.

On Thu, 19 Jun 2008 09:14:47 +0200
reinhard.gri***@*olutions.endress.com wrote:

> Hi Dima,
>
> mspgcc-users-boun***@*ists.sourceforge.net wrote on 19.06.2008
> 08:50:21:
>
> :
> > First off, disabling the hardware multiplier does stop the
> > crashing! Do you know why that is? Also, don't I need the hardware
> > multiplier? Does
> :
>
> The implementation of HW multiplication is one of my favour suspects
> if there are compilation problems with mspgcc. Unfortunately I have
> not enough time to dig deeper into this problem.
>
> :
> > disabling it force multiplication to be done via software?
> :
>
> Disabling HW multiplication of course leads to SW emulation of the
> multiplication. If you are doing a lot of muliplications and/or
> access to arrays/structures there will be a loss of performance.
>
> > Second, I'm very intrigued that the build works for you. My compile
> > options are exactly as I said, with very little of interest. If I
> > try to build again, with your exact command, even, I get the crash:
>
> I've built mine in February 2008. Additionally I've applied some
> patches, namely 01_disable-ffunction-section_warning.patch,
> 02_fdata-sections.patch, 03_FUNCTION-warning-disable.patch and
> 04_gcc-3.2.3-msp430x24x-msp430x26x.patch.
> My build script is based on the one from Grant Edwards. But I really
> don't know, which of my patches made the mspgcc compile your code...
>
> Let me hear, if you are interested in my scripts/patch files.
>
> Hardy

Offline

#6 Oct. 7, 2017 00:41:09

Danieltic
Registered: 2017-10-05
Posts: 4
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] Mspgcc 3.2.3 is crashing

This post is being moderated

Offline

  • Root
  • » MSPGCC
  • » [Mspgcc-users] Mspgcc 3.2.3 is crashing [RSS Feed]

Board footer

Moderator control

Enjoy the 19th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support