Revision 190
| trunk/bootloader/jump.S (revision 190) | ||
|---|---|---|
| 1 |
.section .jumps,"ax",@progbits |
|
| 2 |
|
|
| 3 |
.global _jumptable |
|
| 4 |
_jumptable: |
|
| 5 |
rjmp rs485_init |
|
| 6 |
rjmp rs485_get_byte |
|
| 7 |
rjmp rs485_send_byte |
|
| 8 |
rjmp parse_packet |
|
| 9 |
rjmp send_packet |
|
| trunk/bootloader/Makefile (revision 190) | ||
|---|---|---|
| 49 | 49 |
# automatically to create a 32-bit value in your source code. |
| 50 | 50 |
F_CPU = 8000000 |
| 51 | 51 |
|
| 52 |
# Location to place the bootloader |
|
| 53 |
BOOTSTART = 0x400 |
|
| 52 | 54 |
|
| 55 |
# Location to place the jump table |
|
| 56 |
JUMPSTART = 0x7E0 |
|
| 57 |
|
|
| 58 |
|
|
| 53 | 59 |
# Output format. (can be srec, ihex, binary) |
| 54 | 60 |
FORMAT = ihex |
| 55 | 61 |
|
| ... | ... | |
| 66 | 72 |
# Even though the DOS/Win* filesystem matches both .s and .S the same, |
| 67 | 73 |
# it will preserve the spelling of the filenames, and gcc itself does |
| 68 | 74 |
# care about how the name is spelled on its command-line. |
| 69 |
ASRC = |
|
| 75 |
ASRC = jump.S |
|
| 70 | 76 |
|
| 71 | 77 |
|
| 72 | 78 |
# Optimization level, can be [0, 1, 2, 3, s]. |
| ... | ... | |
| 180 | 186 |
# -Wl,...: tell GCC to pass this to linker. |
| 181 | 187 |
# -Map: create map file |
| 182 | 188 |
# --cref: add cross reference to map file |
| 183 |
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref,--section-start=.text=0x400 |
|
| 189 |
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref,--section-start=.text=$(BOOTSTART),--section-start=.jumps=$(JUMPSTART),--undefined=_jumptable |
|
| 184 | 190 |
LDFLAGS += $(EXTMEMOPTS) |
| 185 | 191 |
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) |
| 186 | 192 |
|
Also available in: Unified diff