Dangerous Prototypes

Other projects => Past projects => Web platform => Topic started by: llauren on June 18, 2011, 01:02:40 pm

Title: A checksum error is a bad start
Post by: llauren on June 18, 2011, 01:02:40 pm
Hi,

Here's the scene. I'm a noob in the embedded space. I got the new and shiny web platform in the mail. And i think i've already broken it. At least i never properly got it to run. Please tell me if i should stop toying now or if there's still some salvation.

In true noob hacker style, i've probably already done a few things i shouldn't have. Let's see if i can remember them all.

I'm running Windows 7. I installed subversion under Cygwin since i didn't care to install yet another Windows binary on my (ahem) work lappie.

I powered up the Web platform over USB since i was too lazy to get the power wart (and it was, after all, powering my #twatch :). I plugged it on the 'net and got a DHCP reservation. I managed to hit the page to upload an image to the board over http. That's the last bit of success i've had.

Misreading the instructions, i downloaded the ds30 loader app straight from the developer's page. It looked a bit different from the one on the Dangerous wiki, but i didn't worry. I selected the right chip and baud rate (i think...) and the MCstackDemodp-wp-stackdemo.v0b.hex file. Checked the Write box, pressed the button on the board and tried to upload the image.

I couldn't get it to upload. At this time i've forgotten the exact error messages, but i think this is where things really started to go downhill.

I then actually read the instructions, uninstalled the ds30 loader app, ran the ds30 loader app installer i got from subversion, set the right chip, did the previous magic, tried uploading and got the following from the loader

Code: [Select]
Initiating download...
      Searching for bl .
      Found dsPIC33FJ128GP204 fw ver. 1.0.2
      Waiting for bootloader to be ready...ok
      Parsing hex-file...
            Validating hex-file...ok
            Hex-file successfully parsed

            40368 program words found in 317 rows
            0 eeprom words found
            4 config words found
      Writing flash...checksum error,1 try
      Writing flash...checksum error,1 try
      Writing flash...checksum error,2 try
      Writing flash...download failed
      Tx 1,2kB / Rx 11 bytes / 0,5s

I think i broke it. Duh.

I even changed the USB cable, changed to external power (along with the jumper), set Windows device manager to actually use the right baudrate on my USB serial port (com7). And i still get errors.

What can i do and what have i done? Should i throw it all away? (etc etc, quoting The Norther Pikes)
Title: Re: A checksum error is a bad start
Post by: dpropicweb on June 18, 2011, 02:30:27 pm
I don't think you've broken it yet :-)

When you say you got the ds30 loader app from subversion, did you get the one from the web platform directory?
Title: Re: A checksum error is a bad start
Post by: llauren on June 18, 2011, 04:54:39 pm
Yep. But this is after i tried with the newer one which i got from the ds30 developer page. That's why i fear i'd blown something.

I should add to my story that i managed to reach the upload page, chose the image suggested in the documentation, tried to upload it and got a timeout. That's the last time i heard from the Web platform over IP.
Title: Re: A checksum error is a bad start
Post by: arhi on June 18, 2011, 04:56:37 pm
do you have a pic programmer? (pickit2, pickit3 or something similar?)
Title: Re: A checksum error is a bad start
Post by: llauren on June 18, 2011, 05:47:35 pm
Nope.

I know buying one will increase my geek cred, but will buying one be a more cost effective option than buying a new Web platform? Oh, and can i flash my #twatch with one?

I don't have a problem ascending from noobdood into the apprentice level of hardware hackerdom, but i'd like to know if a pic programmer will do me (and my board) any good.
Title: Re: A checksum error is a bad start
Post by: arhi on June 18, 2011, 06:14:49 pm
with pickit2 you should be able to flash all the pic based devices from DP ... but if you own buspirate you might consider the bus pirate programmer attachment... I have never tried it as I use pickit2/pickit3 every day so no need for another programmer (not to mention pickit2/3 support wider range of devices and has bit better support) .. but if you have buspirate already then you might consider http://www.seeedstudio.com/depot/bus-pi ... ?cPath=174 (http://www.seeedstudio.com/depot/bus-pirate-pic-programming-adapter-for-developers-p-707.html?cPath=174) (note that it is experimental so maybe someone who actually made it work can give you more info in will it be able to properly programm web platform / twatch)

now, have you tried to reflash it with info from http://dangerousprototypes.com/docs/Web ... e_upgrades (http://dangerousprototypes.com/docs/Web_platform:_Firmware_upgrades) ?
(using the binaries for flashing and hex files from there)
Title: Re: A checksum error is a bad start
Post by: llauren on June 18, 2011, 09:43:06 pm
Just a quickie to note that i Read The Fine Manual and flashed my #twatch over tftp. I am now slightly less an idiot. But my Web platform is still as before. The PWR and LD1 LEDs are on, but that's all. Now some sleep.
Title: Re: A checksum error is a bad start
Post by: dpropicweb on June 18, 2011, 11:51:30 pm
Is the web platform's LD1 on or flashing?

As to whether a programmer will help, you will be able to restore the firmware to the web platform. It's very unlikely that you've broken anything, rather than simply corrupting the bootloader.

See the wiki  http://http://dangerousprototypes.com/docs/PIC_Resources#Programmers for programmer options.
Title: Re: A checksum error is a bad start
Post by: llauren on June 19, 2011, 04:43:56 pm
Okay, so the checksum error quoted above is the sign of a curropted boot loader, not that the hardware is borken in any way? Well then, it's off to the shop again.
Title: Re: A checksum error is a bad start
Post by: ian on June 19, 2011, 05:13:02 pm
Hi llauren,

I'm sorry about the problem with the web platform. If it is a bootloader issue I'd be happy to reflash it for you.
Title: Re: A checksum error is a bad start
Post by: llauren on June 19, 2011, 06:03:52 pm
Hello good sir Ian,

I'd appreciate it, thanks. Can you email me the address i should send it to? As an admin of this board, you should already have my email address :)

 ~rL
Title: Re: A checksum error is a bad start
Post by: ian on June 29, 2011, 06:25:44 pm
Received your hardware and reflashed the bootloader. Tried to upload demo and got checksum errors. Programmed demo and it worked ok.

I suspected the FTDI chip was probably bad because the programmed firmware verify would have failed if it was the PIC. I programmed the serial echo demo, and sure enough, if there are lots of characters it skips to a different character (see image). This could be because the clock in the PIC is off (we should be using an external crystal), or because the FTDI chip is bad. I wouldn't know which to guess, we've never had this issue before.

I'll contact Seeed for a replacement on your behalf, but can you please give me the order number (by email, email sent too).
Title: Re: A checksum error is a bad start
Post by: llauren on June 29, 2011, 06:51:19 pm
Thanks for your analysis and help. The order number is in the mail.
Title: Re: A checksum error is a bad start
Post by: llauren on July 25, 2011, 07:45:33 pm
Phew! I finally received a message from the mailman that there's a box from the east to fetch. Lo and behold, it it the replacement Web Platform!

I hope i can get this one to stay alive a little longer :)
Title: Re: A checksum error is a bad start
Post by: ian on July 26, 2011, 06:12:04 pm
I'm glad you got it. Thanks for the update :)

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01142103104session_write_close ( )...(null):0
20.01172234696ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01172235472Database_MySQL->query( ).../DatabaseHandler.php:119
40.05612374208Database_MySQL->error( ).../Db-mysql.class.php:273