openocd: src: replace SPDX to remaining files
[openocd.git] / src / jtag / drivers / OpenULINK / Makefile
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 #
4 # Copyright (C) 2011 by Martin Schmoelzer
5 # <martin.schmoelzer@student.tuwien.ac.at>
6 #
7
8 # Define the name of our tools. Some distributions (e. g. Fedora) prefix
9 # the SDCC executables, change this accordingly!
10 PREFIX =
11
12 # Small Device C Compiler: http://sdcc.sourceforge.net/
13 CC = $(PREFIX)-sdcc
14
15 # 8051 assembler, part of the SDCC software package.
16 AS = $(PREFIX)-sdas8051
17
18 # SDCC produces quite messy Intel HEX files. This tool is be used to re-format
19 # those files. It is not required for the firmware download functionality in
20 # the OpenOCD driver, but the resulting file is smaller.
21 PACKIHX = $(PREFIX)-packihx
22
23 # GNU binutils size. Used to print the size of the IHX file generated by SDCC.
24 SIZE = size
25
26 # Source and header directories.
27 SRC_DIR = src
28 INCLUDE_DIR = include
29
30 CODE_SIZE = 0x1B00
31
32 # Starting address of __xdata variables. Since the OpenULINK firmware does not
33 # use any of the isochronous interrupts, we can use the isochronous buffer space
34 # as XDATA memory.
35 XRAM_LOC = 0x2000
36 XRAM_SIZE = 0x0800
37
38 CFLAGS = --std-sdcc99 --opt-code-size --model-small
39 LDFLAGS = --code-loc 0x0000 --code-size $(CODE_SIZE) --xram-loc $(XRAM_LOC) \
40 --xram-size $(XRAM_SIZE) --iram-size 256 --model-small
41
42 # list of base object files
43 OBJECTS = main.rel usb.rel protocol.rel jtag.rel delay.rel USBJmpTb.rel
44 HEADERS = $(INCLUDE_DIR)/main.h \
45 $(INCLUDE_DIR)/usb.h \
46 $(INCLUDE_DIR)/protocol.h \
47 $(INCLUDE_DIR)/jtag.h \
48 $(INCLUDE_DIR)/delay.h \
49 $(INCLUDE_DIR)/reg_ezusb.h \
50 $(INCLUDE_DIR)/io.h \
51 $(INCLUDE_DIR)/msgtypes.h
52
53 # Disable all built-in rules.
54 .SUFFIXES:
55
56 # Targets which are executed even when identically named file is present.
57 .PHONY: all, clean
58
59 all: ulink_firmware.ihx
60 $(SIZE) ulink_firmware.ihx
61
62 ulink_firmware.ihx: $(OBJECTS)
63 $(CC) -mmcs51 $(LDFLAGS) -o $@ $^
64
65 # Rebuild every C module (there are only 5 of them) if any header changes.
66 %.rel: $(SRC_DIR)/%.c $(HEADERS)
67 $(CC) -c $(CFLAGS) -mmcs51 -I$(INCLUDE_DIR) -o $@ $<
68
69 %.rel: $(SRC_DIR)/%.a51
70 $(AS) -lsgo $@ $<
71
72 clean:
73 rm -f *.asm *.lst *.rel *.rst *.sym *.ihx *.lk *.map *.mem
74
75 hex: ulink_firmware.ihx
76 $(PACKIHX) ulink_firmware.ihx > ulink_firmware.hex

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)