Build system:Board level control of no-unaligned-access

This commit is contained in:
David Sidrane
2021-10-27 13:21:54 -07:00
committed by Daniel Agar
parent af9f8f08c6
commit e2b4e435a9
3 changed files with 23 additions and 2 deletions
+5
View File
@@ -116,6 +116,11 @@ FLAGS = $(MAXOPTIMIZATION) -g2 \
FLAGS += $(EXTRAFLAGS)
# force alignment
ifeq ($(CONFIG_BOARD_FORCE_ALIGNMENT),y)
FLAGS += -mno-unaligned-access
endif
# enable precise stack overflow tracking
ifeq ($(CONFIG_ARMV7M_STACKCHECK),y)
FLAGS += -finstrument-functions -ffixed-r10
+7
View File
@@ -86,6 +86,13 @@ function(px4_os_add_flags)
)
endif()
if("${CONFIG_BOARD_FORCE_ALIGNMENT}" STREQUAL "y")
message(STATUS "Board forcing alignment")
add_compile_options(
-mno-unaligned-access
)
endif()
endfunction()
#=============================================================================