Commit ef9dd102 authored by Federico Vaga's avatar Federico Vaga

Merge branch 'develop'

parents aaadc469 3462229e
......@@ -136,10 +136,11 @@ $(build_output).bin: $(build_output).elf
$(SIZE) $(build_output).elf
$(build_output).bram: $(build_output).bin
ifeq (0 , $(shell test -e $(MEM_INIT_GEN); echo $$?))
$(MEM_INIT_GEN) -i $(build_output).bin > $(build_output).bram
$(build_output).bram: $(build_output).bin
$(MEM_INIT_GEN) -i $(build_output).bin > $(build_output).bram
else
@echo "Cannot generate \"bram\" file. Missing $(MEM_INIT_GEN)" > /dev/stderr
endif
$(BUILDDIR)/urv/emulate.o: urv/emulate.c
${CC} $(DEPFLAGS) $(CFLAGS) -march=rv32i -c $< -o $@
......
......@@ -6,7 +6,7 @@
#ifndef __FW_{{short_name_capital}}_COMMON_H__
#define __FW_{{short_name_capital}}_COMMON_H__
#include <mockturtle-rt-smem.h>
#include <mockturtle-rt.h>
#include <{{short_name}}-common.h>
#endif
OBJS = fw-{{short_name}}.o
OBJS += # add other object files that you need
OUTPUT = fw-{{short_name}}
TRTL ?= ../../../mockturtle
TRTL ?=
TRTL_SW = $(TRTL)/software
TRTL_FW = $(TRTL_SW)/firmware
EXTRA_CFLAGS += -I../../include
EXTRA_CFLAGS += -I../common
all:
include $(TRTL_SW)/firmware/Makefile
# Redirect all rules to MockTurtle
%:
$(MAKE) -C $(TRTL_FW) M=$(shell /bin/pwd) $@
OBJS = fw-{{short_name}}.o
OBJS += # add other object files that you need
OUTPUT = fw-{{short_name}}
OBJDIR += common
OBJS += # add other object files from common directory, if any
EXTRA_CFLAGS += -I$(src)/../../include
EXTRA_CFLAGS += -I$(src)/../common
vpath %.c $(src)/../
......@@ -7,6 +7,7 @@
#include <string.h>
#include <mockturtle-framework.h>
#include <{{short_name}}-common.h>
#include <fw-{{short_name}}-common.h>
enum hmq_slot_name {
{{short_name_capital}}_CMD = 0,
......
......@@ -85,6 +85,7 @@ def tpc_apply_value_to_template(directory, table):
"software/firmware/Makefile",
"software/firmware/fw-01/Makefile",
"software/firmware/fw-01/Kconfig",
"software/firmware/fw-01/TBuild",
"software/firmware/fw-01/configs/mt_defconfig",
"doc/Makefile",
"doc/doxygen-project-config",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment