mirror of
https://github.com/saymrwulf/pulp-runtime.git
synced 2026-11-18 08:54:44 +00:00
pulp-runtime: Add srec generation
This commit is contained in:
parent
570f8d4404
commit
f58e395b1b
6 changed files with 15 additions and 1 deletions
|
|
@ -13,10 +13,12 @@ platform ?= rtl
|
||||||
ifdef PULP_RUNTIME_GCC_TOOLCHAIN
|
ifdef PULP_RUNTIME_GCC_TOOLCHAIN
|
||||||
PULP_CC := $(PULP_RUNTIME_GCC_TOOLCHAIN)/bin/$(PULP_CC)
|
PULP_CC := $(PULP_RUNTIME_GCC_TOOLCHAIN)/bin/$(PULP_CC)
|
||||||
PULP_LD := $(PULP_RUNTIME_GCC_TOOLCHAIN)/bin/$(PULP_LD)
|
PULP_LD := $(PULP_RUNTIME_GCC_TOOLCHAIN)/bin/$(PULP_LD)
|
||||||
|
PULP_OBJCOPY := $(PULP_RUNTIME_GCC_TOOLCHAIN)/bin/$(PULP_OBJCOPY)
|
||||||
else
|
else
|
||||||
ifdef PULP_RISCV_GCC_TOOLCHAIN
|
ifdef PULP_RISCV_GCC_TOOLCHAIN
|
||||||
PULP_CC := $(PULP_RISCV_GCC_TOOLCHAIN)/bin/$(PULP_CC)
|
PULP_CC := $(PULP_RISCV_GCC_TOOLCHAIN)/bin/$(PULP_CC)
|
||||||
PULP_LD := $(PULP_RISCV_GCC_TOOLCHAIN)/bin/$(PULP_LD)
|
PULP_LD := $(PULP_RISCV_GCC_TOOLCHAIN)/bin/$(PULP_LD)
|
||||||
|
PULP_OBJCOPY := $(PULP_RISCV_GCC_TOOLCHAIN)/bin/$(PULP_OBJCOPY)
|
||||||
else
|
else
|
||||||
$(warning "Warning: Neither PULP_RUNTIME_GCC_TOOLCHAIN nor PULP_RISCV_GCC_TOOLCHAIN is set.\
|
$(warning "Warning: Neither PULP_RUNTIME_GCC_TOOLCHAIN nor PULP_RISCV_GCC_TOOLCHAIN is set.\
|
||||||
Using defaults.")
|
Using defaults.")
|
||||||
|
|
@ -213,13 +215,20 @@ $(TARGET_BUILD_DIR)/$(1)/$(1): $(PULP_APP_OBJS_$(1))
|
||||||
$(V)mkdir -p `dirname $$@`
|
$(V)mkdir -p `dirname $$@`
|
||||||
$(V)$(PULP_LD) -o $$@ $$^ -MMD -MP $(PULP_APP_LDFLAGS_$(1))
|
$(V)$(PULP_LD) -o $$@ $$^ -MMD -MP $(PULP_APP_LDFLAGS_$(1))
|
||||||
|
|
||||||
|
$(TARGET_BUILD_DIR)/$(1)/$(1).srec: $(TARGET_BUILD_DIR)/$(1)/$(1)
|
||||||
|
@echo "OBJCOPY $$@"
|
||||||
|
$(V)mkdir -p `dirname $$@`
|
||||||
|
$(V)$(PULP_OBJCOPY) -O srec $$^ $$@
|
||||||
|
|
||||||
$(TARGET_INSTALL_DIR)/bin/$(1): $(TARGET_BUILD_DIR)/$(1)/$(1)
|
$(TARGET_INSTALL_DIR)/bin/$(1): $(TARGET_BUILD_DIR)/$(1)/$(1)
|
||||||
@echo "CP $$@"
|
@echo "CP $$@"
|
||||||
$(V)mkdir -p `dirname $$@`
|
$(V)mkdir -p `dirname $$@`
|
||||||
$(V)cp $$< $$@
|
$(V)cp $$< $$@
|
||||||
|
|
||||||
TARGETS += $(TARGET_BUILD_DIR)/$(1)/$(1)
|
TARGETS += $(TARGET_BUILD_DIR)/$(1)/$(1)
|
||||||
|
TARGETS += $(TARGET_BUILD_DIR)/$(1)/$(1).srec
|
||||||
INSTALL_TARGETS += $(TARGET_INSTALL_DIR)/bin/$(1)
|
INSTALL_TARGETS += $(TARGET_INSTALL_DIR)/bin/$(1)
|
||||||
|
INSTALL_TARGETS += $(TARGET_INSTALL_DIR)/bin/$(1).srec
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ PULP_CC = riscv32-unknown-elf-gcc
|
||||||
PULP_AR ?= riscv32-unknown-elf-ar
|
PULP_AR ?= riscv32-unknown-elf-ar
|
||||||
PULP_LD ?= riscv32-unknown-elf-gcc
|
PULP_LD ?= riscv32-unknown-elf-gcc
|
||||||
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
||||||
|
PULP_OBJCOPY ?= riscv32-unknown-elf-objcopy
|
||||||
|
|
||||||
fc/archi=riscv
|
fc/archi=riscv
|
||||||
pe/archi=riscv
|
pe/archi=riscv
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ PULP_CC = riscv32-unknown-elf-gcc
|
||||||
PULP_AR ?= riscv32-unknown-elf-ar
|
PULP_AR ?= riscv32-unknown-elf-ar
|
||||||
PULP_LD ?= riscv32-unknown-elf-gcc
|
PULP_LD ?= riscv32-unknown-elf-gcc
|
||||||
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
||||||
|
PULP_OBJCOPY ?= riscv32-unknown-elf-objcopy
|
||||||
|
|
||||||
fc/archi=riscv
|
fc/archi=riscv
|
||||||
pe/archi=riscv
|
pe/archi=riscv
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ PULP_CC = riscv32-unknown-elf-gcc
|
||||||
PULP_AR ?= riscv32-unknown-elf-ar
|
PULP_AR ?= riscv32-unknown-elf-ar
|
||||||
PULP_LD ?= riscv32-unknown-elf-gcc
|
PULP_LD ?= riscv32-unknown-elf-gcc
|
||||||
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
||||||
|
PULP_OBJCOPY ?= riscv32-unknown-elf-objcopy
|
||||||
|
|
||||||
fc/archi=riscv
|
fc/archi=riscv
|
||||||
pe/archi=riscv
|
pe/archi=riscv
|
||||||
|
|
@ -41,4 +42,4 @@ PULP_SRCS += kernel/chips/marsellus/soc.c
|
||||||
|
|
||||||
|
|
||||||
include $(PULPRT_HOME)/rules/pulpos/configs/default.mk
|
include $(PULPRT_HOME)/rules/pulpos/configs/default.mk
|
||||||
include $(PULPRT_HOME)/rules/pulpos/default_rules.mk
|
include $(PULPRT_HOME)/rules/pulpos/default_rules.mk
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ PULP_CC = riscv32-unknown-elf-gcc
|
||||||
PULP_AR ?= riscv32-unknown-elf-ar
|
PULP_AR ?= riscv32-unknown-elf-ar
|
||||||
PULP_LD ?= riscv32-unknown-elf-gcc
|
PULP_LD ?= riscv32-unknown-elf-gcc
|
||||||
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
||||||
|
PULP_OBJCOPY ?= riscv32-unknown-elf-objcopy
|
||||||
|
|
||||||
fc/archi=riscv
|
fc/archi=riscv
|
||||||
pe/archi=riscv
|
pe/archi=riscv
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ PULP_CC = riscv32-unknown-elf-gcc
|
||||||
PULP_AR ?= riscv32-unknown-elf-ar
|
PULP_AR ?= riscv32-unknown-elf-ar
|
||||||
PULP_LD ?= riscv32-unknown-elf-gcc
|
PULP_LD ?= riscv32-unknown-elf-gcc
|
||||||
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
||||||
|
PULP_OBJCOPY ?= riscv32-unknown-elf-objcopy
|
||||||
|
|
||||||
fc/archi=riscv
|
fc/archi=riscv
|
||||||
pe/archi=riscv
|
pe/archi=riscv
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue