[C.CC USERS] First steps

Matt Jadud jadudm at gmail.com
Fri Nov 19 14:19:22 GMT 2010


On Fri, Nov 19, 2010 at 08:36, cljacobsen at gmail.com
<cljacobsen at gmail.com> wrote:
> We looked into seeing if we were able to check if the firmware is in
> place when uploading a user program and reporting an error if it is
> not. However we did not see a neat way of doing that at the time.
> Perhaps we should look into it again.

I've been saying "I'll fix documentation" all semester. I find it hard
to find the large blocks of time I need for writing and/or hacking
during the term; I'll see what I can do about that looking towards
next term.

That said, there are many problems with detecting firmware existence
-- it is the same problem as detecting board type. The Arduino
development community is trying to figure this out as well, and they
probably can't. Not because it is "impossible," but because it is
*dangerous*. Specifically, imagine the following situation:

1. You plug in an Arduino, and put it on COM5. (Or, it shows up on
COM5.) We cache it.

2. You unplug it, and plug in your UPS. It shows up on COM5.

3. You plug in your Arduino, and it shows up on COM6.

4. We probe the cached COM port (COM5), and do something Very Bad to your UPS.

5. We're glad we're on a different continent than you.

Now, once you hit compile and send to a COM port, we could claim it is
"your" problem. The solution will likely involve either 1.
modifications to our firmware, or 2. a small custom app or script that
interacts with avrdude. In the latter case, I assume we'd look for the
existence of the TVM's version signature in the flash of the Arduino.

So, this isn't to say "it can't be done," but that any solution is (I
think) slightly tricky. However, whenever I say things like that, Adam
usually commits a 3-line patch that solves the problem I've just
claimed was tricky...

Cheers,
Matt




More information about the users mailing list