Updated changelog and version number, initialize const heap before loading imports

This commit is contained in:
Benjamin Vedder 2023-04-14 22:46:26 +02:00
parent 4ba6c49d0a
commit ef2205d61d
3 changed files with 11 additions and 10 deletions

View File

@ -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

View File

@ -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"

View File

@ -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);