contrib/firmware: add new adapter ANGIE's firmware/bitstream code
[openocd.git] / contrib / firmware / angie / c / Makefile
1 # SPDX-License-Identifier: GPL-2.0-or-later
2 #****************************************************************************
3 # File : Makefile *
4 # Contents : Code for NanoXplore USB-JTAG ANGIE adapter hardware. *
5 # Based on openULINK project by: Martin Schmoelzer. *
6 # Copyright 2023, Ahmed Errached BOUDJELIDA, NanoXplore SAS. *
7 # <aboudjelida@nanoxplore.com> *
8 # <ahmederrachedbjld@gmail.com> *
9 # ***************************************************************************/
10
11 # Define the name of tools.
12 PREFIX =
13
14 # Small Device C Compiler: http://sdcc.sourceforge.net/
15 CC = $(PREFIX)sdcc
16
17 # 8051 assembler, part of the SDCC software package.
18 AS = $(PREFIX)sdas8051
19
20 # SDCC produces quite messy Intel HEX files. This tool is be used to re-format
21 # those files. It is not required for the firmware download functionality in
22 # the OpenOCD driver, but the resulting file is smaller.
23 PACKIHX = $(PREFIX)packihx
24
25 # GNU binutils size. Used to print the size of the IHX file generated by SDCC.
26 SIZE = size
27
28 # Source and header directories.
29 SRC_DIR = src
30 INCLUDE_DIR = include
31
32 CODE_SIZE = 0x3C00
33 XRAM_LOC = 0x3C00
34 XRAM_SIZE = 0x0400
35
36 CFLAGS = --std-sdcc99 --opt-code-size --model-small
37 LDFLAGS = --code-loc 0x0000 --code-size $(CODE_SIZE) --xram-loc $(XRAM_LOC) \
38 --xram-size $(XRAM_SIZE) --iram-size 256 --model-small
39
40 # list of base object files
41 OBJECTS = main.rel usb.rel protocol.rel jtag.rel delay.rel USBJmpTb.rel serial.rel gpif.rel
42 HEADERS = $(INCLUDE_DIR)/usb.h \
43 $(INCLUDE_DIR)/protocol.h \
44 $(INCLUDE_DIR)/jtag.h \
45 $(INCLUDE_DIR)/delay.h \
46 $(INCLUDE_DIR)/reg_ezusb.h \
47 $(INCLUDE_DIR)/io.h \
48 $(INCLUDE_DIR)/serial.h \
49 $(INCLUDE_DIR)/fx2macros.h \
50 $(INCLUDE_DIR)/msgtypes.h
51
52 # Disable all built-in rules.
53 .SUFFIXES:
54
55 # Targets which are executed even when identically named file is present.
56 .PHONY: all, clean
57
58 all: angie_firmware.ihx
59 $(SIZE) angie_firmware.ihx
60
61 angie_firmware.ihx: $(OBJECTS)
62 $(CC) -mmcs51 $(LDFLAGS) -o $@ $^
63
64 # Rebuild every C module (there are only 5 of them) if any header changes.
65 %.rel: $(SRC_DIR)/%.c $(HEADERS)
66 $(CC) -c $(CFLAGS) -mmcs51 -I$(INCLUDE_DIR) -o $@ $<
67
68 %.rel: $(SRC_DIR)/%.a51
69 $(AS) -lsgo $@ $<
70
71 clean:
72 rm -f *.asm *.lst *.rel *.rst *.sym *.ihx *.lk *.map *.mem
73
74 bin: angie_firmware.ihx
75 makebin -p angie_firmware.ihx angie_firmware.bin

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)