Subversion Repositories Projects

Rev

Rev 2598 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2040 - 1
@echo off
2
:: /****************************************************************************
2601 - 3
::  *   Copyright (C) 2014-2018 by Claas Anders "CaScAdE" Rathje               *
2040 - 4
::  *   admiralcascade@gmail.com                                               *
5
::  *   Project-URL: http://www.mylifesucks.de/oss/c-osd/                      *
6
::  *                                                                          *
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   *
9
::  *   the Free Software Foundation; either version 2 of the License.         *
10
::  *                                                                          *
11
::  *   This program is distributed in the hope that it will be useful,        *
12
::  *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
13
::  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
14
::  *   GNU General Public License for more details.                           *
15
::  *                                                                          *
16
::  *   You should have received a copy of the GNU General Public License      *
17
::  *   along with this program; if not, write to the                          *
18
::  *   Free Software Foundation, Inc.,                                        *
19
::  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.              *
20
::  ****************************************************************************/
21
 
22
:: set FIRMWAREFILE to current version
2601 - 23
set FIRMWAREFILE=C-OSD-20180509-1200-pal.hex
2040 - 24
 
25
:: Read fuses as test
26
avrdude -c usbasp -p m162 -n -v
27
 
28
IF ERRORLEVEL 1 GOTO COMERR
29
 
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
32
 
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
35
 
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
38
 
39
 
40
 
41
:: programm firmware
42
avrdude -c usbasp -p m162 -u -U flash:w:%FIRMWAREFILE%
43
 
44
 
45
IF ERRORLEVEL 1 GOTO FLASHERR
46
 
47
echo Firmware flashed successfully! Yay!
48
echo Got outside and fly - enjoy the view!
49
 
50
GOTO END
51
 
52
:COMERR
53
echo ERROR: Could not read fuses to check connection
54
echo * Check connection of USBASP
55
echo * Check driver installation for USBASP
56
echo * Check connection of USBASP to OSD
57
echo * Post in Forum
58
GOTO END
59
 
60
 
61
:FLASHERR
62
echo ERROR: Could not flash firmware %FIRMWAREFILE%
63
echo * Check if file exists
64
echo * Check if firmware is too big for AVR
65
echo * Post in Forum
66
GOTO END
67
 
68
:END
69
 
70
 
71
echo.
72
echo.
73
 
74
::EOF