mirror of
https://github.com/saymrwulf/pulp-runtime.git
synced 2026-06-08 00:23:11 +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
|
||||
PULP_CC := $(PULP_RUNTIME_GCC_TOOLCHAIN)/bin/$(PULP_CC)
|
||||
PULP_LD := $(PULP_RUNTIME_GCC_TOOLCHAIN)/bin/$(PULP_LD)
|
||||
PULP_OBJCOPY := $(PULP_RUNTIME_GCC_TOOLCHAIN)/bin/$(PULP_OBJCOPY)
|
||||
else
|
||||
ifdef PULP_RISCV_GCC_TOOLCHAIN
|
||||
PULP_CC := $(PULP_RISCV_GCC_TOOLCHAIN)/bin/$(PULP_CC)
|
||||
PULP_LD := $(PULP_RISCV_GCC_TOOLCHAIN)/bin/$(PULP_LD)
|
||||
PULP_OBJCOPY := $(PULP_RISCV_GCC_TOOLCHAIN)/bin/$(PULP_OBJCOPY)
|
||||
else
|
||||
$(warning "Warning: Neither PULP_RUNTIME_GCC_TOOLCHAIN nor PULP_RISCV_GCC_TOOLCHAIN is set.\
|
||||
Using defaults.")
|
||||
|
|
@ -213,13 +215,20 @@ $(TARGET_BUILD_DIR)/$(1)/$(1): $(PULP_APP_OBJS_$(1))
|
|||
$(V)mkdir -p `dirname $$@`
|
||||
$(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)
|
||||
@echo "CP $$@"
|
||||
$(V)mkdir -p `dirname $$@`
|
||||
$(V)cp $$< $$@
|
||||
|
||||
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).srec
|
||||
|
||||
endef
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ PULP_CC = riscv32-unknown-elf-gcc
|
|||
PULP_AR ?= riscv32-unknown-elf-ar
|
||||
PULP_LD ?= riscv32-unknown-elf-gcc
|
||||
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
||||
PULP_OBJCOPY ?= riscv32-unknown-elf-objcopy
|
||||
|
||||
fc/archi=riscv
|
||||
pe/archi=riscv
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ PULP_CC = riscv32-unknown-elf-gcc
|
|||
PULP_AR ?= riscv32-unknown-elf-ar
|
||||
PULP_LD ?= riscv32-unknown-elf-gcc
|
||||
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
||||
PULP_OBJCOPY ?= riscv32-unknown-elf-objcopy
|
||||
|
||||
fc/archi=riscv
|
||||
pe/archi=riscv
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ PULP_CC = riscv32-unknown-elf-gcc
|
|||
PULP_AR ?= riscv32-unknown-elf-ar
|
||||
PULP_LD ?= riscv32-unknown-elf-gcc
|
||||
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
||||
PULP_OBJCOPY ?= riscv32-unknown-elf-objcopy
|
||||
|
||||
fc/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/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_LD ?= riscv32-unknown-elf-gcc
|
||||
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
||||
PULP_OBJCOPY ?= riscv32-unknown-elf-objcopy
|
||||
|
||||
fc/archi=riscv
|
||||
pe/archi=riscv
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ PULP_CC = riscv32-unknown-elf-gcc
|
|||
PULP_AR ?= riscv32-unknown-elf-ar
|
||||
PULP_LD ?= riscv32-unknown-elf-gcc
|
||||
PULP_OBJDUMP ?= riscv32-unknown-elf-objdump
|
||||
PULP_OBJCOPY ?= riscv32-unknown-elf-objcopy
|
||||
|
||||
fc/archi=riscv
|
||||
pe/archi=riscv
|
||||
|
|
|
|||
Loading…
Reference in a new issue