From: Enoch <ix...@ho...> - 2014-04-16 22:05:59
|
Hello Matthias, I hope that you agree with me that AmForth should allow placing user code into the NRWW area. In my case, I need to put BOOFA there, an avrdude compatible 512W bootloader (https://github.com/wexi/boofa), or otherwise further development of my multi-board CANbus system would become a living hell. As your faithful shadow I have to introduce just the minimally invasive changes to your code. Thus, to deal with your new flash allocation challenge this is the *ugly* (but simplest) solution that I found: dict_core_mcu.inc ~~~~~~~~~~~~~~~~~ .if AMFORTH_RO_SEG > NRWW_START_ADDR .include "dict/core_4k.inc" .else .include "dict/core_8k.inc" .endif dict_mcu.inc ~~~~~~~~~~~~ .if AMFORTH_RO_SEG > NRWW_START_ADDR .include "dict/appl_4k.inc" .else .include "dict/appl_8k.inc" .endif While I concur with your design objective to pack as much as possible code into the core I have to disagree with your static (mcu dependent) allocation method. Instead, a simple macro call ahead of each included asm could have achieved just the same, a macro that checks the "pc" distance to the "FLASHEND"... Enough said :-) Thanks, Enoch. |