Fix stupid fucking bug with simulator compilation

This commit is contained in:
Jasper Blanckenburg 2024-06-10 17:39:48 +02:00
parent 1d56e5a865
commit b53bd2baf7
4 changed files with 9 additions and 4 deletions

View File

@ -11,4 +11,9 @@ user_cflags := -DUSE_BPP=16 -std=gnu++1z -Wno-cast-qual -Wno-missing-declaration
# ADDITIONAL_SOURCES. Since TouchGFXDesigner completely overwrites the generated
# Makefile, we can't fix it there -- but the generated makefile includes this
# file, so we can fix it here.
ADDITIONAL_SOURCES := $(call subst_drivename,$(ADDITIONAL_SOURCES))
subst_drivename = $(shell echo $(1) | sed -e 's!^\([a-zA-Z]\):/!/\1/!')
ADDITIONAL_SOURCES := $(foreach src,$(ADDITIONAL_SOURCES),$(call subst_drivename,$(src)))
ifeq ($(UNAME), Linux)
linker_options += -no-pie
endif

View File

@ -16,7 +16,6 @@ application_path := $(call qs,$(abspath $(call sq,$(makefile_path)../..)))
# Since the path may show up as a target in the Makefile, we can't have a colon
# in it. So we replace z:/ with /z/ to avoid this.
subst_drivename = $(shell echo $(1) | sed -e 's!^\([a-zA-Z]\):/!/\1/!')
export subst_drivename
application_path := $(call subst_drivename,$(application_path))
.PHONY: clean assets all
@ -26,7 +25,7 @@ all clean assets:
$(error Spaces not allowed in path)
else
ADDITIONAL_SOURCES := $(application_path)/../Core/Src/vehicle_state.c
ADDITIONAL_SOURCES := vehicle_state.c
ADDITIONAL_INCLUDE_PATHS := $(application_path)/../Core/Inc
ADDITIONAL_LIBRARY_PATHS :=
ADDITIONAL_LIBRARIES :=

View File

@ -2149,7 +2149,7 @@
"PostGenerateTargetCommand": "touchgfx update_project",
"PostGenerateTargetCommandOverride": "",
"CompileSimulatorCommand": "make -f simulator/gcc/Makefile -j8",
"CompileSimulatorCommandOverride": "make -f simulator/gcc/Makefile -j2",
"CompileSimulatorCommandOverride": "make -f simulator/gcc/Makefile -j12",
"RunSimulatorCommand": "build\\bin\\simulator.exe",
"LandscapeSkinX": 0,
"LandscapeSkinY": 0,

1
TouchGFX/vehicle_state.c Symbolic link
View File

@ -0,0 +1 @@
../Core/Src/vehicle_state.c