<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
<project>\r
- <configuration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.516870870" name="Debug">\r
- <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">\r
- <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>\r
- <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>\r
- <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
- <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-370325918343060407" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">\r
- <language-scope id="org.eclipse.cdt.core.gcc"/>\r
- <language-scope id="org.eclipse.cdt.core.g++"/>\r
- </provider>\r
- </extension>\r
- </configuration>\r
- <configuration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.1992646408" name="Release">\r
- <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">\r
- <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>\r
- <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>\r
- <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
- <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-364619458802839811" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">\r
- <language-scope id="org.eclipse.cdt.core.gcc"/>\r
- <language-scope id="org.eclipse.cdt.core.g++"/>\r
- </provider>\r
- </extension>\r
- </configuration>\r
+ \r
+ <configuration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.516870870" name="Debug">\r
+ \r
+ <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">\r
+ \r
+ <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>\r
+ \r
+ <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>\r
+ \r
+ <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
+ \r
+ <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="589632151712267266" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">\r
+ \r
+ <language-scope id="org.eclipse.cdt.core.gcc"/>\r
+ \r
+ <language-scope id="org.eclipse.cdt.core.g++"/>\r
+ \r
+ </provider>\r
+ \r
+ </extension>\r
+ \r
+ </configuration>\r
+ \r
+ <configuration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.1992646408" name="Release">\r
+ \r
+ <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">\r
+ \r
+ <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>\r
+ \r
+ <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>\r
+ \r
+ <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
+ \r
+ <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="602853956613322166" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">\r
+ \r
+ <language-scope id="org.eclipse.cdt.core.gcc"/>\r
+ \r
+ <language-scope id="org.eclipse.cdt.core.g++"/>\r
+ \r
+ </provider>\r
+ \r
+ </extension>\r
+ \r
+ </configuration>\r
+ \r
</project>\r
+++ /dev/null
-#\r
-# File: BuildEnvironment.mk\r
-# Copyright (c) 2019, Dornerworks Ltd.\r
-#\r
-\r
-BUILD_DIR = ./build\r
-CROSS_COMPILE_PREFIX = riscv32-unknown-elf\r
-\r
-SDK_DIR = ./freedom-e-sdk\r
-\r
-LINKER_SCRIPT = $(SDK_DIR)/env/freedom-e300-hifive1/flash.lds\r
-#-----------------------------------------------------------\r
-GCC = $(CROSS_COMPILE_PREFIX)-gcc\r
-OBJCOPY = $(CROSS_COMPILE_PREFIX)-objcopy\r
-OBJDUMP = $(CROSS_COMPILE_PREFIX)-objdump\r
-AR = $(CROSS_COMPILE_PREFIX)-ar\r
-RANLIB = $(CROSS_COMPILE_PREFIX)-ranlib\r
-GDB = $(CROSS_COMPILE_PREFIX)-gdb\r
-\r
-# if using the multi-arch (riscv64-unknown-elf-gcc):\r
-ARCH_FLAGS = -march=rv32imac -mabi=ilp32 -mcmodel=medany\r
-# Basic CFLAGS:\r
-CFLAGS = -Wall -Wextra -O0 -g3 -msmall-data-limit=8 -std=gnu11\r
-CFLAGS += -ffunction-sections -fdata-sections -fno-builtin-printf\r
-CFLAGS += -DDONT_USE_PLIC -DDONT_USE_M_TIME\r
-CFLAGS += -include sys/cdefs.h\r
-CFLAGS += $(ARCH_FLAGS)\r
-# These flags are for outputing *.d dependency files for make\r
-CFLAGS += -MT"$@" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)"\r
-\r
-ASMFLAGS = -O0 -g3\r
-ASMFLAGS += $(ARCH_FLAGS)\r
-ASMFLAGS += -DportasmHANDLE_INTERRUPT=handle_trap\r
-ASMFLAGS += -msmall-data-limit=8\r
-ASMFLAGS += -ffunction-sections -fdata-sections\r
-ASMFLAGS += -x assembler-with-cpp\r
-ASMFLAGS += -MT"$@" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)"\r
-\r
-# Linker arguments __________________________________________\r
-LDFLAGS := -Xlinker --gc-sections -Xlinker --defsym=__stack_size=1K\r
-LDFLAGS += -O0 -g3\r
-LDFLAGS += -ffunction-sections -fdata-sections --specs=nano.specs\r
-LDFLAGS += -nostartfiles\r
-LDFLAGS += -T $(LINKER_SCRIPT)\r
-LDFLAGS += -L../\r
-LDFLAGS += -Wl,--start-group -Wl,--end-group\r
-LDFLAGS += -Wl,--wrap=malloc -Wl,--wrap=free -Wl,--wrap=open -Wl,--wrap=lseek -Wl,--wrap=read -Wl,--wrap=write\r
-LDFLAGS += -Wl,--wrap=fstat -Wl,--wrap=stat -Wl,--wrap=close -Wl,--wrap=link -Wl,--wrap=unlink -Wl,--wrap=execve\r
-LDFLAGS += -Wl,--wrap=fork -Wl,--wrap=getpid -Wl,--wrap=kill -Wl,--wrap=wait -Wl,--wrap=isatty -Wl,--wrap=times\r
-LDFLAGS += -Wl,--wrap=sbrk -Wl,--wrap=_exit -Wl,--wrap=puts -Wl,--wrap=_malloc -Wl,--wrap=_free -Wl,--wrap=_open\r
-LDFLAGS += -Wl,--wrap=_lseek -Wl,--wrap=_read -Wl,--wrap=_write -Wl,--wrap=_fstat -Wl,--wrap=_stat -Wl,--wrap=_close\r
-LDFLAGS += -Wl,--wrap=_link -Wl,--wrap=_unlink -Wl,--wrap=_execve -Wl,--wrap=_fork -Wl,--wrap=_getpid -Wl,--wrap=_kill\r
-LDFLAGS += -Wl,--wrap=_wait -Wl,--wrap=_isatty -Wl,--wrap=_times -Wl,--wrap=_sbrk -Wl,--wrap=__exit -Wl,--wrap=_puts\r
+++ /dev/null
-#\r
-# File: Makefile\r
-# Copyright (c) 2019, Dornerworks Ltd.\r
-#\r
-\r
-PROJ_NAME ?= simple\r
-\r
-include BuildEnvironment.mk\r
-include FreeRTOS.mk\r
--include $(wildcard $(OUTDIR)/*.d)\r
-# Platform spcific settings for this application _____________________________________________\r
-\r
-ARCH = RISC-V\r
-ARCH_PORTABLE_INC = $(FREERTOS_SOURCE_DIR)/portable/GCC/$(ARCH)/\r
-ARCH_PORTABLE_SRC = $(FREERTOS_SOURCE_DIR)/portable/GCC/$(ARCH)/port.c\r
-ARCH_PORTABLE_ASM = $(FREERTOS_SOURCE_DIR)/portable/GCC/$(ARCH)/portASM.S\r
-\r
-SDK_SRC := \\r
- $(SDK_DIR)/libwrap/sys/_exit.c \\r
- $(SDK_DIR)/libwrap/sys/close.c \\r
- $(SDK_DIR)/libwrap/sys/execve.c \\r
- $(SDK_DIR)/libwrap/sys/fork.c \\r
- $(SDK_DIR)/libwrap/sys/fstat.c \\r
- $(SDK_DIR)/libwrap/sys/getpid.c \\r
- $(SDK_DIR)/libwrap/sys/isatty.c \\r
- $(SDK_DIR)/libwrap/sys/kill.c \\r
- $(SDK_DIR)/libwrap/sys/link.c \\r
- $(SDK_DIR)/libwrap/sys/lseek.c \\r
- $(SDK_DIR)/libwrap/sys/openat.c \\r
- $(SDK_DIR)/libwrap/sys/puts.c \\r
- $(SDK_DIR)/libwrap/sys/read.c \\r
- $(SDK_DIR)/libwrap/sys/sbrk.c \\r
- $(SDK_DIR)/libwrap/sys/stat.c \\r
- $(SDK_DIR)/libwrap/sys/times.c \\r
- $(SDK_DIR)/libwrap/sys/unlink.c \\r
- $(SDK_DIR)/libwrap/sys/wait.c \\r
- $(SDK_DIR)/libwrap/sys/write.c \\r
- $(SDK_DIR)/libwrap/stdlib/malloc.c \\r
- $(SDK_DIR)/libwrap/misc/write_hex.c \\r
- $(SDK_DIR)/env/freedom-e300-hifive1/init.c \\r
- $(SDK_DIR)/drivers/plic/plic_driver.c \\r
- $(SDK_DIR)/drivers/fe300prci/fe300prci_driver.c\r
-\r
-SDK_ASM := \\r
- $(SDK_DIR)/env/entry.S \\r
- $(SDK_DIR)/env/start.S\r
-SDK_OBJS := $(patsubst %.c,$(FREERTOS_BUILD_DIR)/%.o,$(notdir $(SDK_SRC)))\r
-SDK_OBJS += $(patsubst %.S,$(FREERTOS_BUILD_DIR)/%.o,$(notdir $(SDK_ASM)))\r
-VPATH += \\r
- $(SDK_DIR)/env \\r
- $(SDK_DIR)/env/freedom-e300-hifive1 \\r
- $(SDK_DIR)/libwrap/sys \\r
- $(SDK_DIR)/libwrap/misc \\r
- $(SDK_DIR)/libwrap/stdlib \\r
- $(SDK_DIR)/drivers/plic \\r
- $(SDK_DIR)/drivers/fe300prci\r
-\r
-PORT_OBJS := $(patsubst %.c,$(FREERTOS_BUILD_DIR)/%.o,$(notdir $(ARCH_PORTABLE_SRC)))\r
-PORT_OBJS += $(patsubst %.S,$(FREERTOS_BUILD_DIR)/%.o,$(notdir $(ARCH_PORTABLE_ASM)))\r
-FREERTOS_OBJS += $(PORT_OBJS) $(SDK_OBJS)\r
-VPATH += $(FREERTOS_SOURCE_DIR)/portable/GCC/$(ARCH)\r
-\r
-\r
-CFLAGS += -DportasmHANDLE_INTERRUPT=$(INTERRUPT_HANDLER)\r
-\r
-# Set up application source, include, and object files for compilation: ______________________\r
-APP_SRC_DIR = .\r
-APP_SRC = \\r
- $(APP_SRC_DIR)/main.c \\r
- $(APP_SRC_DIR)/blinky_demo/main_blinky.c \\r
- $(APP_SRC_DIR)/full_demo/main_full.c\r
-\r
-APP_ASM = \\r
- $(APP_SRC_DIR)/full_demo/RegTest.S\r
-\r
-APP_INCLUDES = \\r
- -I ./ \\r
- -I $(SDK_DIR)/include \\r
- -I $(SDK_DIR)/env/freedom-e300-hifive1 \\r
- -I $(SDK_DIR)/env \\r
- -I $(FREERTOS_INC) \\r
- -I $(ARCH_PORTABLE_INC) \\r
- -I $(FREERTOS_DIR)/Demo/Common/include\r
-\r
-APP_BUILD_DIR = $(BUILD_DIR)/app\r
-APP_OBJS := $(patsubst %.c,$(APP_BUILD_DIR)/%.o,$(notdir $(APP_SRC)))\r
-APP_OBJS += $(patsubst %.S,$(APP_BUILD_DIR)/%.o,$(notdir $(APP_ASM)))\r
-VPATH += \\r
- $(APP_SRC_DIR)/blinky_demo \\r
- $(APP_SRC_DIR)/full_demo \\r
- $(APP_SRC_DIR)\r
-\r
-DEMO_COMMON_SRC = \\r
- $(FREERTOS_DIR)/Demo/Common/Minimal/EventGroupsDemo.c \\r
- $(FREERTOS_DIR)/Demo/Common/Minimal/TimerDemo.c \\r
- $(FREERTOS_DIR)/Demo/Common/Minimal/TaskNotify.c \\r
- $(FREERTOS_DIR)/Demo/Common/Minimal/GenQTest.c \\r
- $(FREERTOS_DIR)/Demo/Common/Minimal/blocktim.c \\r
- $(FREERTOS_DIR)/Demo/Common/Minimal/dynamic.c \\r
- $(FREERTOS_DIR)/Demo/Common/Minimal/recmutex.c\r
-\r
-DEMO_COMMON_OBJS := $(patsubst %.c,$(APP_BUILD_DIR)/%.o,$(notdir $(DEMO_COMMON_SRC)))\r
-VPATH += $(FREERTOS_DIR)/Demo/Common/Minimal\r
-\r
-OUT_ELF = $(BUILD_DIR)/FreeRTOS-$(PROJ_NAME).elf\r
-\r
-# Need to tell FreeRTOS where to find the FreeRTOSConfig.h __________________________________\r
-FREERTOS_INCLUDES += \\r
- -I ./ \\r
- -I $(ARCH_PORTABLE_INC) \\r
- -I $(SDK_DIR)/include \\r
- -I $(SDK_DIR)/env/freedom-e300-hifive1 \\r
- -I $(SDK_DIR)/env \\r
- -I $(SDK_DIR)/drivers \\r
- -I $(FREERTOS_DIR)/Demo/Common/include \\r
- -I $(FREERTOS_SOURCE_DIR)/portable/GCC/RISC-V/chip_specific_extensions/RV32I_CLINT_no_extensions\r
-\r
-# List of object files to compile for the system:\r
-OUT_OBJS = \\r
- $(APP_OBJS) \\r
- $(DEMO_COMMON_OBJS) \\r
- $(FREERTOS_OBJS)\r
-\r
-BUILD_DIRECTORIES = \\r
- $(APP_BUILD_DIR) \\r
- $(FREERTOS_BUILD_DIR)\r
-\r
-LDFLAGS += -Wl,-Map,"$(BUILD_DIR)/$(PROJ_NAME).map"\r
-\r
-.PHONY: debug clean app_compile debug-app frtos_compile print-info out_elf sim-qemu gdb\r
-all: directories $(OUT_OBJS) $(OUT_ELF)\r
-directories: $(BUILD_DIRECTORIES)\r
-app_compile: directories $(APP_OBJS)\r
-frtos_compile: directories $(FREERTOS_OBJS)\r
-out_elf: directories $(OUT_ELF)\r
-\r
-# Notes\r
-# Each "Module" needs\r
-# - Lists of source files\r
-# - Source Directory(ies)\r
-# - Include Directory List (with -I prepending each entry)\r
-# - Build Directory\r
-# - Object list\r
-# - OBJS = $(patsubst %.c,$(MODULE_BUILD_DIR)/%.o,$(notdir $(MODULE_SRC)))\r
-# - Add source direcories to VPATH\r
-# In the master make file\r
-# - Module build directory must be created\r
-# - Object Rules can be done with\r
-# - $(MODULE_BUILD_DIR)/%.o : %.c\r
-\r
-# Compile Object Files ____________________________________________________________________\r
-$(APP_BUILD_DIR)/%.o : %.c\r
- @echo "[APP Objects] : $@ ______________________________________________________________"\r
- @echo "Building: $<"\r
- $(GCC) $(CFLAGS) $(APP_INCLUDES) -o $@ -c $<\r
- @echo "Finished Building: $<"\r
-\r
-$(APP_BUILD_DIR)/%.o : %.S\r
- @echo "[APP Objects] : $@ ______________________________________________________________"\r
- @echo "Building: $<"\r
- $(GCC) $(ASMFLAGS) $(APP_INCLUDES) $(FREERTOS_INCLUDES) -o $@ -c $<\r
- @echo "Finished Building: $<"\r
-\r
-$(FREERTOS_BUILD_DIR)/%.o : %.c\r
- @echo "[FreeRTOS Objects] : $@ __________________________________________________________"\r
- @echo "Building: $<"\r
- $(GCC) $(CFLAGS) $(FREERTOS_INCLUDES) -o $@ -c $<\r
- @echo "Finished Building: $<"\r
-\r
-$(FREERTOS_BUILD_DIR)/%.o : %.S\r
- @echo "[FreeRTOS Objects] : $@ __________________________________________________________"\r
- @echo "Building: $<"\r
- $(GCC) $(ASMFLAGS) $(FREERTOS_INCLUDES) -o $@ -c $<\r
- @echo "Finished Building: $<"\r
-\r
-# Generate ELF ___________________________________________________________________________\r
-$(OUT_ELF): $(OUT_OBJS)\r
- @echo '___________________________________________________________________________________'\r
- @echo 'Building target: $@'\r
- @echo '_______________________________'\r
- $(GCC) $(LDFLAGS) $(LDOPTS) -o $@ $(OUT_OBJS) $(LIB_FLAGS)\r
- @echo 'Finished building target: $@'\r
- @echo ' '\r
-\r
-.PHONY: build_lib\r
-\r
-$(BUILD_DIRECTORIES):\r
- mkdir -p $@\r
-\r
-clean:\r
- rm -rv $(BUILD_DIR)\r
-\r
-sim-qemu: $(OUT_ELF)\r
- qemu-system-riscv32 -kernel $^ -S -s -machine sifive_e\r
-\r
-gdb: $(OUT_ELF)\r
- $(GDB) -iex "set mem inaccessible-by-default off" -iex "set arch riscv:rv32" -iex "set riscv use_compressed_breakpoint off"\r