diff --git a/Makefile b/Makefile index 8bac5b431..472ff7b6b 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ PULP_BRIDGE_PATH = $(GAP_SDK_HOME)/tools/pulp_tools/pulp-debug-bridge ifeq ($(TARGET_CHIP_FAMILY), GAP8) sdk: all autotiler nntool -all: pulp-os tools gvsoc flasher docs littlefs.build openocd +all: pulp-os tools gvsoc flasher docs littlefs openocd clean: $(RM) $(TARGET_INSTALL_DIR) @@ -58,7 +58,7 @@ clean: else sdk: all autotiler -all: pulp-os gvsoc littlefs.build +all: pulp-os gvsoc littlefs clean: $(RM) $(TARGET_INSTALL_DIR) @@ -137,7 +137,7 @@ LFS_MAKEFILE = $(LFS_BUILD_DIR)/Makefile #include $(LFS_MAKEFILE) -littlefs.build: $(LFS_MAKEFILE) +littlefs: $(LFS_MAKEFILE) make -C $(LFS_BUILD_DIR) all install $(LFS_MAKEFILE): $(LFS_DIR)/CMakeLists.txt | $(LFS_BUILD_DIR) @@ -146,74 +146,6 @@ $(LFS_MAKEFILE): $(LFS_DIR)/CMakeLists.txt | $(LFS_BUILD_DIR) $(LFS_BUILD_DIR): $(MKDIR) -p $@ -littlefs.checkout: - git submodule update --init tools/littlefs - -littlefs.all: littlefs.checkout littlefs.build - - - -plptest.checkout: - git submodule update --init tools/plptest - -plptest.build: - if [ -e tools/plptest ]; then cd tools/plptest && make build; fi - -plptest.all: plptest.checkout plptest.build - - - -gap-configs.checkout: - git submodule update --init tools/gap-configs - -gap-configs.all: gap-configs.checkout - - - -gapy.checkout: gap-configs.checkout - git submodule update --init tools/gapy - -gapy.all: gapy.checkout gap-configs.all - - - -tests.checkout: - git submodule update --init tests/pmsis_tests tests/bsp_tests - - -pulpos.checkout: - git submodule update --init rtos/pulp/pulpos-2 rtos/pulp/pulpos-2_gap8 rtos/pulp/pulpos-2_gap9 rtos/pulp/gap_archi rtos/pmsis/pmsis_api rtos/pmsis/pmsis_bsp - -pulpos.all: pulpos.checkout - - -pmsis-bsp.checkout: - git submodule update --init rtos/pmsis/pmsis-bsp - -pmsis-bsp.build: - $(MAKE) -C $(GAP_SDK_HOME)/rtos/pmsis/pmsis_bsp all - -pmsis-bsp.all: pmsis-bsp.checkout pmsis-bsp.build - - -pulprt.checkout: - git submodule update --init rtos/pulp/pulp-os - -pulprt.build: - $(MAKE) -C $(GAP_SDK_HOME)/rtos/pulp build.pulprt - -pulprt.all: pulprt.checkout pulprt.build - - - -gvsoc.checkout: - git submodule update --init gvsoc/gvsoc - -gvsoc.build: - make -C gvsoc/gvsoc build BUILD_DIR=$(BUILD_DIR)/gvsoc INSTALL_DIR=$(INSTALL_DIR) TARGET_INSTALL_DIR=$(GAP_SDK_HOME)/install - -gvsoc.all: gvsoc.checkout gvsoc.build - plptest.checkout: @@ -221,7 +153,6 @@ plptest.checkout: plptest.build: if [ -e tools/plptest ]; then cd tools/plptest && make build; fi - cd tools/plptest && make build plptest.all: plptest.checkout plptest.build diff --git a/tools/rules/freeRTOS_rules.mk b/tools/rules/freeRTOS_rules.mk index 8f9485c94..8eaa549c2 100644 --- a/tools/rules/freeRTOS_rules.mk +++ b/tools/rules/freeRTOS_rules.mk @@ -12,7 +12,7 @@ ifeq ($(VERBOSE), 1) TRC_MAKE= endif # VERBOSE -platform ?= board +platform ?= gapuino chip=$(TARGET_CHIP_FAMILY) TARGET_CHIP_VERSION= @@ -56,8 +56,8 @@ FREERTOS_FLAGS += -D__riscv__ -D__$(chip)__ \ export PULP_CURRENT_CONFIG_ARGS += $(CONFIG_OPT) # Main stack size in Bytes. -MAIN_STACK_SIZE ?= 1024 -MAIN_APP_STACK_SIZE = $(MAIN_STACK_SIZE) +MAIN_STACK_SIZE ?= 1024 +FREERTOS_FLAGS += -DMAIN_STACK_SIZE=$(MAIN_STACK_SIZE) # Option to use cluster features FEATURE_FLAGS = -DFEATURE_CLUSTER=1 @@ -85,8 +85,8 @@ ifeq ($(platform), gvsoc) GVSOC_FILES_CLEAN = all_state.txt core_state.txt rt_state.txt \ efuse_preload.data plt_config.json stimuli \ tx_uart.log -FREERTOS_FLAGS += -D__PLATFORM_GVSOC__ #-DPRINTF_RTL -io = rtl +FREERTOS_FLAGS += -D__PLATFORM_GVSOC__ +FREERTOS_FLAGS += -DPRINTF_RTL # FPGA else ifeq ($(platform), fpga) @@ -97,7 +97,6 @@ io ?= host else ifeq ($(platform), rtl) FREERTOS_FLAGS += -D__PLATFORM_RTL__ FREERTOS_FLAGS += -DPRINTF_RTL -io = rtl endif # platform # Choose Simulator @@ -106,41 +105,38 @@ ifeq ($(sim), xcelium) SIMULATOR = xcelium endif # sim -export GAP_USE_OPENOCD=1 -# Default is semihosting -io ?= host +# Deafult is debug bridge +io ?= # No printf ifeq ($(io), disable) -IO = -D__DISABLE_PRINTF__ -endif - -# Printf using semihosting -ifeq ($(io), host) -FREERTOS_FLAGS += -D__SEMIHOSTING__ -IO = -DPRINTF_SEMIHOST +FREERTOS_FLAGS += -D__DISABLE_PRINTF__ endif # Printf using uart ifeq ($(io), uart) -IO = -DPRINTF_UART -DPRINTF_SEMIHOST -MAIN_APP_STACK_SIZE := $(shell expr $(MAIN_APP_STACK_SIZE) + 1024) +FREERTOS_FLAGS += -DPRINTF_UART endif # Printf using stdout ifeq ($(io), rtl) -IO = -DPRINTF_RTL +FREERTOS_FLAGS += -DPRINTF_RTL +endif + +# Printf using semihosting +ifeq ($(io), host) +export GAP_USE_OPENOCD=1 +FREERTOS_FLAGS += -D__SEMIHOSTING__ +FREERTOS_FLAGS += -DPRINTF_SEMIHOST endif # Enabled for gvsoc #FREERTOS_FLAGS += -DPRINTF_RTL +FREERTOS_FLAGS += -DGAP_USE_DEBUG_STRUCT # The pre-processor and compiler options. # Users can override those variables from the command line. -FREERTOS_FLAGS += -D__FREERTOS__ -DTOOLCHAIN_GCC_RISCV -DTOOLCHAIN_GCC - -# App task stack size. -FREERTOS_FLAGS += -DMAIN_APP_STACK_SIZE=$(MAIN_APP_STACK_SIZE) +FREERTOS_FLAGS += -D__FREERTOS__=1 -DTOOLCHAIN_GCC_RISCV -DTOOLCHAIN_GCC COMMON = -c -g -fmessage-length=0 -fno-exceptions -fno-builtin \ -ffunction-sections -fdata-sections -funsigned-char \ @@ -154,7 +150,6 @@ DEBUG_FLAGS = -DPI_LOG_DEFAULT_LEVEL=PI_LOG_TRACE PRINTF_FLAGS = -DPRINTF_ENABLE_LOCK -DPRINTF_DISABLE_SUPPORT_EXPONENTIAL #\ -DPRINTF_DISABLE_SUPPORT_FLOAT -PRINTF_FLAGS += $(IO) WARNINGS = -Wall -Wextra -Wno-unused-parameter -Wno-unused-function \ -Wno-unused-variable -Wno-unused-but-set-variable \