diff --git a/CHANGELOG.md b/CHANGELOG.md index d04cada9..ffb4129a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * Support for moving code and data to flash. * Incremental read of uploaded code. * Removed array types other than byte arrays. + * Added more position extensions. * Hall sensors: smooth transition to sensorless. * Added soft regen cutoff. See https://github.com/vedderb/vesc_tool/pull/310 diff --git a/conf_general.h b/conf_general.h index 2b6b8c11..e502b077 100755 --- a/conf_general.h +++ b/conf_general.h @@ -24,7 +24,7 @@ #define FW_VERSION_MAJOR 6 #define FW_VERSION_MINOR 05 // Set to 0 for building a release and iterate during beta test builds -#define FW_TEST_VERSION_NUMBER 7 +#define FW_TEST_VERSION_NUMBER 8 #include "datatypes.h" diff --git a/lispBM/lispif.c b/lispBM/lispif.c index 6be01ef1..d2ad9d42 100644 --- a/lispBM/lispif.c +++ b/lispBM/lispif.c @@ -590,6 +590,15 @@ bool lispif_restart(bool print, bool load_code) { code_chars = strnlen(code_data, code_len); } + if (code_data == 0) { + code_data = (char*)flash_helper_code_data_raw(CODE_IND_LISP); + } + + const_heap_ptr = (lbm_uint*)(code_data + code_len + 16); + const_heap_ptr = (lbm_uint*)((uint32_t)const_heap_ptr & 0xFFFFFFF4); + uint32_t const_heap_len = ((uint32_t)code_data + 1024 * 128) - (uint32_t)const_heap_ptr; + lbm_const_heap_init(const_heap_write, &const_heap, const_heap_ptr, const_heap_len); + // Load imports if (code_len > code_chars + 3) { int32_t ind = code_chars + 1; @@ -610,15 +619,6 @@ bool lispif_restart(bool print, bool load_code) { } } - if (code_data == 0) { - code_data = (char*)flash_helper_code_data_raw(CODE_IND_LISP); - } - - const_heap_ptr = (lbm_uint*)(code_data + code_len + 16); - const_heap_ptr = (lbm_uint*)((uint32_t)const_heap_ptr & 0xFFFFFFF4); - uint32_t const_heap_len = ((uint32_t)code_data + 1024 * 128) - (uint32_t)const_heap_ptr; - lbm_const_heap_init(const_heap_write, &const_heap, const_heap_ptr, const_heap_len); - if (load_code) { if (print) { commands_printf_lisp("Parsing %d characters", code_chars);