From: Kalus M. <mic...@on...> - 2010-09-19 09:39:58
|
Hi Pito. Am 19.09.2010 um 02:11 schrieb pito: .. > As Matthias indicates there are > no dependencies on positioning of the asm within the chip (?), .. i! had to be in boot flash section. Interrupt vectors had to be at the _beginning_ of application flash section (or boot flash section; depending on fuse setting). Is that still true for 1284p? All other amforth words are independent and may be compiled in any order you like - theoreticaly. ;-) On atmega168 and other smaler micros quite a few words resided in boot flash section too, and where coded with NEAR relativ jumps (amforth3.6). Those could reach a range of (PC-(2K+1)) to (PC+2K) cells. Some of them addressed i! so they had to stay in boot section flash. And some of them adressed the inner interpreter this way, so they had to be near NEXT, which was in boot sector too. If you put those words some where else, your assembler (AVRA?) will stop with an error message. Thats why there was no simple way to make a bootloader independent of amforth (Arduinos). See amforth-3.6: dict_appl_core.inc dict_core.inc "; this part of the dictionay has to fit into the nrww flash ; section together with the forth inner interpreter." Words of these two files had to stay where they where supposed to be. Now lets see if this is still true with amforth-4.1.? You may grep rjmp instructions in the amforth tree to find out this kind of dependencies. I found: PowerBook:~/amforth/amforthQuellen/amforth-4.1 michael$ grep -i -R rjmp core/*.* appl/*.* appl/atmega2561/*.* appl/atxmega/*.* core/amforth-low.asm: rjmp DO_NEXT core/amforth-low.asm: rjmp DO_EXECUTE core/amforth.asm: rjmp DO_NEXT core/amforth.asm: rjmp DO_EXECUTE PowerBook:~/amforth/amforthQuellen/amforth-4.1 michael$ In both files rjmp is inside of inner interpreter. If you load this or that file depends on you configuration. Looks like there are no such dependencies any more in all other words. Michael |