Testing

A forum for discussing applications and implementations of the MegaShift transmission controller code for the GPIO from B&G. This can control up to 8-speeds and 6 shift solenoids (plus a 16x9 table for controlling a PWM line pressure valve). It has manual and fully automatic modes (16x9 load x speed table), with under and over rev-limit protection, and full data logging of all inputs and outputs (among many other abilities). A TransStim to test your completed board is also available.
Post Reply
gurov
Posts: 164
Joined: Mon Jun 01, 2009 1:01 pm

flashing procedure

Post by gurov »

i just want to double check that i really DO have to wipe the previous firmware to flash new stuff over, using the boot jumper ?

currently i have this:

Code: Select all


gurov@gurov-tinytops:~/flash/utils$ cat flash1 
./lin_ms2dl -f bootstrap.s19 -c /dev/ttyUSB0 

gurov@gurov-tinytops:~/flash/utils$ cat flash2 
./lin_ms2dl -j -f $1 -c /dev/ttyUSB0
flash bootstrap loader, then flash the actual firmware, this requires opening the case and flipping a switch for me (yes, it could be moved outside, i'll prolly do that if that's the only option.

should it be possible to flash firmware without flashing the bootstrap first ?
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: flashing procedure

Post by Bernard Fife »

gurov,

You cannot re-flash the bootloader program (technically, the "serial monitor") using the serial port (that requires a BDM cable).

The bootloader resides in a protected area of the flash, so it cannot be written or overwritten by anything the serial port does.

So you just need to load the code itself, and this can only be done by shorting the boot jumper.

What I do is hook a mini-SPST momentary switch with appropriate wiring to the booth header, then push it when powering up if I want to load new code. Once the bootloader it entered (a few milliseconds) the button doesn't have to be held down anymore. Once the code is loaded, cycle the power and drive. You can then put the bootloader switch anywhere you like (on the case end-plate, on the dash, etc.)

This is exactly like MS-II with the B&G code.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
gurov
Posts: 164
Joined: Mon Jun 01, 2009 1:01 pm

Re: flashing procedure

Post by gurov »

Lance wrote:gurov,

You cannot re-flash the bootloader program (technically, the "serial monitor") using the serial port (that requires a BDM cable).

The bootloader resides in a protected area of the flash, so it cannot be written or overwritten by anything the serial port does.

So you just need to load the code itself, and this can only be done by shorting the boot jumper.

What I do is hook a mini-SPST momentary switch with appropriate wiring to the booth header, then push it when powering up if I want to load new code. Once the bootloader it entered (a few milliseconds) the button doesn't have to be held down anymore. Once the code is loaded, cycle the power and drive. You can then put the bootloader switch anywhere you like (on the case end-plate, on the dash, etc.)

This is exactly like MS-II with the B&G code.

Lance.
gotcha, makes sense.

my trans controller is under the hood, so that makes it somewhat difficult to have a momentary switch. i'll put a regular switch coming out of the box. right now i have to take 4 screws out, slide the VR board and main gpio board, flip the switch, leave the board out, power the car on, load bootloader code, power the car off, flip the switch back to run, put the main board and VR board into the case, screw the 4 screws back in, power the car on, flash real code, etc.
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: flashing procedure

Post by Bernard Fife »

gurov,

Yeah, it's a pain to open the box to do a code change. A remote switch on the boot header solves this. I have always done this for MS, right from the beginning - it makes things so much easier.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Post Reply