Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx

Ads

Discussion Groups

Discussion Groups | Comp.Arch.Embedded | A stranger problem

There are 20 messages in this thread.

You are currently looking at messages 0 to 10.

A stranger problem - Eric Tron - 06:18 10-10-08

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~~



Re: A stranger problem - The Doctor - 07:09 10-10-08


"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. 



Re: A stranger problem - Rich Webb - 07:41 10-10-08

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

Re: A stranger problem - Eric Tron - 08:40 10-10-08

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?

Re: A stranger problem - s0lstice - 08:48 10-10-08

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.

Re: A strange problem - Mabel - 09:08 10-10-08


"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. 



Re: A stranger problem - Rich Webb - 09:43 10-10-08

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

Re: A stranger problem - Andrew Smallshaw - 10:14 10-10-08

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

Re: A stranger problem - RumpelStiltSkin - 11:09 10-10-08

"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.



Re: A stranger problem - Rob Gaddi - 11:30 10-10-08

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

| 1 | 2 | next