diff --git a/arch/risc-v/src/fe310/Make.defs b/arch/risc-v/src/fe310/Make.defs index 6b19843153..ba30a47818 100644 --- a/arch/risc-v/src/fe310/Make.defs +++ b/arch/risc-v/src/fe310/Make.defs @@ -39,7 +39,7 @@ CHIP_ASRCS = fe310_head.S up_syscall.S # Specify C code within the common directory to be included CMN_CSRCS += up_initialize.c up_swint.c -CMN_CSRCS += up_allocateheap.c up_createstack.c up_dumpstate.c up_exit.c +CMN_CSRCS += up_allocateheap.c up_createstack.c up_exit.c CMN_CSRCS += up_assert.c up_blocktask.c up_copystate.c up_initialstate.c CMN_CSRCS += up_interruptcontext.c up_modifyreg32.c up_puts.c CMN_CSRCS += up_releasepending.c up_reprioritizertr.c diff --git a/arch/risc-v/src/gap8/Make.defs b/arch/risc-v/src/gap8/Make.defs index 6f83a0064b..04a676ed8d 100644 --- a/arch/risc-v/src/gap8/Make.defs +++ b/arch/risc-v/src/gap8/Make.defs @@ -51,7 +51,7 @@ ASARCHCPUFLAGS += -march=rv32imcxgap8 -mPE=8 -mFC=1 -D__riscv__ -D__pulp__ -D__G # Specify C code within the common directory to be included CMN_CSRCS += up_initialize.c up_swint.c -CMN_CSRCS += up_createstack.c up_dumpstate.c up_exit.c +CMN_CSRCS += up_createstack.c up_exit.c CMN_CSRCS += up_assert.c up_blocktask.c up_copystate.c up_initialstate.c CMN_CSRCS += up_interruptcontext.c up_releasepending.c up_reprioritizertr.c CMN_CSRCS += up_releasestack.c up_stackframe.c up_sigdeliver.c diff --git a/arch/risc-v/src/nr5m100/Make.defs b/arch/risc-v/src/nr5m100/Make.defs index 02187de74a..0a162f2444 100644 --- a/arch/risc-v/src/nr5m100/Make.defs +++ b/arch/risc-v/src/nr5m100/Make.defs @@ -53,7 +53,7 @@ ASARCHCPUFLAGS += -march=RV32IMXcustom # Specify C code within the common directory to be included CMN_CSRCS += up_initialize.c up_swint.c -CMN_CSRCS += up_allocateheap.c up_createstack.c up_dumpstate.c up_exit.c up_idle.c +CMN_CSRCS += up_allocateheap.c up_createstack.c up_exit.c up_idle.c CMN_CSRCS += up_assert.c up_blocktask.c up_copystate.c up_initialstate.c CMN_CSRCS += up_interruptcontext.c up_releasepending.c up_reprioritizertr.c CMN_CSRCS += up_releasestack.c up_stackframe.c up_schedulesigaction.c up_sigdeliver.c diff --git a/arch/risc-v/src/rv32im/up_dumpstate.c b/arch/risc-v/src/rv32im/up_dumpstate.c deleted file mode 100644 index c4f1fb9a8f..0000000000 --- a/arch/risc-v/src/rv32im/up_dumpstate.c +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** - * arch/risc-v/src/rv32im/up_dumpstate.c - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Updated for RISC-V: - * - * Copyright (C) 2016 Ken Pettit. All rights reserved. - * Author: Ken Pettit - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include "up_arch.h" -#include "sched/sched.h" -#include "up_internal.h" - diff --git a/boards/risc-v/gap8/gapuino/src/Makefile b/boards/risc-v/gap8/gapuino/src/Makefile index 720647ea76..8b386c8ae4 100644 --- a/boards/risc-v/gap8/gapuino/src/Makefile +++ b/boards/risc-v/gap8/gapuino/src/Makefile @@ -1,51 +1,6 @@ -include $(TOPDIR)/Make.defs -ASRCS = -AOBJS = $(ASRCS:.S=$(OBJEXT)) - CSRCS = gapuino_appinit.c gapuino_sysinit.c -COBJS = $(CSRCS:.c=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - CFLAGS += -I$(ARCH_SRCDIR) -I$(ARCH_SRCDIR)\common -I$(ARCH_SRCDIR)\rv32im -else -ifeq ($(WINTOOL),y) - CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" -else - CFLAGS += -I$(ARCH_SRCDIR)/$(CONFIG_ARCH_CHIP) -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/rv32im -endif -endif - -all: libboard$(LIBEXT) - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -libboard$(LIBEXT): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, libboard$(LIBEXT)) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(TOPDIR)/boards/Board.mk diff --git a/boards/risc-v/nr5m100/nr5m100-nexys4/src/Makefile b/boards/risc-v/nr5m100/nr5m100-nexys4/src/Makefile index e4eb8091b7..12d2036442 100644 --- a/boards/risc-v/nr5m100/nr5m100-nexys4/src/Makefile +++ b/boards/risc-v/nr5m100/nr5m100-nexys4/src/Makefile @@ -35,56 +35,10 @@ -include $(TOPDIR)/Make.defs -ASRCS = -AOBJS = $(ASRCS:.S=$(OBJEXT)) - CSRCS = nr5_appinit.c nr5_boot.c nr5_autoleds.c ifeq ($(CONFIG_ARCH_BOARD_NR5_CUSTOM_CLOCKCONFIG),y) CSRCS += nr5_clockconfig.c endif -COBJS = $(CSRCS:.c=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - CFLAGS += -I$(ARCH_SRCDIR) -I$(ARCH_SRCDIR)\common -I$(ARCH_SRCDIR)\rv32im -else -ifeq ($(WINTOOL),y) - CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \ - -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}" -else - CFLAGS += -I$(ARCH_SRCDIR)/$(CONFIG_ARCH_CHIP) -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/rv32im -endif -endif - -all: libboard$(LIBEXT) - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -libboard$(LIBEXT): $(OBJS) - $(call ARCHIVE, $@, $(OBJS)) - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, libboard$(LIBEXT)) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(TOPDIR)/boards/Board.mk