Problem with strings

OP (Company: erdciit) #1478398
I developed a program to communicate with uart using arm9 (with 
reference as James P Lynch's example demo_at91sam7_blink_flash.). I send 
three string messages using uart and worked perfectly.. but when i 
increased the number of messages the last portions of main function is 
not working.. initial messages were displayed in the hyper terminal.. in 
the Insight debugger there is no error. is there any special 
considerations as the main function contains more strings and function 
calls??

Anoop
#1478913
I am not sure how you could expect an answer without making the code 
available. Your code is broken, and since there are any number of ways 
you might have implemented serial I/O how are we supposed to know what 
the problem could be?

How are you outputting the strings? If through printf() have you flushed 
the buffer?  Is your UART interface polled or interrupt driven?  If it 
is interrupt driven, how large is the output buffer?  What happens if 
the buffer is full? Does it discard data or block?

If all you have observed is that not all the data arrives, it may not be 
a serial output problem at all, the code may stopped working for some 
other reason.  For example is your stack large enough?

I could go on asking dumb questions, but actually rather than wild 
guesses how about some usable information from you?
#1479486
Anoop Babu wrote:
> Here is the code and the project file in progrmmers notepad...

629K download!?  Have you tried to narrow this down yourself using the 
usual debug techniques?  It is a big ask to get someone to wade through 
all that with no real idea what the problem is or its symptoms (you gave 
a very vague description).

You do have a debugger right?
OP (Company: erdciit) #1480773
yes i debugged it.. but insight shows no error..

is there any problem in declaring a function as void function_name(void) 
and int function_name(void) (..with return) in gcc? is there any 
difference in the code generated??

Reply

A question of your own? This thread is over 16 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.