EmbDev.net

Forum: ARM programming with GCC/GNU tools Problem with strings


Author: Anoop Babu (Company: erdciit) (anoop)
Posted on:

Rate this post
0 useful
not useful
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

Author: Clifford Slocombe (clifford)
Posted on:

Rate this post
0 useful
not useful
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?

Author: Anoop Babu (Company: erdciit) (anoop)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Here is the code and the project file in progrmmers notepad...

Author: Clifford Slocombe (clifford)
Posted on:

Rate this post
0 useful
not useful
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?

Author: Anoop Babu (Company: erdciit) (anoop)
Posted on:

Rate this post
0 useful
not useful
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

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.