Adding tested working Honda J Series V6 2 input decoder. Developed in tandem with...
[freeems-vanilla.git] / bin / dumpAllFlash3forms.bash
blob3ab8463a92c0839822d93ae66e3944ef98368087
1 #!/bin/bash
3 # FreeEMS - the open source engine management system
5 # dumpAllFlash3forms.bash
7 # Copyright 2008, 2009, 2010 Fred Cooke
9 # This file is part of the FreeEMS project.
11 # FreeEMS software is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
16 # FreeEMS software is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with any FreeEMS software. If not, see http://www.gnu.org/licenses/
24 # We ask that if you make any changes to this file you email them upstream to
25 # us at admin(at)diyefi(dot)org or, even better, fork it on www.github.com!!!
27 # Thank you for choosing FreeEMS to run your engine!
29 # These are all we can use now as we are paging flash finally :-)
31 # Set up the variables
32 export EXPECTED_ARGS="1"
33 export NUMBER_OF_ARGS="$#"
35 # Formalise the error codes
36 export WRONG_NUMBER_OF_ARGS="-20"
38 # Test for the correct number of arguments
39 if [ $EXPECTED_ARGS -ne $NUMBER_OF_ARGS ]
40 then
41 echo "$USAGE"
42 echo "Expected $EXPECTED_ARGS parameter(s), got $NUMBER_OF_ARGS, exiting..."
43 exit "$WRONG_NUMBER_OF_ARGS"
46 export SERIAL_DEVICE="$1"
49 # This only pulls down what has been written.
50 hcs12mem -b 115200 -i sm -p $SERIAL_DEVICE -t mc9s12xdp512 -a banked-ppage --flash-read freeems.full.dump.ppage.`date +%s`.s19