1
0
mirror of https://git.code.sf.net/p/openocd/code synced 2024-11-25 15:46:25 +00:00
openocd/contrib/loaders/reset/espressif/common.mk
Erhan Kurubas 7e8ea96345 loaders/reset/espressif: replace the GPL-2.0-or-later license tag
Replace the FSF boilerplate with the SPDX tag.

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: Iddccae2bd8906a3587a2aa2684124356a340fc74
Reviewed-on: https://review.openocd.org/c/openocd/+/7105
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-15 13:23:28 +00:00

41 lines
803 B
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
# ESP32 Makefile to compile the SoC reset program
# Copyright (C) 2022 Espressif Systems Ltd.
# Pass V=1 to see the commands being executed by make
ifneq ("$(V)","1")
Q = @
endif
BIN2C = ../../../../../src/helper/bin2char.sh
APP = cpu_reset_handler
BUILD_DIR = build
APP_OBJ = $(BUILD_DIR)/$(APP).o
APP_BIN = $(BUILD_DIR)/$(APP)_code.bin
APP_CODE = $(APP)_code.inc
CFLAGS += -mtext-section-literals
.PHONY: all cleanxten
all: $(BUILD_DIR) $(APP_OBJ) $(APP_CODE)
$(BUILD_DIR):
$(Q) mkdir $@
$(APP_OBJ): $(SRCS)
@echo " CC $^ -> $@"
$(Q) $(CROSS)gcc -c $(CFLAGS) -o $@ $^
$(APP_CODE): $(APP_OBJ)
@echo " CC $^ -> $@"
$(Q) $(CROSS)objcopy -O binary -j.text $^ $(APP_BIN)
$(Q) $(BIN2C) < $(APP_BIN) > $@
clean:
$(Q) rm -rf $(BUILD_DIR)