Rev 2598 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2598 | Rev 2601 | ||
---|---|---|---|
1 | @echo off |
1 | @echo off |
2 | :: /**************************************************************************** |
2 | :: /**************************************************************************** |
3 | :: * Copyright (C) 2014-2017 by Claas Anders "CaScAdE" Rathje * |
3 | :: * Copyright (C) 2014-2018 by Claas Anders "CaScAdE" Rathje * |
4 | :: * admiralcascade@gmail.com * |
4 | :: * admiralcascade@gmail.com * |
5 | :: * Project-URL: http://www.mylifesucks.de/oss/c-osd/ * |
5 | :: * Project-URL: http://www.mylifesucks.de/oss/c-osd/ * |
6 | :: * * |
6 | :: * * |
7 | :: * This program is free software; you can redistribute it and/or modify * |
7 | :: * This program is free software; you can redistribute it and/or modify * |
8 | :: * it under the terms of the GNU General Public License as published by * |
8 | :: * it under the terms of the GNU General Public License as published by * |
9 | :: * the Free Software Foundation; either version 2 of the License. * |
9 | :: * the Free Software Foundation; either version 2 of the License. * |
10 | :: * * |
10 | :: * * |
11 | :: * This program is distributed in the hope that it will be useful, * |
11 | :: * This program is distributed in the hope that it will be useful, * |
12 | :: * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
12 | :: * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
13 | :: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
13 | :: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
14 | :: * GNU General Public License for more details. * |
14 | :: * GNU General Public License for more details. * |
15 | :: * * |
15 | :: * * |
16 | :: * You should have received a copy of the GNU General Public License * |
16 | :: * You should have received a copy of the GNU General Public License * |
17 | :: * along with this program; if not, write to the * |
17 | :: * along with this program; if not, write to the * |
18 | :: * Free Software Foundation, Inc., * |
18 | :: * Free Software Foundation, Inc., * |
19 | :: * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
19 | :: * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
20 | :: ****************************************************************************/ |
20 | :: ****************************************************************************/ |
21 | 21 | ||
22 | :: set FIRMWAREFILE to current version |
22 | :: set FIRMWAREFILE to current version |
23 | set FIRMWAREFILE=C-OSD-20170511-1145-pal.hex |
23 | set FIRMWAREFILE=C-OSD-20180509-1200-pal.hex |
24 | 24 | ||
25 | :: Read fuses as test |
25 | :: Read fuses as test |
26 | avrdude -c usbasp -p m162 -n -v |
26 | avrdude -c usbasp -p m162 -n -v |
27 | 27 | ||
28 | IF ERRORLEVEL 1 GOTO COMERR |
28 | IF ERRORLEVEL 1 GOTO COMERR |
29 | 29 | ||
30 | :: uncomment next command if it is the first time you flash the OSD and want to set the fuses |
30 | :: uncomment next command if it is the first time you flash the OSD and want to set the fuses |
31 | :: avrdude -c usbasp -p m162 -u -v -U lfuse:w:0xff:m -U hfuse:w:0xd7:m -U efuse:w:0xfb:m |
31 | :: avrdude -c usbasp -p m162 -u -v -U lfuse:w:0xff:m -U hfuse:w:0xd7:m -U efuse:w:0xfb:m |
32 | 32 | ||
33 | :: uncomment out next command if you want to flash the characters file in PAL |
33 | :: uncomment out next command if you want to flash the characters file in PAL |
34 | :: avrdude -c usbasp -p m162 -u -U flash:w:C-OSD-characters-pal.hex |
34 | :: avrdude -c usbasp -p m162 -u -U flash:w:C-OSD-characters-pal.hex |
35 | 35 | ||
36 | :: uncomment out next command if you want to flash the characters file in NTSC |
36 | :: uncomment out next command if you want to flash the characters file in NTSC |
37 | :: avrdude -c usbasp -p m162 -u -U flash:w:C-OSD-characters-ntsc.hex |
37 | :: avrdude -c usbasp -p m162 -u -U flash:w:C-OSD-characters-ntsc.hex |
38 | 38 | ||
39 | 39 | ||
40 | 40 | ||
41 | :: programm firmware |
41 | :: programm firmware |
42 | avrdude -c usbasp -p m162 -u -U flash:w:%FIRMWAREFILE% |
42 | avrdude -c usbasp -p m162 -u -U flash:w:%FIRMWAREFILE% |
43 | 43 | ||
44 | 44 | ||
45 | IF ERRORLEVEL 1 GOTO FLASHERR |
45 | IF ERRORLEVEL 1 GOTO FLASHERR |
46 | 46 | ||
47 | echo Firmware flashed successfully! Yay! |
47 | echo Firmware flashed successfully! Yay! |
48 | echo Got outside and fly - enjoy the view! |
48 | echo Got outside and fly - enjoy the view! |
49 | 49 | ||
50 | GOTO END |
50 | GOTO END |
51 | 51 | ||
52 | :COMERR |
52 | :COMERR |
53 | echo ERROR: Could not read fuses to check connection |
53 | echo ERROR: Could not read fuses to check connection |
54 | echo * Check connection of USBASP |
54 | echo * Check connection of USBASP |
55 | echo * Check driver installation for USBASP |
55 | echo * Check driver installation for USBASP |
56 | echo * Check connection of USBASP to OSD |
56 | echo * Check connection of USBASP to OSD |
57 | echo * Post in Forum |
57 | echo * Post in Forum |
58 | GOTO END |
58 | GOTO END |
59 | 59 | ||
60 | 60 | ||
61 | :FLASHERR |
61 | :FLASHERR |
62 | echo ERROR: Could not flash firmware %FIRMWAREFILE% |
62 | echo ERROR: Could not flash firmware %FIRMWAREFILE% |
63 | echo * Check if file exists |
63 | echo * Check if file exists |
64 | echo * Check if firmware is too big for AVR |
64 | echo * Check if firmware is too big for AVR |
65 | echo * Post in Forum |
65 | echo * Post in Forum |
66 | GOTO END |
66 | GOTO END |
67 | 67 | ||
68 | :END |
68 | :END |
69 | 69 | ||
70 | 70 | ||
71 | echo. |
71 | echo. |
72 | echo. |
72 | echo. |
73 | 73 | ||
74 | ::EOF |
74 | ::EOF |