Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
portal-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
portal
portal-core
Commits
26c28d22
Commit
26c28d22
authored
13 years ago
by
da1l6
Browse files
Options
Downloads
Patches
Plain Diff
Add eeprom generation with KEY= option to makefile. ruby interpreter (>= 1.9.x) required.
parent
bc1592ac
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ATMegaCard/Makefile
+15
-9
15 additions, 9 deletions
ATMegaCard/Makefile
with
15 additions
and
9 deletions
ATMegaCard/Makefile
+
15
−
9
View file @
26c28d22
...
@@ -146,8 +146,11 @@ AVRDUDE_PORT = usb # programmer connected to USB port
...
@@ -146,8 +146,11 @@ AVRDUDE_PORT = usb # programmer connected to USB port
#AVRDUDE_PORT = lpt1 # programmer connected to parallel port
#AVRDUDE_PORT = lpt1 # programmer connected to parallel port
AVRDUDE_WRITE_FLASH
=
-U
flash:w:
$(
TARGET
)
.hex
$(
FUSE_BITS
)
AVRDUDE_WRITE_FLASH
=
-U
flash:w:
$(
TARGET
)
.hex
$(
FUSE_BITS
)
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
ifneq
($(KEY),)
EEPROM_GEN_CMD
=
./eeprom_gen.rb
$(
TARGET
)
.eep
$(
KEY
)
AVRDUDE_WRITE_EEPROM
=
-U
eeprom:w:
$(
TARGET
)
.eep
endif
#AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -b 115200 -c $(AVRDUDE_PROGRAMMER)
#AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -b 115200 -c $(AVRDUDE_PROGRAMMER)
AVRDUDE_FLAGS
=
-B
1
-p
$(
MCU
)
-P
$(
AVRDUDE_PORT
)
-c
$(
AVRDUDE_PROGRAMMER
)
AVRDUDE_FLAGS
=
-B
1
-p
$(
MCU
)
-P
$(
AVRDUDE_PORT
)
-c
$(
AVRDUDE_PROGRAMMER
)
...
@@ -227,7 +230,7 @@ ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
...
@@ -227,7 +230,7 @@ ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
# Default target.
# Default target.
all
:
begin gccversion sizebefore $(TARGET).elf $(TARGET).hex
$(TARGET).eep
\
all
:
begin gccversion sizebefore $(TARGET).elf $(TARGET).hex
\
$(
TARGET
)
.lss
$(
TARGET
)
.sym sizeafter finished end
$(
TARGET
)
.lss
$(
TARGET
)
.sym sizeafter finished end
...
@@ -286,7 +289,7 @@ extcoff: $(TARGET).elf
...
@@ -286,7 +289,7 @@ extcoff: $(TARGET).elf
# Program the device.
# Program the device.
program
:
$(TARGET).hex
$(TARGET).eep
program
:
$(TARGET).hex
eepromgen
$(
AVRDUDE
)
$(
AVRDUDE_FLAGS
)
$(
AVRDUDE_WRITE_FLASH
)
$(
AVRDUDE_WRITE_EEPROM
)
$(
AVRDUDE
)
$(
AVRDUDE_FLAGS
)
$(
AVRDUDE_WRITE_FLASH
)
$(
AVRDUDE_WRITE_EEPROM
)
...
@@ -298,11 +301,11 @@ program: $(TARGET).hex $(TARGET).eep
...
@@ -298,11 +301,11 @@ program: $(TARGET).hex $(TARGET).eep
@
echo
$(
MSG_FLASH
)
$@
@
echo
$(
MSG_FLASH
)
$@
$(
OBJCOPY
)
-O
$(
FORMAT
)
-R
.eeprom
$<
$@
$(
OBJCOPY
)
-O
$(
FORMAT
)
-R
.eeprom
$<
$@
%.eep
:
%.elf
#
%.eep: %.elf
@
echo
#
@echo
@
echo
$(
MSG_EEPROM
)
$@
#
@echo $(MSG_EEPROM) $@
-$(
OBJCOPY
)
-j
.eeprom
--set-section-flags
=
.eeprom
=
"alloc,load"
\
#
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
-
-change-section-lma
.eeprom
=
0
-O
$(
FORMAT
)
$<
$@
#
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
# Create extended listing file from ELF output file.
# Create extended listing file from ELF output file.
%.lss
:
%.elf
%.lss
:
%.elf
...
@@ -317,6 +320,9 @@ program: $(TARGET).hex $(TARGET).eep
...
@@ -317,6 +320,9 @@ program: $(TARGET).hex $(TARGET).eep
avr-nm
-n
$<
>
$@
avr-nm
-n
$<
>
$@
eepromgen
:
@
echo
$(
EEPROM_GEN_CMD
)
# Link: create ELF output file from object files.
# Link: create ELF output file from object files.
.SECONDARY
:
$(TARGET).elf
.SECONDARY
:
$(TARGET).elf
...
@@ -394,5 +400,5 @@ clean_list :
...
@@ -394,5 +400,5 @@ clean_list :
# Listing of phony targets.
# Listing of phony targets.
.PHONY
:
all begin finish end sizebefore sizeafter gccversion coff extcoff
\
.PHONY
:
all begin finish end sizebefore sizeafter gccversion coff extcoff
\
clean clean_list program
clean clean_list program
eepromgen
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment