Skip to content

Commit 0ecdd72

Browse files
committed
diskloader source and binary for 32u4
1 parent cdf887b commit 0ecdd72

File tree

12 files changed

+1902
-1
lines changed

12 files changed

+1902
-1
lines changed

hardware/arduino/boards.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ leonardo.bootloader.low_fuses=0xde
88
leonardo.bootloader.high_fuses=0xd8
99
leonardo.bootloader.extended_fuses=0xf3
1010
leonardo.bootloader.path=diskloader
11-
leonardo.bootloader.file=diskloader_atmega32u4.hex
11+
leonardo.bootloader.file=DiskLoader.hex
1212
leonardo.bootloader.unlock_bits=0x3F
1313
leonardo.bootloader.lock_bits=0x0F
1414
leonardo.build.mcu=atmega32u4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
;************************************************************
2+
; Windows USB CDC ACM Setup File
3+
; Copyright (c) 2000 Microsoft Corporation
4+
5+
6+
[Version]
7+
Signature="$Windows NT$"
8+
Class=Ports
9+
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
10+
Provider=%MFGNAME%
11+
LayoutFile=layout.inf
12+
CatalogFile=%MFGFILENAME%.cat
13+
DriverVer=11/15/2007,5.1.2600.0
14+
15+
[Manufacturer]
16+
%MFGNAME%=DeviceList, NTamd64
17+
18+
[DestinationDirs]
19+
DefaultDestDir=12
20+
21+
22+
;------------------------------------------------------------------------------
23+
; Windows 2000/XP/Vista-32bit Sections
24+
;------------------------------------------------------------------------------
25+
26+
[DriverInstall.nt]
27+
include=mdmcpq.inf
28+
CopyFiles=DriverCopyFiles.nt
29+
AddReg=DriverInstall.nt.AddReg
30+
31+
[DriverCopyFiles.nt]
32+
usbser.sys,,,0x20
33+
34+
[DriverInstall.nt.AddReg]
35+
HKR,,DevLoader,,*ntkern
36+
HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
37+
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
38+
39+
[DriverInstall.nt.Services]
40+
AddService=usbser, 0x00000002, DriverService.nt
41+
42+
[DriverService.nt]
43+
DisplayName=%SERVICE%
44+
ServiceType=1
45+
StartType=3
46+
ErrorControl=1
47+
ServiceBinary=%12%\%DRIVERFILENAME%.sys
48+
49+
;------------------------------------------------------------------------------
50+
; Vista-64bit Sections
51+
;------------------------------------------------------------------------------
52+
53+
[DriverInstall.NTamd64]
54+
include=mdmcpq.inf
55+
CopyFiles=DriverCopyFiles.NTamd64
56+
AddReg=DriverInstall.NTamd64.AddReg
57+
58+
[DriverCopyFiles.NTamd64]
59+
%DRIVERFILENAME%.sys,,,0x20
60+
61+
[DriverInstall.NTamd64.AddReg]
62+
HKR,,DevLoader,,*ntkern
63+
HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
64+
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
65+
66+
[DriverInstall.NTamd64.Services]
67+
AddService=usbser, 0x00000002, DriverService.NTamd64
68+
69+
[DriverService.NTamd64]
70+
DisplayName=%SERVICE%
71+
ServiceType=1
72+
StartType=3
73+
ErrorControl=1
74+
ServiceBinary=%12%\%DRIVERFILENAME%.sys
75+
76+
77+
;------------------------------------------------------------------------------
78+
; Vendor and Product ID Definitions
79+
;------------------------------------------------------------------------------
80+
; When developing your USB device, the VID and PID used in the PC side
81+
; application program and the firmware on the microcontroller must match.
82+
; Modify the below line to use your VID and PID. Use the format as shown below.
83+
; Note: One INF file can be used for multiple devices with different VID and PIDs.
84+
; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
85+
;------------------------------------------------------------------------------
86+
[SourceDisksFiles]
87+
[SourceDisksNames]
88+
[DeviceList]
89+
%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0020&MI_00
90+
91+
[DeviceList.NTamd64]
92+
%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0020&MI_00
93+
94+
95+
;------------------------------------------------------------------------------
96+
; String Definitions
97+
;------------------------------------------------------------------------------
98+
;Modify these strings to customize your device
99+
;------------------------------------------------------------------------------
100+
[Strings]
101+
MFGFILENAME="CDC_vista"
102+
DRIVERFILENAME ="usbser"
103+
MFGNAME="Arduino LLC (www.arduino.cc)"
104+
INSTDISK="Arduino Leonardo Driver Installer"
105+
DESCRIPTION="Arduino Lenonardo"
106+
SERVICE="USB RS-232 Emulation Driver"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
:1078000011241FBECFEFDAE0DEBFCDBFC4C04101FF
2+
:1078100042144505560455026403740300001E9586
3+
:1078200087020110030000C18081C106C0FF0A0069
4+
:107830000CA10185037508150026FF00954009017C
5+
:107840008102954009029102C0040309041A033021
6+
:1078500000300030003000300030003000300031A7
7+
:1078600000370030003100120100020200004041E8
8+
:1078700023200000010000010112010002000000AD
9+
:1078800040412320000001000001010902640003BF
10+
:1078900001008032080B000202020100090400000E
11+
:1078A0000102020000052400100105240101010469
12+
:1078B0002402020524060001070581031000400987
13+
:1078C000040100020A000000070502024000000750
14+
:1078D00005830240000009040200010300000009C2
15+
:1078E0002101010001221E00070584034000400021
16+
:1078F00080918A0190918B01019690938B018093E6
17+
:107900008A01089581E08093E0001092E200EE2762
18+
:10791000FF27099408950F931F93CF93DF93982F18
19+
:10792000EB01042F10E088E76030780730F411E0B5
20+
:1079300083E0FB0180935700E895892F68E071E0B0
21+
:10794000402FCED0112311F107B600FCFDCF402F00
22+
:107950004695FE01A8E0B1E020E031E009C08D913C
23+
:107960009D910C0130935700E895112432962F5FBA
24+
:107970002417A8F385E0FE0180935700E89507B629
25+
:1079800000FCFDCF81E180935700E895DF91CF9116
26+
:107990001F910F9108958BD084E18093880180E13D
27+
:1079A00080938901E0E0F0E0859194918F5F9F4F93
28+
:1079B00019F081E080938D01EE24FF24DD24D3941F
29+
:1079C000D6D1082F8EE098E7FC01249131960296DB
30+
:1079D0004491201711F02223B9F710928F011092D1
31+
:1079E0008E0182E068E071E07BD0013479F460912F
32+
:1079F00008016058633028F0683111F064E001C07C
33+
:107A000063E0C62FD0E0CF5DD74808C0063579F4D3
34+
:107A100080910801803321F0C5E2D8E711E029C048
35+
:107A200080910A01C82FD0E0C25ED748F7CF053752
36+
:107A300021F4CEE1D8E713E01CC0053539F4E0901D
37+
:107A40000801F0900901EE0CFF1C0AC0043631F465
38+
:107A500082E0B701409109015EDF02C0043721F0E6
39+
:107A6000C5E2D8E710E005C010910901E701E10E79
40+
:107A7000F11C7DD18097B1F483E068E871E041E0CA
41+
:107A800050E044D0112329F0412F50E083E8BE019B
42+
:107A90003DD083E469E871E041E050E037D0013542
43+
:107AA00009F08ECFD0928D01EE24FF2489CF109261
44+
:107AB0008F0110928E0110928C0110928D0181E045
45+
:107AC0008093D70080EA8093D80082E189BD09B411
46+
:107AD00000FEFDCF80E98093D8001092E000089569
47+
:107AE000FB018093E9009BE60EC08091E80085FFD2
48+
:107AF000FCCF8091F10081938091E80085FD02C068
49+
:107B00009093E8004150442381F70895982FFB019A
50+
:107B1000282F207287708093E9003AE314C0809187
51+
:107B2000E80085FFFCCF97FF02C0849101C08081EF
52+
:107B30003196211180E08093F1008091E80085FD6D
53+
:107B400002C03093E800415050408FEF4F3F58073C
54+
:107B500031F796FF03C08AE38093E800089580918F
55+
:107B60009101813279F420E030E003C0808180937C
56+
:107B7000F100F901E050FF4F2F5F3F4F28303105F2
57+
:107B8000A9F71EC08032B1F48091E80082FFFCCFDB
58+
:107B900020E030E003C08091F1008083F901E050E3
59+
:107BA000FF4F2F5F3F4F28303105A9F78BEF8093B0
60+
:107BB000E80006C0823221F480919201809307018F
61+
:107BC00081E0089520919301223231F1213081F436
62+
:107BD0008091960190919701089711F42093980154
63+
:107BE00080919801882309F03AC0E9E7F8E739C0A5
64+
:107BF000223021F484E6EBE8F8E711C0233069F580
65+
:107C000080919201882319F4E9E4F8E72AC08130D1
66+
:107C100021F5EDE4F8E725C081E0EBE2F8E790918B
67+
:107C20009601282F981708F4292F90E03EEF8091B5
68+
:107C3000E8008570E1F38091E80082FD0EC09F5F4F
69+
:107C400084918093F100892F8F7311F43093E800B1
70+
:107C50003196921760F381E0089580E00895E7E699
71+
:107C6000F8E78491DCCF1092E9008091E80083FF6F
72+
:107C70005FC0E0E9F1E003C08091F100819381E011
73+
:107C8000E839F807C9F782EF8093E8008091900106
74+
:107C900087FF05C08091E80080FFFCCF03C08EEF16
75+
:107CA0008093E80080919101853051F48091E80043
76+
:107CB00080FFFCCF8091920180688093E30031C007
77+
:107CC0008930E1F48091920180938C01E7E2F8E73A
78+
:107CD00091E031E026E39093E9003093EB0084914A
79+
:107CE0008093EC002093ED009F5F3196953099F7DB
80+
:107CF0008EE78093EA001092EA0013C0883029F4DE
81+
:107D000080918C018093F1000CC0882319F41092AB
82+
:107D1000F10007C0863011F455DF01C020DF882351
83+
:107D200021F08EEF8093E800089581E28093EB00CC
84+
:107D300008958091E1001092E100282F83FF0CC08C
85+
:107D40001092E90081E08093EB001092EC0082E356
86+
:107D50008093ED0010928C0122FF08C080918D016C
87+
:107D6000882321F410928F0110928E0108951F93A1
88+
:107D700012E079DFDEDF1093E9008091E80085FFF3
89+
:107D80000DC09091F1008091E80085FD03C08BE665
90+
:107D90008093E800892F90E01F91089580918E01D3
91+
:107DA00090918F01019790938F0180938E01809124
92+
:107DB0008E0190918F01892B09F4A4DD99DDD9CF33
93+
:087DC00000E1000000000000DA
94+
:040000030000780081
95+
:00000001FF
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
###############################################################################
2+
# Makefile for DiskLoader
3+
###############################################################################
4+
5+
## General Flags
6+
PROJECT = DiskLoader
7+
TARGET = DiskLoader.elf
8+
CC = avr-gcc
9+
10+
# BOARD2
11+
MCU = atmega32u4
12+
AVR_FREQ = 16000000L
13+
14+
15+
# Change if your programmer is different
16+
AVRDUDE_PROGRAMMER = avrispmkII
17+
AVRDUDE_PORT = usb
18+
19+
# program name should not be changed...
20+
PROGRAM = DiskLoader
21+
22+
AVRDUDE = avrdude
23+
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -p $(MCU)
24+
25+
## Options common to compile, link and assembly rules
26+
COMMON = -mmcu=$(MCU)
27+
28+
override CFLAGS = -g -Wall -Os -mmcu=$(MCU) -DF_CPU=$(AVR_FREQ) $(DEFS) -ffunction-sections -gdwarf-2 -fdata-sections -fno-split-wide-types
29+
30+
## Assembly specific flags
31+
ASMFLAGS = $(COMMON)
32+
ASMFLAGS += $(CFLAGS)
33+
ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2
34+
35+
## Linker flags
36+
LDFLAGS = $(COMMON)
37+
LDFLAGS += -Wl,-gc-sections,-Map=DiskLoader.map,--section-start=.text=0x7800,--relax
38+
LDFLAGS += -nodefaultlibs -nostartfiles
39+
40+
41+
## Intel Hex file production flags
42+
HEX_EEPROM_FLAGS = -j .eeprom
43+
HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
44+
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings
45+
46+
## Objects explicitly added by the user
47+
LINKONLYOBJECTS =
48+
49+
MODULES := .
50+
SRC_DIR := $(addprefix src/,$(MODULES))
51+
BUILD_DIR := $(addprefix build/,$(MODULES))
52+
53+
SRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.cpp))
54+
OBJ := $(patsubst src/%.cpp,build/%.o,$(SRC))
55+
DEP := $(OBJ:%.o=%.d)
56+
INCLUDES := $(addprefix -I,$(SRC_DIR))
57+
58+
vpath %.cpp $(SRC_DIR)
59+
60+
.PHONY: all checkdirs clean
61+
62+
all: checkdirs $(TARGET) DiskLoader.hex DiskLoader.lss size
63+
64+
-include $(DEP)
65+
66+
checkdirs: $(BUILD_DIR)
67+
68+
$(BUILD_DIR):
69+
@mkdir -p $@
70+
71+
clean:
72+
@rm -rf build/
73+
@rm -f *.hex
74+
@rm -f *.elf
75+
@rm -f *.lss
76+
@rm -f *.map
77+
78+
define make-goal
79+
$1/%.o: %.cpp
80+
$(CC) $(INCLUDES) $(CFLAGS) -c $$< -MD -o $$@
81+
endef
82+
83+
$(foreach bdir,$(BUILD_DIR),$(eval $(call make-goal,$(bdir))))
84+
85+
$(TARGET): $(OBJ)
86+
$(CC) $(LDFLAGS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) $^ -o $@
87+
88+
%.hex: $(TARGET)
89+
avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@
90+
91+
%.lss: $(TARGET)
92+
avr-objdump -h -S $< > $@
93+
94+
size: $(TARGET)
95+
@echo
96+
# @avr-size -C --mcu=${MCU} ${TARGET}.elf
97+
98+
program: $(TARGET).hex
99+
$(AVRDUDE) $(AVRDUDE_FLAGS) -B 5 -u -U flash:w:$(TARGET).hex

0 commit comments

Comments
 (0)