473,503 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

prase error

1 New Member
sir/mam,
am diviya working in embedded system s, am trying to create a sample application program in c for my fpga processor,will u plz clarify the error for my project , i here by attach my c program with error,
my program
----------------------
# define a ( char *) 0x00001040
# define b ( char *) 0x00001050
# define sum (volatile char *) 0x00001060
# define ha (volatile char *) 0x00001070
void main()
{
while(1);
{
*sum = (*a )+ (*b);
*ha = (*a )& (*b);
}
}
-----------------------------------------------------------------------------------

ERROR
--------------/cygdrive/d/altera/71/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld:/cygdrive/d/altera/71/NIIHW_Class/Nios_CII_2C35_kit/blank_project_2_syslib/Debug/system_description/generated.x "PRASE ERROR"


REGARDS
DIVIYA.
Dec 31 '07 #1
5 1526
gpraghuram
1,275 Recognized Expert Top Contributor
sir/mam,
am diviya working in embedded system s, am trying to create a sample application program in c for my fpga processor,will u plz clarify the error for my project , i here by attach my c program with error,
my program
----------------------
# define a ( char *) 0x00001040
# define b ( char *) 0x00001050
# define sum (volatile char *) 0x00001060
# define ha (volatile char *) 0x00001070
void main()
{
while(1);
{
*sum = (*a )+ (*b);
*ha = (*a )& (*b);
}
}
-----------------------------------------------------------------------------------

ERROR
--------------/cygdrive/d/altera/71/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld:/cygdrive/d/altera/71/NIIHW_Class/Nios_CII_2C35_kit/blank_project_2_syslib/Debug/system_description/generated.x "PRASE ERROR"


REGARDS
DIVIYA.

Which compiler are u using?
Because i dont find any issues ith the code and only issue i say is the void main, change that to int main.
Please use Code tags while posting the code.
Thanks
Raghuram
Dec 31 '07 #2
Savage
1,764 Recognized Expert Top Contributor
Which compiler are u using?
Because i dont find any issues ith the code and only issue i say is the void main, change that to int main.
Please use Code tags while posting the code.
Thanks
Raghuram
and a ';' after while(1)

Savage
Dec 31 '07 #3
Andr3w
42 New Member
But still... a void main() is allowed if I am not mistaken, isn't it? But the semicolon after while is an error that would fail to compile the file, still the errors that he gets are a bit wierd >_>

As for the compiler he is using it's definatly not a microsoft one :p
Dec 31 '07 #4
Savage
1,764 Recognized Expert Top Contributor
But still... a void main() is allowed if I am not mistaken, isn't it? But the semicolon after while is an error that would fail to compile the file, still the errors that he gets are a bit wierd >_>

As for the compiler he is using it's definatly not a microsoft one :p
void main() is Microsoftism.
And file containing while(1); would compile and run,but not as expected I beleive :D

Savage
Dec 31 '07 #5
Andr3w
42 New Member
Well indeed (that's what I meant with the allowed thing..) but since it's not an ms compler then you should try an int main. On the other hand now that I look the code again, while needs an expression to be evaluated, and as we know that expression needs to be true if it's going to enter the loop. I am guessing that the compiler he used finds in the code an infinte loop (if is 1 is converted to TRUE) then the loop would go on forever. Anywayz I can't think of anything else atm hehe

But then again, these errors would give another error output and (certainly) not a prase error...

Now off to celebrate new years' eve ;)
Dec 31 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4359
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
5
16217
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
1
8395
by: Aravind | last post by:
we have two files: 1. rc4.c (defines one function "create_pin()") 2. MyImpl.c(calling the function "create_pin()"),This implements JNI method. 1.When I am trying to create .dll file with one...
1
6382
by: yanwan | last post by:
I met this problem in executing a c++ project in visual studio. Does anyone have suggestions to resolve "error lnk 2001"? --------------------Configuration: reconstruction - Win32...
13
6572
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
4978
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
0
924
by: =?Utf-8?B?UHJhamVzaA==?= | last post by:
Hello can some one please help me, its been a week i am having this problem. I have trying to write web application(not website) in vs2005.The application work fine in vs2005 ie while running by...
2
19396
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
2897
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
7201
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3166
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.