Lua on f407, try again (#2725)
* lua on f4 * move perf trace to efifeatures * check that it's defined * cypress and kinetis * it would help to define the correct thing * disable buffer if not used * we can work with 2k * turn off ramdisk on mre qc * wow strncpy is useless for truncated strings * turn off for bootloader * lto bootloader * memory * memory
This commit is contained in:
parent
b398d03f5f
commit
20cef63d32
|
@ -14,7 +14,7 @@ endif
|
|||
|
||||
# disable some modules to shrink bootloader binary
|
||||
DDEFS += -DEFI_BOOTLOADER
|
||||
DDEFS += -DHAL_USE_EXT=FALSE -DHAL_USE_ICU=FALSE -DHAL_USE_PWM=FALSE -DHAL_USE_RTC=FALSE
|
||||
DDEFS += -DHAL_USE_EXT=FALSE -DHAL_USE_ICU=FALSE -DHAL_USE_PWM=FALSE -DHAL_USE_RTC=FALSE -DEF_LUA=FALSE
|
||||
#disable ChibiOS flsah driver and prevent header from include
|
||||
DDEFS += -DHAL_USE_FLASH=FALSE
|
||||
|
||||
|
@ -62,7 +62,7 @@ endif
|
|||
|
||||
# Enable this if you want link time optimizations (LTO)
|
||||
ifeq ($(USE_LTO),)
|
||||
USE_LTO = no
|
||||
USE_LTO = yes
|
||||
endif
|
||||
|
||||
# If enabled, this option allows to compile the application in THUMB mode.
|
||||
|
|
|
@ -740,10 +740,6 @@
|
|||
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||
/*===========================================================================*/
|
||||
|
||||
#undef ENABLE_PERF_TRACE
|
||||
#define ENABLE_PERF_TRACE FALSE
|
||||
#define TRACE_BUFFER_LENGTH 1
|
||||
|
||||
#endif /* CHCONF_H */
|
||||
|
||||
/** @} */
|
||||
|
|
|
@ -377,6 +377,7 @@
|
|||
#define EFI_UART_ECHO_TEST_MODE FALSE
|
||||
#define EXTREME_TERM_LOGGING FALSE
|
||||
#define EFI_PRINTF_FUEL_DETAILS FALSE
|
||||
#define ENABLE_PERF_TRACE FALSE
|
||||
|
||||
#define RAM_UNUSED_SIZE 1
|
||||
#define CCM_UNUSED_SIZE 1
|
||||
|
|
|
@ -741,10 +741,6 @@
|
|||
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||
/*===========================================================================*/
|
||||
|
||||
#undef ENABLE_PERF_TRACE
|
||||
#define ENABLE_PERF_TRACE FALSE
|
||||
#define TRACE_BUFFER_LENGTH 1
|
||||
|
||||
#endif /* CHCONF_H */
|
||||
|
||||
/** @} */
|
||||
|
|
|
@ -343,6 +343,7 @@
|
|||
#define EFI_UART_ECHO_TEST_MODE FALSE
|
||||
#define EXTREME_TERM_LOGGING FALSE
|
||||
#define EFI_PRINTF_FUEL_DETAILS FALSE
|
||||
#define ENABLE_PERF_TRACE FALSE
|
||||
|
||||
#define RAM_UNUSED_SIZE 1
|
||||
#define CCM_UNUSED_SIZE 1
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
export PROJECT_BOARD=microrusefi
|
||||
export PROJECT_CPU=ARCH_STM32F4
|
||||
export EXTRA_PARAMS="-DHW_CHECK_MODE=TRUE -DANALOG_HW_CHECK_MODE=TRUE -DHW_CHECK_ALAWAYS_STIMULATE=TRUE -DSHORT_BOARD_NAME=mre_f4"
|
||||
export EXTRA_PARAMS="-DHW_CHECK_MODE=TRUE -DANALOG_HW_CHECK_MODE=TRUE -DHW_CHECK_ALAWAYS_STIMULATE=TRUE -DSHORT_BOARD_NAME=mre_f4 -DRAMDISK_INVALID"
|
||||
|
||||
export DEFAULT_ENGINE_TYPE=-DDEFAULT_ENGINE_TYPE=MRE_BOARD_NEW_TEST
|
||||
|
||||
|
|
|
@ -264,12 +264,17 @@
|
|||
|
||||
// F42x has more memory, so we can:
|
||||
// - use compressed USB MSD image (requires 32k of memory)
|
||||
// - use Lua interpreter (requires ~20k of memory)
|
||||
// - use perf trace (requires ~16k of memory)
|
||||
#ifdef EFI_IS_F42x
|
||||
#define EFI_USE_COMPRESSED_INI_MSD
|
||||
#define EFI_LUA TRUE
|
||||
#define ENABLE_PERF_TRACE TRUE
|
||||
#else
|
||||
#define EFI_LUA FALSE
|
||||
// small memory F40x can't fit perf trace
|
||||
#define ENABLE_PERF_TRACE FALSE
|
||||
#endif
|
||||
|
||||
#ifndef EFI_LUA
|
||||
#define EFI_LUA TRUE
|
||||
#endif
|
||||
|
||||
#ifndef EFI_ENGINE_SNIFFER
|
||||
|
|
|
@ -53,5 +53,5 @@
|
|||
|
||||
#define EFI_USE_COMPRESSED_INI_MSD
|
||||
|
||||
#undef EFI_LUA
|
||||
#define EFI_LUA TRUE
|
||||
#undef ENABLE_PERF_TRACE
|
||||
#define ENABLE_PERF_TRACE TRUE
|
||||
|
|
|
@ -32,5 +32,5 @@
|
|||
// H7 has dual bank, so flash on its own (low priority) thread so as to not block any other operations
|
||||
#define EFI_FLASH_WRITE_THREAD TRUE
|
||||
|
||||
#undef EFI_LUA
|
||||
#define EFI_LUA TRUE
|
||||
#undef ENABLE_PERF_TRACE
|
||||
#define ENABLE_PERF_TRACE TRUE
|
||||
|
|
|
@ -702,7 +702,7 @@ void initEngineContoller(DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
* UNUSED_SIZE constants.
|
||||
*/
|
||||
#ifndef RAM_UNUSED_SIZE
|
||||
#define RAM_UNUSED_SIZE 5900
|
||||
#define RAM_UNUSED_SIZE 1800
|
||||
#endif
|
||||
#ifndef CCM_UNUSED_SIZE
|
||||
#define CCM_UNUSED_SIZE 300
|
||||
|
|
|
@ -276,7 +276,8 @@ void startLua() {
|
|||
return;
|
||||
}
|
||||
|
||||
strncpy(interactiveCmd, str, sizeof(interactiveCmd));
|
||||
strncpy(interactiveCmd, str, sizeof(interactiveCmd) - 1);
|
||||
interactiveCmd[sizeof(interactiveCmd) - 1] = '\0';
|
||||
|
||||
interactivePending = true;
|
||||
});
|
||||
|
|
|
@ -12,11 +12,20 @@
|
|||
#include "efitime.h"
|
||||
#include "os_util.h"
|
||||
|
||||
#ifndef ENABLE_PERF_TRACE
|
||||
#error ENABLE_PERF_TRACE must be defined!
|
||||
#endif
|
||||
|
||||
#ifndef TRACE_BUFFER_LENGTH
|
||||
#define TRACE_BUFFER_LENGTH 2048
|
||||
#endif /* TRACE_BUFFER_LENGTH */
|
||||
|
||||
// Disable the buffer if we're not enabled at all
|
||||
#if !ENABLE_PERF_TRACE
|
||||
#undef TRACE_BUFFER_LENGTH
|
||||
#define TRACE_BUFFER_LENGTH 1
|
||||
#endif
|
||||
|
||||
enum class EPhase : char
|
||||
{
|
||||
Start,
|
||||
|
|
|
@ -16,11 +16,6 @@
|
|||
|
||||
#define CHPRINTF_USE_FLOAT TRUE
|
||||
|
||||
#if !defined(ENABLE_PERF_TRACE) || defined(__DOXYGEN__)
|
||||
// looks like this value could not be defined in efifeatures.h - please define either externally or just change the value here
|
||||
#define ENABLE_PERF_TRACE TRUE
|
||||
#endif /* ENABLE_PERF_TRACE */
|
||||
|
||||
#if !defined(_FROM_ASM_)
|
||||
#include "obd_error_codes.h"
|
||||
#endif /* _FROM_ASM_ */
|
||||
|
|
Loading…
Reference in New Issue