Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
Compile Error with Custom putchar
Jump...
Cancel
Locked
Locked
Replies
3 replies
Subscribers
119 subscribers
Views
5195 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
Compile Error with Custom putchar
Nick Purdue
over 12 years ago
Note: This was originally posted on 5th January 2012 at
http://forums.arm.com
Hello,
I am new to ARM and uVision and have my first problem.
The firmware i am trying to compile used to work with old compiler but fails with the new compiller ARMCC V3.0.0.947 using uVision 3.34
It does not like my own putchar, i get following errors...
comms.h(74): error: #79: expected a type specifier ........this is my prototype
comms.c(3866): error: #79: expected a type specifier
comms.c(3866): error: #141-D: unnamed prototyped parameters not allowed when body is present
The prototype in H file is....
int putchar(int Inch); This is at line 74 of include file
the first line if the function is..
int putchar(int Inch) This is at line 3886 of source file
{
}
Please tell me what is going wrong
Nick
Scott Douglass
over 12 years ago
Note: This was originally posted on 5th January 2012 at
http://forums.arm.com
It might be that there's some '#define Inch ...' or -DInch=... that's interfering.
Cancel
Vote up
0
Vote down
Cancel
Nick Purdue
over 12 years ago
Note: This was originally posted on 5th January 2012 at
http://forums.arm.com
It might be that there's some '#define Inch ...' or -DInch=... that's interfering.
No that not it, it seems to be to do with i am re-defining putchar and that its already in "stdio.h" but i thought you could do that, i have also changed the Inch to just ch to match the putchar in "stdio.h"
Cancel
Vote up
0
Vote down
Cancel
Scott Douglass
over 12 years ago
Note: This was originally posted on 5th January 2012 at
http://forums.arm.com
Oh, yes. It's puchar itself that's the #define -- but I should have looked at the larger context before answering.
If you want to intercept stdio you want to use the "retargeting" interface. For example
http://www.keil.com/...argetcortex.htm
Cancel
Vote up
0
Vote down
Cancel