Go to Post what is FIRST?...It's about innovation, hard work, inspiration, teaching, learning, experiment, strategy, competition, meeting new people, being inspired, aiming high and changing paradigms...Really, FIRST is what you make of it. - jarowe [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 04-01-2005, 23:31
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Program error after controller reset

Quote:
Originally Posted by Mike Betts
2. Just what is the value of an uninitialized variable? Answer: It is undefined. If you are lucky, it will be 0x0000 or 0xFFFF. If you are unlucky, it can be anything.

My point here is that it is impossible to do what you suggest in an embedded controller.
Actually, it is possible. If you assign an initial value to a static variable, the C compiler will automatically generate code to put the correct value in that location in RAM. This code is hidden from the user and is called before control is passed to the C program's entry point (usually main()).

{edit} The code that does this is in _do_cinit() in ifi_startup.c {/edit}

{edit2} But I agree with you that if you modify the default code then it becomes your responsibility to ensure there's no bugs. It would be impossible for IFI to protect the end users against all of the various mistakes like this that are possible. {/edit}

Last edited by Dave Flowerday : 04-01-2005 at 23:44.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading Program to Controller.....problems Wbrown0389 Programming 5 27-02-2004 17:14
Dangerous.....Code problem?!? Argoth Programming 24 20-02-2004 14:57
Help On Coding 2K1 Controller GregTheGreat Programming 9 05-12-2003 18:35
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08
serious problem found - robot controller resets when jarred! KenWittlief Electrical 23 19-03-2003 13:30


All times are GMT -5. The time now is 13:06.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi