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.


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to