Please login or register.

Login with username, password and session length
 

News:

Latest updates at DangerousPrototypes.com.


Author Topic: bootloader v4 console utility  (Read 1559 times)

pppd

  • Newbie
  • *
  • Posts: 40
  • Karma: +2/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #15 on: January 19, 2010, 01:31:41 PM »
I have just added Windows support to the console utility, so if there is someone without .NET framework willing to update now they can.

I have not fully tested it, just tried --hello mode to see if it communicates properly so I would like to ask sb with native Windows installation to give it a go. It is just a compatibility port so it does not use any overlapped IO instead I emulate select by probing the COM port for data every 250ms. This should work well enough I guess.

Usage is exactly the same as in UNIXes, just put --dev=COM1 as the device path or whatever the COM{X} is correct for your system.

will_j

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #16 on: January 19, 2010, 01:36:46 PM »
I compiled this on my PowerPC MAC, and it runs, but I get an error, I previously upgraded the bootloader using the old python loader script.
Here's what happens on my BPv3:

Parsing HEX file [BPv3-Firmware-v4.1.hex]
Found 21503 words (64509 bytes)
Fixing bootloader/userprogram jumps
Opening serial device /dev/cu.usbserial-A7004E19...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...OK

Device ID: PIC24FJ64GA002 [d4]
Bootloader version: 1,02
00 00 00 01 01 FE
Erasing page 0, 0000...OK
Writing page 0 row 0, 0000...OK
00 00 00 02 C1 04 00 A8 00 00 00 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 0F
Writing page 0 row 1, 0080...OK
00 00 00 02 C1 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 00 26 79 7D
Writing page 0 row 2, 0100...ERROR

Error updating firmware :(
« Last Edit: January 19, 2010, 01:45:31 PM by will_j »

pppd

  • Newbie
  • *
  • Posts: 40
  • Karma: +2/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #17 on: January 19, 2010, 01:45:28 PM »
I'm afraid it is not compatible with Big Endian machines at the moment as I use some direct 32bit address casting to byte arrays with C unions. The source code is included so feel free to give it a go or wait until I post a BE/LE compatible code.

will_j

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #18 on: January 19, 2010, 03:17:43 PM »
All,

Have just worked with pppd to test a MAC OSX PowerPC compatible version - and it works! I expect he'll update you all soon with a new archive.

Thanks,

Will.
« Last Edit: January 19, 2010, 03:50:38 PM by will_j »

pppd

  • Newbie
  • *
  • Posts: 40
  • Karma: +2/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #19 on: January 19, 2010, 03:55:05 PM »
It is now compatible with BigEndian machines so it works with PowerPC Macs too :) (@will_j, thanks for testing)

Ian, there are a few zips now.. shall I remove the old ones and leave the latest only, or we could think of a better way of handling this like including it in the repository?

EGHM

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #20 on: January 19, 2010, 11:09:30 PM »
Thank you, I much prefer command line and wasn't looking forward to installing Mono.  osx_ppc worked great for upgrading my v3.  Haven't tried with my v2go yet, currently using it for AVR.
Code: [Select]
Bus Pirate v3
Firmware v4.1 Bootloader v4.1
DEVID:0x0447 REVID:0x3003 (A3)
http://dangerousprototypes.com

ian

  • Crew
  • Hero Member
  • *****
  • Posts: 2861
  • Karma: +61/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #21 on: January 20, 2010, 12:52:27 AM »
@pppd - Thanks! Great work. I'll put it in SVN. Would you like access to work on it?

pppd

  • Newbie
  • *
  • Posts: 40
  • Karma: +2/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #22 on: January 20, 2010, 02:41:14 AM »
If that saves you some time why not. Just tell me where should I put it not to make mess in your repository :) Did you have a chance to try the Windows port?

ian

  • Crew
  • Hero Member
  • *****
  • Posts: 2861
  • Karma: +61/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #23 on: January 20, 2010, 04:54:31 AM »
i created a folder and source folder under /bootloader-v4/. I called it pirate loader, i hope that's ok:

http://code.google.com/p/the-bus-pirate/source/browse/#svn/trunk/bootloader-v4/pirate-loader

I haven't had a chance to try it yet, but I plan to this afternoon. I just got a load of prototype pcbs in the mail so I've been pretty distracted today :)

Please PM or email me a Google Code registered email address so I can add you to the project.

rudivd

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #24 on: January 24, 2010, 04:30:47 AM »
Hi all,

Tried the bootloader update program utility on a mac, but no luck yet.
I use the version that is in the zipfile as directed by pppds post in this forum,
but the mac version bails out with:

Opening serial device /dev/tty.usbserial-A600aSsn...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...ERROR
No reply from the bootloader, or invalid reply received: 0
Please make sure that PGND and PGC are connected, replug the devide and try again

Serial device is the right device, pins are connected, mode led is on.

We're talking about a BP v3a, (sep 2009) that otherwise runs fine:

Bus Pirate v3
Firmware 3.5
DEVID:0x0447 REVID:0x3043 (B5)
http://dangerousprototypes.com

Any idea what's wrong ?
Thanks

Rudi

pppd

  • Newbie
  • *
  • Posts: 40
  • Karma: +2/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #25 on: January 24, 2010, 04:45:58 AM »
Hello Rudi,

Have you upgraded your Bootloader to v4?

Piotr

ian

  • Crew
  • Hero Member
  • *****
  • Posts: 2861
  • Karma: +61/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #26 on: January 24, 2010, 05:10:03 AM »
Hi rudivd,

It sounds like you don't have the v4 bootloader installed yet, there's a like to the upgrade instructions in this FAQ:
http://whereisian.com/forum/index.php?topic=256.msg1988#msg1988

rudivd

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #27 on: January 24, 2010, 06:56:35 AM »
Thanks,

Looks like I missed the step programming the bootloader. Did that, got to the point where I have my bp telling me:

DS30 Loader installer v0.2 (ALPHA)
(C)hris 2010
Released under Creative Commons null license.
This will install bootloader v4.1.
Type 'Yes' to program the new bootloader.
Disconnect power if unsure (no harm done).

Fine, but when I type the magic 'yes' word (yes, without quotes),
it does not accept my chars as correct, and keeps repeating the
message on every keystroke. (I use Zterm on mac, 115200/n/8/1 the terminal that just works on my bp, never had problems with sending chars).

So: something might be wrong...
Maybe a wrong version of the image ?? I used BPv3-v2blupdaterVa3-v4.1.hex from http://code.google.com/p/the-bus-pirate/downloads/detail?name=v2tov41-bootloader-update-va3.zip ...

any idea ?? I'll go and check another terminal program...
Thanks again

Rudi

pppd

  • Newbie
  • *
  • Posts: 40
  • Karma: +2/-0
    • View Profile
Re: bootloader v4 console utility
« Reply #28 on: January 24, 2010, 07:01:31 AM »
Use "screen /dev/tty.usbserial-A600aSsn 115200" and remember about capital Y in Yes

Sjaak

  • Fellow
  • Hero Member
  • *****
  • Posts: 885
  • Karma: +263/-0
  • Überprutser
    • View Profile
Re: bootloader v4 console utility
« Reply #29 on: January 24, 2010, 07:21:28 AM »
typing yes is case insensitive so it should not be a problem. You sure nothing is laying on a modifier button (ctrl/alt/mac)? or a sudden change in keyboard map (don't know how this works on mac, but in windows there is a keystroke with ctrl+alt shift which cycles between various keymaps, and i hit it occassional) on german keyboard the y and z are swapped (don't know your location)

You see something echoed back or just the repeating message?