There are 20 messages in this thread.
You are currently looking at messages 0 to 10.
Hey, everyone, here I have some questions which is so strange, I want get some tip and help from all of you... Now I describe the problem: I use the MCU(R8C/Tiny) to implement some functions, now in my system there are some strange problem appeared at random. For example: I define an globe variable in my c files, and I can make sure that just only one place operate the variable, however the value of the variable is changed out of my control, and I do not know who change it, so anyone know the detailed info pls tell me, any other tips is so welcome~~
"Eric Tron" <f...@gmail.com> wrote in message news:gcna4t$iqf$1...@news.cn99.com... > Hey, everyone, here I have some questions which is so strange, I want > get some tip and help from all of you... > > Now I describe the problem: > I use the MCU(R8C/Tiny) to implement some functions, now in my system > there are some strange problem appeared at random. For example: I define > an globe variable in my c files, and I can make sure that just only one > place operate the variable, however the value of the variable is changed > out of my control, and I do not know who change it, so anyone know the > detailed info pls tell me, any other tips is so welcome~~ It was me, my actions, I deeply regret.
On Fri, 10 Oct 2008 18:18:26 +0800, Eric Tron <f...@gmail.com> wrote: >Hey, everyone, here I have some questions which is so strange, I want >get some tip and help from all of you... > >Now I describe the problem: >I use the MCU(R8C/Tiny) to implement some functions, now in my system >there are some strange problem appeared at random. For example: I define >an globe variable in my c files, and I can make sure that just only one >place operate the variable, however the value of the variable is changed > out of my control, and I do not know who change it, so anyone know the >detailed info pls tell me, any other tips is so welcome~~ The problem is on line 158 in your main C file. -- Rich Webb Norfolk, VA
Rich Webb 写道: > On Fri, 10 Oct 2008 18:18:26 +0800, Eric Tron <f...@gmail.com> > wrote: > >> Hey, everyone, here I have some questions which is so strange, I want >> get some tip and help from all of you... >> >> Now I describe the problem: >> I use the MCU(R8C/Tiny) to implement some functions, now in my system >> there are some strange problem appeared at random. For example: I define >> an globe variable in my c files, and I can make sure that just only one >> place operate the variable, however the value of the variable is changed >> out of my control, and I do not know who change it, so anyone know the >> detailed info pls tell me, any other tips is so welcome~~ > > The problem is on line 158 in your main C file. > I think that is not my wanted answer, anyone give some tips?
On 10 Oct, 13:40, Eric Tron <friendf...@gmail.com> wrote: > Rich Webb $B<LF;(B: > > > On Fri, 10 Oct 2008 18:18:26 +0800, Eric Tron <friendf...@gmail.com> > > wrote: > > >> Hey, everyone, here I have some questions which is so strange, I want > >> get some tip and help from all of you... > > >> Now I describe the problem: > >> I use the MCU(R8C/Tiny) to implement some functions, now in my system > >> there are some strange problem appeared at random. For example: I define > >> an globe variable in my c files, and I can make sure that just only one > >> place operate the variable, however the value of the variable is changed > >> out of my control, and I do not know who change it, so anyone know the > >> detailed info pls tell me, any other tips is so welcome~~ > > > The problem is on line 158 in your main C file. > > I think that is not my wanted answer, anyone give some tips? Ask a better question.
"Eric Tron" <f...@gmail.com> wrote in message news:gcnif1$tp3$1...@news.cn99.com... > Rich Webb ??: >> On Fri, 10 Oct 2008 18:18:26 +0800, Eric Tron <f...@gmail.com> >> wrote: >> >>> Hey, everyone, here I have some questions which is so strange, I want >>> get some tip and help from all of you... >>> >>> Now I describe the problem: >>> I use the MCU(R8C/Tiny) to implement some functions, now in my system >>> there are some strange problem appeared at random. For example: I define >>> an globe variable in my c files, and I can make sure that just only one >>> place operate the variable, however the value of the variable is changed >>> out of my control, and I do not know who change it, so anyone know the >>> detailed info pls tell me, any other tips is so welcome~~ >> >> The problem is on line 158 in your main C file. >> > I think that is not my wanted answer, anyone give some tips? Don't smoke, drink excessively or shag other chaps.
On Fri, 10 Oct 2008 20:40:22 +0800, Eric Tron <f...@gmail.com> wrote: >Rich Webb ??: >> On Fri, 10 Oct 2008 18:18:26 +0800, Eric Tron <f...@gmail.com> >> wrote: >> >>> Hey, everyone, here I have some questions which is so strange, I want >>> get some tip and help from all of you... >>> >>> Now I describe the problem: >>> I use the MCU(R8C/Tiny) to implement some functions, now in my system >>> there are some strange problem appeared at random. For example: I define >>> an globe variable in my c files, and I can make sure that just only one >>> place operate the variable, however the value of the variable is changed >>> out of my control, and I do not know who change it, so anyone know the >>> detailed info pls tell me, any other tips is so welcome~~ >> >> The problem is on line 158 in your main C file. >> >I think that is not my wanted answer, anyone give some tips? Your question includes far too little information for any "detailed" answers to be meaningful. Some (but not all) possible causes include uninitialized or misdirected pointers, misuse of casts, stack overflow, overrunning array bounds, and improper return from interrupts. -- Rich Webb Norfolk, VA
On 2008-10-10, Eric Tron <f...@gmail.com> wrote: > Rich Webb ??: >> On Fri, 10 Oct 2008 18:18:26 +0800, Eric Tron <f...@gmail.com> >> wrote: >> >>> Hey, everyone, here I have some questions which is so strange, I want >>> get some tip and help from all of you... >>> >>> Now I describe the problem: >>> I use the MCU(R8C/Tiny) to implement some functions, now in my system >>> there are some strange problem appeared at random. For example: I define >>> an globe variable in my c files, and I can make sure that just only one >>> place operate the variable, however the value of the variable is changed >>> out of my control, and I do not know who change it, so anyone know the >>> detailed info pls tell me, any other tips is so welcome~~ >> >> The problem is on line 158 in your main C file. >> > I think that is not my wanted answer, anyone give some tips? What Rich is trying to tell you is that you haven't included anywhere near enough information for any such specific advice to be given. A few possibilities: 1) Have you actually initialised the variable? Are you also sure that its value is maintained across any sleeps or suspends you use in your program? 2) Is there any reason that you can't declare the variable static with local or module scope if it is really only used in one location? 3) Have you tried setting a watchpoint in your debugger on the variable in question? I'm not sure what debug facilities you have on R8C - never worked on that architecture - but you can always try compiling the code for your desktop if watchpoints aren't supported natively. How easy this is depends on how modular your code is. 4) Alternatively, have you tried declaring variables with known contents immediately before and after the variable in question? Check the contents of those. If the variable is not referenced by name or a pointer is not taken it would be comparatively unusual for just that variable to be altered. Checking variables before and after would alert you to anything sweeping through memory, quite possibly a buffer overflow. -- Andrew Smallshaw a...@sdf.lonestar.org
"Eric Tron" <f...@gmail.com> wrote in message news:gcnif1$tp3$1...@news.cn99.com... > Rich Webb 写道: >> On Fri, 10 Oct 2008 18:18:26 +0800, Eric Tron <f...@gmail.com> >> wrote: >> >>> Hey, everyone, here I have some questions which is so strange, I want >>> get some tip and help from all of you... >>> >>> Now I describe the problem: >>> I use the MCU(R8C/Tiny) to implement some functions, now in my system >>> there are some strange problem appeared at random. For example: I define >>> an globe variable in my c files, and I can make sure that just only one >>> place operate the variable, however the value of the variable is changed >>> out of my control, and I do not know who change it, so anyone know the >>> detailed info pls tell me, any other tips is so welcome~~ >> >> The problem is on line 158 in your main C file. >> > I think that is not my wanted answer, anyone give some tips? Rouge pointer.
On Fri, 10 Oct 2008 08:09:18 -0700 "RumpelStiltSkin" <f...@abc.gov> wrote: > > "Eric Tron" <f...@gmail.com> wrote in message > news:gcnif1$tp3$1...@news.cn99.com... > > Rich Webb > >> On Fri, 10 Oct 2008 18:18:26 +0800, Eric Tron > >> <f...@gmail.com> wrote: > >> > >>> Hey, everyone, here I have some questions which is so strange, I > >>> want get some tip and help from all of you... > >>> > >>> Now I describe the problem: > >>> I use the MCU(R8C/Tiny) to implement some functions, now in my > >>> system there are some strange problem appeared at random. For > >>> example: I define an globe variable in my c files, and I can make > >>> sure that just only one place operate the variable, however the > >>> value of the variable is changed out of my control, and I do not > >>> know who change it, so anyone know the detailed info pls tell me, > >>> any other tips is so welcome~~ > >> > >> The problem is on line 158 in your main C file. > >> > > I think that is not my wanted answer, anyone give some tips? > > Rouge pointer. > Indeed. Everyone knows that the R8C architecture greatly prefers pointers verde. -- Rob Gaddi, Highland Technology Email address is currently out of order