Use the bin allocator only on targets without SDRAM
The bin allocator causes random alignment issues on these targets
This commit is contained in:
committed by
Raphael Coeffic
parent
08fd8a331d
commit
0eb2d0914c
@@ -544,9 +544,15 @@ if(NOT MSVC)
|
||||
# Lua needs %g and %f
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -u _printf_float -u _scanf_float")
|
||||
endif()
|
||||
# Nano's malloc does work well with lua, use our own
|
||||
add_definitions(-DUSE_BIN_ALLOCATOR)
|
||||
set(SRC ${SRC} bin_allocator.cpp)
|
||||
if(SDRAM)
|
||||
# Target with SDRAM do not need a custom allocator for now
|
||||
# as the custom allocator has alignement issues
|
||||
message("Target has SDRAM, do not use BIN_ALLOCATOR")
|
||||
else()
|
||||
# Nano's malloc does work well with lua, use our own
|
||||
add_definitions(-DUSE_BIN_ALLOCATOR)
|
||||
set(SRC ${SRC} bin_allocator.cpp)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OPENRC_BOOTLOADER)
|
||||
|
||||
@@ -160,6 +160,7 @@ add_definitions(-DEEPROM_VARIANT=0 -DAUDIO -DVOICE -DRTCLOCK)
|
||||
add_definitions(-DGPS_USART_BAUDRATE=${INTERNAL_GPS_BAUDRATE})
|
||||
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
|
||||
add_definitions(-DHARDWARE_TRAINER_JACK)
|
||||
set(SDRAM ON)
|
||||
|
||||
if(DEFAULT_THEME)
|
||||
add_definitions(-DDEFAULT_THEME_${DEFAULT_THEME})
|
||||
|
||||
Reference in New Issue
Block a user