Rename the scripts folder to build

And the build folder to output
This commit is contained in:
Romain Goyet
2019-09-18 14:00:51 +02:00
committed by Ecco
parent 690af21140
commit d70bad84f3
61 changed files with 30 additions and 30 deletions

6
.gitignore vendored
View File

@@ -1,3 +1,3 @@
build output
scripts/device/elf2dfu.pyc build/device/elf2dfu.pyc
scripts/device/**/*.pyc build/device/**/*.pyc

View File

@@ -1,4 +1,4 @@
include scripts/config.mak include build/config.mak
# Disable default Make rules # Disable default Make rules
.SUFFIXES: .SUFFIXES:
@@ -131,8 +131,8 @@ include python/Makefile
include escher/Makefile include escher/Makefile
# Executable Makefiles # Executable Makefiles
include apps/Makefile include apps/Makefile
include scripts/struct_layout/Makefile include build/struct_layout/Makefile
include scripts/scenario/Makefile include build/scenario/Makefile
include quiz/Makefile # Quiz needs to be included at the end include quiz/Makefile # Quiz needs to be included at the end
all_src = app_src escher_src ion_src kandinsky_src liba_src libaxx_src poincare_src python_src ion_device_dfu_relocated_src ion_device_dfu_xip epsilon_src runner_src flasher_src bench_src tests_src all_src = app_src escher_src ion_src kandinsky_src liba_src libaxx_src poincare_src python_src ion_device_dfu_relocated_src ion_device_dfu_xip epsilon_src runner_src flasher_src bench_src tests_src
@@ -162,7 +162,7 @@ $(BUILD_DIR)/test.$(EXE): $(BUILD_DIR)/quiz/src/tests_symbols.o $(call object_fo
# Load platform-specific targets # Load platform-specific targets
# We include them before the standard ones to give them precedence. # We include them before the standard ones to give them precedence.
-include scripts/targets.$(PLATFORM).mak -include build/targets.$(PLATFORM).mak
$(foreach extension,$(extensions),$(foreach executable,$(executables),$(eval $(call rules_for_targets,$(executable),$(extension))))) $(foreach extension,$(extensions),$(foreach executable,$(executables),$(eval $(call rules_for_targets,$(executable),$(extension)))))

View File

@@ -10,15 +10,15 @@ EPSILON_I18N ?= en fr es de pt
EPSILON_GETOPT ?= 0 EPSILON_GETOPT ?= 0
ESCHER_LOG_EVENTS_BINARY ?= 0 ESCHER_LOG_EVENTS_BINARY ?= 0
include scripts/defaults.mak include build/defaults.mak
include scripts/platform.$(PLATFORM).mak include build/platform.$(PLATFORM).mak
ifndef USE_LIBA ifndef USE_LIBA
$(error platform.mak should define USE_LIBA) $(error platform.mak should define USE_LIBA)
endif endif
ifndef EXE ifndef EXE
$(error platform.mak should define EXE, the extension for executables) $(error platform.mak should define EXE, the extension for executables)
endif endif
include scripts/toolchain.$(TOOLCHAIN).mak include build/toolchain.$(TOOLCHAIN).mak
SFLAGS += -DDEBUG=$(DEBUG) SFLAGS += -DDEBUG=$(DEBUG)
SFLAGS += -DEPSILON_GETOPT=$(EPSILON_GETOPT) SFLAGS += -DEPSILON_GETOPT=$(EPSILON_GETOPT)

View File

@@ -40,4 +40,4 @@ ifeq ($(DEBUG),1)
else else
MODE = release MODE = release
endif endif
BUILD_DIR = build/$(MODE)/$(PLATFORM) BUILD_DIR = output/$(PLATFORM)/$(MODE)

View File

@@ -2,8 +2,8 @@ MODEL ?= n0110
USE_LIBA = 1 USE_LIBA = 1
EXE = elf EXE = elf
BUILD_DIR = build/$(MODE)/$(PLATFORM)/$(MODEL) BUILD_DIR := $(BUILD_DIR)/$(MODEL)
$(BUILD_DIR)/python/port/port.o: CXXFLAGS += -DMP_PORT_USE_STACK_SYMBOLS=1 $(BUILD_DIR)/python/port/port.o: CXXFLAGS += -DMP_PORT_USE_STACK_SYMBOLS=1
include scripts/platform.device.$(MODEL).mak include build/platform.device.$(MODEL).mak

View File

@@ -11,4 +11,4 @@ endif
BUILD_DIR := $(BUILD_DIR)/$(MODEL) BUILD_DIR := $(BUILD_DIR)/$(MODEL)
include scripts/platform.sdl.$(MODEL).mak include build/platform.sdl.$(MODEL).mak

View File

@@ -1,4 +1,4 @@
products += apps/main.ast scripts/struct_layout/data.json products += apps/main.ast build/struct_layout/data.json
.PHONY: apps_container_struct_layout .PHONY: apps_container_struct_layout
OPEN = open OPEN = open
@@ -11,10 +11,10 @@ ifeq ($(CXX),clang++)
%.ast.json: %.ast %.ast.json: %.ast
@echo "JSON $@" @echo "JSON $@"
@cat $< | ruby scripts/struct_layout/ast_to_json.rb AppsContainer > $@ @cat $< | ruby build/struct_layout/ast_to_json.rb AppsContainer > $@
apps_container_struct_layout: apps/main.ast.json apps_container_struct_layout: apps/main.ast.json
$(OPEN) scripts/struct_layout/visualization.html $(OPEN) build/struct_layout/visualization.html
else else

View File

@@ -1,11 +1,11 @@
include scripts/targets.device.$(MODEL).mak include build/targets.device.$(MODEL).mak
executables += flasher.light flasher.verbose bench.ram bench.flash executables += flasher.light flasher.verbose bench.ram bench.flash
extensions += .dfu .hex .bin extensions += .dfu .hex .bin
$(BUILD_DIR)/%.dfu: $(BUILD_DIR)/%.$(EXE) $(BUILD_DIR)/%.dfu: $(BUILD_DIR)/%.$(EXE)
@echo "DFUSE $@" @echo "DFUSE $@"
$(Q) $(PYTHON) scripts/device/elf2dfu.py $< $@ $(Q) $(PYTHON) build/device/elf2dfu.py $< $@
$(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.$(EXE) $(BUILD_DIR)/%.hex: $(BUILD_DIR)/%.$(EXE)
@echo "OBJCOPY $@" @echo "OBJCOPY $@"
@@ -30,7 +30,7 @@ $(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.$(EXE)
.PHONY: %_run .PHONY: %_run
%_run: $(BUILD_DIR)/%.$(EXE) %_run: $(BUILD_DIR)/%.$(EXE)
$(GDB) -x scripts/$(PLATFORM)/gdb_script.gdb $< $(GDB) -x build/$(PLATFORM)/gdb_script.gdb $<
$(BUILD_DIR)/%.map: $(BUILD_DIR)/%.elf $(BUILD_DIR)/%.map: $(BUILD_DIR)/%.elf
@echo "LDMAP $@" @echo "LDMAP $@"
@@ -39,12 +39,12 @@ $(BUILD_DIR)/%.map: $(BUILD_DIR)/%.elf
.PHONY: %_memory_map .PHONY: %_memory_map
%_memory_map: $(BUILD_DIR)/%.map %_memory_map: $(BUILD_DIR)/%.map
@echo "========== MEMORY MAP =========" @echo "========== MEMORY MAP ========="
$(Q) awk -f scripts/device/memory_map.awk < $< $(Q) awk -f build/device/memory_map.awk < $<
@echo "===============================" @echo "==============================="
.PHONY: openocd .PHONY: openocd
openocd: openocd:
openocd -f scripts/$(PLATFORM)/openocd.$(MODEL).cfg openocd -f build/$(PLATFORM)/openocd.$(MODEL).cfg
# The flasher target is defined here because otherwise $(%_src) has not been # The flasher target is defined here because otherwise $(%_src) has not been
# fully filled # fully filled

View File

@@ -3,5 +3,5 @@
@echo "DFU $@" @echo "DFU $@"
@echo "INFO About to flash your device. Please plug your device to your computer" @echo "INFO About to flash your device. Please plug your device to your computer"
@echo " using an USB cable and press the RESET button the back of your device." @echo " using an USB cable and press the RESET button the back of your device."
$(Q) until $(PYTHON) scripts/device/dfu.py -l | grep -E "0483:a291|0483:df11" > /dev/null 2>&1; do sleep 2;done $(Q) until $(PYTHON) build/device/dfu.py -l | grep -E "0483:a291|0483:df11" > /dev/null 2>&1; do sleep 2;done
$(Q) $(PYTHON) scripts/device/dfu.py -m -u $< $(Q) $(PYTHON) build/device/dfu.py -m -u $<

View File

@@ -11,7 +11,7 @@ $(BUILD_DIR)/test.external_flash.write.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_ex
@echo "INFO About to flash your device. Please plug your device to your computer" @echo "INFO About to flash your device. Please plug your device to your computer"
@echo " using an USB cable and press at the same time the 6 key and the RESET" @echo " using an USB cable and press at the same time the 6 key and the RESET"
@echo " button on the back of your device." @echo " button on the back of your device."
$(Q) until $(PYTHON) scripts/device/dfu.py -l | grep -E "0483:a291|0483:df11" > /dev/null 2>&1; do sleep 2;done $(Q) until $(PYTHON) build/device/dfu.py -l | grep -E "0483:a291|0483:df11" > /dev/null 2>&1; do sleep 2;done
$(Q) $(PYTHON) scripts/device/dfu.py -u $(word 2,$^) | sleep 2 $(Q) $(PYTHON) build/device/dfu.py -u $(word 2,$^) | sleep 2
$(Q) $(PYTHON) scripts/device/dfu.py -u $(word 1,$^) $(Q) $(PYTHON) build/device/dfu.py -u $(word 1,$^)

1
build/targets.sdl.mak Normal file
View File

@@ -0,0 +1 @@
-include build/targets.sdl.$(MODEL).mak

View File

@@ -1,3 +1,3 @@
include scripts/toolchain.arm-gcc.mak include build/toolchain.arm-gcc.mak
SFLAGS += -mthumb -march=armv7e-m -mfloat-abi=hard SFLAGS += -mthumb -march=armv7e-m -mfloat-abi=hard
SFLAGS += -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 SFLAGS += -mcpu=cortex-m4 -mfpu=fpv4-sp-d16

View File

@@ -1,3 +1,3 @@
include scripts/toolchain.arm-gcc.mak include build/toolchain.arm-gcc.mak
SFLAGS += -mthumb -march=armv7e-m -mfloat-abi=hard SFLAGS += -mthumb -march=armv7e-m -mfloat-abi=hard
SFLAGS += -mcpu=cortex-m7 -mfpu=fpv5-sp-d16 SFLAGS += -mcpu=cortex-m7 -mfpu=fpv5-sp-d16

View File

@@ -1 +0,0 @@
-include scripts/targets.sdl.$(MODEL).mak