Skip to content

Commit 12da566

Browse files
authored
new env var for openblt debug options, see rusefi#7096 (rusefi#7120)
1 parent 9d2d159 commit 12da566

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

firmware/bootloader/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# by default EXTRA_PARAMS is empty and we create 'debug' version of the firmware with additional assertions and statistics
66
# for 'release' options see 'clean_compile_two_versions.bat' file
77

8-
ifeq ($(DEBUG_LEVEL_OPT),)
8+
ifeq ($(DEBUG_LEVEL_BLT_OPT),)
99
# this value would be used by default. For 'debug' configuration override with '-O0 -ggdb -g' or something along these lines
10-
DEBUG_LEVEL_OPT = -Os -ggdb -g
10+
DEBUG_LEVEL_BLT_OPT = -Os -ggdb -g
1111
DDEFS += -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE
1212
endif
1313

@@ -30,7 +30,7 @@ DDEFS += -DEFI_UNIT_TEST=0 -DEFI_PROD_CODE=1 -DEFI_SIMULATOR=0
3030

3131
# Compiler options here.
3232
ifeq ($(USE_OPT),)
33-
USE_OPT = $(EXTRA_PARAMS) $(EXTRA_2_PARAMS) $(EXTRA_3_PARAMS) $(DEBUG_LEVEL_OPT) $(RFLAGS) -Wno-error=implicit-fallthrough -Wno-error=bool-operation -fomit-frame-pointer -falign-functions=16 -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Werror=type-limits -Wno-error=strict-aliasing -Wno-error=attributes
33+
USE_OPT = $(EXTRA_PARAMS) $(EXTRA_2_PARAMS) $(EXTRA_3_PARAMS) $(DEBUG_LEVEL_BLT_OPT) $(RFLAGS) -Wno-error=implicit-fallthrough -Wno-error=bool-operation -fomit-frame-pointer -falign-functions=16 -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Werror=type-limits -Wno-error=strict-aliasing -Wno-error=attributes
3434
endif
3535

3636
# Configure the linker script to build the bootloader, not the firmware

firmware/config/boards/readme.md

+8
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,11 @@ A: please remember about https://github.com/rusefi/rusefi/wiki/Hardware#q-this-i
4747
# Q: I insist on custom
4848

4949
A: https://github.com/rusefi/rusefi/wiki/Custom-Firmware
50+
51+
# Q: I want to build the firmware in debug mode
52+
53+
A: check DEBUG_LEVEL_OPT on the .env file of your board
54+
55+
# Q: I want to build the bootloader firmware in debug mode
56+
57+
A: check or add DEBUG_LEVEL_BLT_OPT on the .env file of your board, is the same as DEBUG_LEVEL_OPT but only for the bootloader

0 commit comments

Comments
 (0)