Reply by Paul Curtis August 31, 20112011-08-31
> void myfunction ( unsigned char *C );
>
> Didn't like C
>
> Changed to
>
> void myfunction ( unsigned char *CStr );
>
> No problems after that. Not seen that one before

That's because TI's standard headers define the pre-processor symbol 'C' as
"the carry flag in the status register". Same with N, Z, V and other flags.

This is bad on so many levels, I can't tell you. Polluting user namespace
with these is really, really bad.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
SolderCore running Defender... http://www.vimeo.com/25709426

Beginning Microcontrollers with the MSP430

Reply by Glenn M August 31, 20112011-08-31
If your interested.

void myfunction ( unsigned char *C );

Didn't like C

Changed to

void myfunction ( unsigned char *CStr );

No problems after that. Not seen that one before

Glenn

From: m... [mailto:m...] On Behalf Of
Hugo Brunert
Sent: Wednesday, 31 August 2011 9:07 PM
To: m...
Subject: RE: [msp430] IAR error message

What was the reserved keyword?

-----Original Message-----
From: m...
[mailto:m... ] On Behalf
Of Glenn McCorquodale
Sent: Tuesday, August 30, 2011 5:38 PM
To: m...
Subject: Re: [msp430] IAR error message

Thanks Anders,

I left out the body mostly because the program is quite large and didn't

really contain anything that I could see a problem with. The problem
only
occurred if I changed a function to one that contained a parameter.
Anyway,
last night after a few hours I discovered the problem. It seems as
though I
declared a parameter variable within the function that was also a
reserved
keyword that was not known to me. My boo boo. Thanks for your response
and
advice.

Glenn

----- Original Message -----
From: "Anders Lindgren" >
To: >
Sent: Tuesday, August 30, 2011 5:36 PM
Subject: Re: [msp430] IAR error message

> On 2011-08-30 06:03, Glenn McCorquodale wrote:
>> I've just encountered a problem that I'm having a bit of trouble
trying
>> to locate what may be wrong. Hope some good fellow out there can
point
>> me the right way. Not seen this before.
>> I'm using IAR Ver 5.30
>
> Hi,
>
> I would like to help you track down the problem. However, the code
> sketches that you provide are not enough for me to pinpoint the
problem.
>
> A rule of thumb, when reporting a problem, is to provide a file that
> actually can be compiled (i.e. not a sketch with things like "program
> start"). Also, the program should be as short as possible -- most
> problems can be reduced to a handful of lines.
>
> -- Anders Lindgren, IAR Systems
> --
> Disclaimer: Opinions expressed in this posting are strictly my own and
> not necessarily those of my employer.
>
>
>
>
Reply by Hugo Brunert August 31, 20112011-08-31
What was the reserved keyword?

-----Original Message-----
From: m... [mailto:m...] On Behalf
Of Glenn McCorquodale
Sent: Tuesday, August 30, 2011 5:38 PM
To: m...
Subject: Re: [msp430] IAR error message

Thanks Anders,

I left out the body mostly because the program is quite large and didn't

really contain anything that I could see a problem with. The problem
only
occurred if I changed a function to one that contained a parameter.
Anyway,
last night after a few hours I discovered the problem. It seems as
though I
declared a parameter variable within the function that was also a
reserved
keyword that was not known to me. My boo boo. Thanks for your response
and
advice.

Glenn

----- Original Message -----
From: "Anders Lindgren"
To:
Sent: Tuesday, August 30, 2011 5:36 PM
Subject: Re: [msp430] IAR error message
> On 2011-08-30 06:03, Glenn McCorquodale wrote:
>> I've just encountered a problem that I'm having a bit of trouble
trying
>> to locate what may be wrong. Hope some good fellow out there can
point
>> me the right way. Not seen this before.
>> I'm using IAR Ver 5.30
>
> Hi,
>
> I would like to help you track down the problem. However, the code
> sketches that you provide are not enough for me to pinpoint the
problem.
>
> A rule of thumb, when reporting a problem, is to provide a file that
> actually can be compiled (i.e. not a sketch with things like "program
> start"). Also, the program should be as short as possible -- most
> problems can be reduced to a handful of lines.
>
> -- Anders Lindgren, IAR Systems
> --
> Disclaimer: Opinions expressed in this posting are strictly my own and
> not necessarily those of my employer.
>
>
Reply by Glenn McCorquodale August 30, 20112011-08-30
Thanks Anders,

I left out the body mostly because the program is quite large and didn't
really contain anything that I could see a problem with. The problem only
occurred if I changed a function to one that contained a parameter. Anyway,
last night after a few hours I discovered the problem. It seems as though I
declared a parameter variable within the function that was also a reserved
keyword that was not known to me. My boo boo. Thanks for your response and
advice.

Glenn

----- Original Message -----
From: "Anders Lindgren"
To:
Sent: Tuesday, August 30, 2011 5:36 PM
Subject: Re: [msp430] IAR error message
> On 2011-08-30 06:03, Glenn McCorquodale wrote:
>> I've just encountered a problem that I'm having a bit of trouble trying
>> to locate what may be wrong. Hope some good fellow out there can point
>> me the right way. Not seen this before.
>> I'm using IAR Ver 5.30
>
> Hi,
>
> I would like to help you track down the problem. However, the code
> sketches that you provide are not enough for me to pinpoint the problem.
>
> A rule of thumb, when reporting a problem, is to provide a file that
> actually can be compiled (i.e. not a sketch with things like "program
> start"). Also, the program should be as short as possible -- most
> problems can be reduced to a handful of lines.
>
> -- Anders Lindgren, IAR Systems
> --
> Disclaimer: Opinions expressed in this posting are strictly my own and
> not necessarily those of my employer.
>
>
Reply by sdwh...@comcast.net August 30, 20112011-08-30
Glenn, are you really missing the quotes or angle brackets around the following:

#include io430.h
Seems like this could certainly mess some things up.  I believe that this line should be either

#include "io430.h"

or

#include
depending on whether io430.h is a local header file or a compiler-provided header file.

Hope this helps,

Scott

----- Original Message -----
From: "Glenn McCorquodale"
To: m...
Sent: Tuesday, August 30, 2011 12:03:01 AM
Subject: [msp430] IAR error message

 

Hi Everyone,

I've just encountered a problem that I'm having a bit of trouble trying to locate what may be wrong. Hope some good fellow out there can point me the right way. Not seen this before.
I'm using IAR Ver 5.30

It seems that whenever I declare a prototype to a function with a paramater I get an error message:
main.c
error [Pe018]: expected a ")"

This works OK

#include io430.h

#define statements

void myfunction ( void );

void main ( void )
{
program start

myfunction ();

rest of program

}

void myfunction ( void )
{

do something;

}

If I do the following instead, I get the above error. All I've done is change the function to one that has a parameter.

#include io430.h

#define statements

int myfunction ( int xyz );

void main ( void )
{
int abc;
int def;
program start

def = myfunction ( abc );

rest of program

}

int myfunction ( int xyz )
{

do something;
return ( xyz );
}

I also get an error at the function line saying:
Error [Pe141]: Unnamed prototyped parameters not allowed when body is present

But I suspect that this is caused by the first error.

Sure would appreciate any ideas.

Regards,

Glenn





Reply by Anders Lindgren August 30, 20112011-08-30
On 2011-08-30 06:03, Glenn McCorquodale wrote:
> I've just encountered a problem that I'm having a bit of trouble trying
> to locate what may be wrong. Hope some good fellow out there can point
> me the right way. Not seen this before.
> I'm using IAR Ver 5.30

Hi,

I would like to help you track down the problem. However, the code
sketches that you provide are not enough for me to pinpoint the problem.

A rule of thumb, when reporting a problem, is to provide a file that
actually can be compiled (i.e. not a sketch with things like "program
start"). Also, the program should be as short as possible -- most
problems can be reduced to a handful of lines.

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.

Reply by Glenn McCorquodale August 30, 20112011-08-30
Hi Everyone,

I've just encountered a problem that I'm having a bit of trouble trying to locate what may be wrong. Hope some good fellow out there can point me the right way. Not seen this before.
I'm using IAR Ver 5.30

It seems that whenever I declare a prototype to a function with a paramater I get an error message:
main.c
error [Pe018]: expected a ")"

This works OK

#include io430.h

#define statements

void myfunction ( void );

void main ( void )
{
program start

myfunction ();

rest of program
}

void myfunction ( void )
{

do something;

}

If I do the following instead, I get the above error. All I've done is change the function to one that has a parameter.

#include io430.h

#define statements

int myfunction ( int xyz );

void main ( void )
{
int abc;
int def;
program start

def = myfunction ( abc );

rest of program
}

int myfunction ( int xyz )
{

do something;
return ( xyz );
}

I also get an error at the function line saying:
Error [Pe141]: Unnamed prototyped parameters not allowed when body is present

But I suspect that this is caused by the first error.

Sure would appreciate any ideas.

Regards,

Glenn