Given how FF can't access beyond 64K (due to the 16 bit address size), can the FF code be loaded at locations beyond this range? This way the lower 64K can be used for user forth code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The FF kernel, the user code, ram and eeprom have to exist in the 16-bit adress space.
The eeprom emulation is hidden outside the 16-bit address space, if the chip has enough flash.
If you link to some external libraries, those could be put outside the FF address space. To achieve that you will need to use a special linker script. I did that once for the floating point library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is no need for a custom flash routine, just use X! and X@. They take 32-bit flash addresses.
You could rewrite FF to be a 32-bit forth on PIC-24.
Or you could rewrite FF to have 16-bit data and 32-bit addresses.
Or you could rewrite FF to have separate address spaces for flash, ram and eeprom.
But then you would miss the point of having a single easy to use address space.
But how many applications are you planning to write that don't fit into 16-bit FF ?
There is only a minimal assembler for bitmanipulation.
This will show you the assembler words.
words ,
Also look in wordsAll.txt.
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Given how FF can't access beyond 64K (due to the 16 bit address size), can the FF code be loaded at locations beyond this range? This way the lower 64K can be used for user forth code.
The FF kernel, the user code, ram and eeprom have to exist in the 16-bit adress space.
The eeprom emulation is hidden outside the 16-bit address space, if the chip has enough flash.
If you link to some external libraries, those could be put outside the FF address space. To achieve that you will need to use a special linker script. I did that once for the floating point library.
Seems like a good place to store font data with a custom flash routine written in Forth!
So, there is no way to extend FF's address space limits?
Also, is there an assembler for PIC24? I couldn't find one in the forth directory.
Last edit: Amt 2021-09-15
There is no need for a custom flash routine, just use X! and X@. They take 32-bit flash addresses.
You could rewrite FF to be a 32-bit forth on PIC-24.
Or you could rewrite FF to have 16-bit data and 32-bit addresses.
Or you could rewrite FF to have separate address spaces for flash, ram and eeprom.
But then you would miss the point of having a single easy to use address space.
But how many applications are you planning to write that don't fit into 16-bit FF ?
There is only a minimal assembler for bitmanipulation.
This will show you the assembler words.
Also look in wordsAll.txt.
the 'hi' word reports only about 18K. Shouldn't it be 64K? how could this be resolved? This is on a fresh setup with .equ FLASH_SIZE, 0x2a800
Try 'flash hi here ram'.
hi should be 65535 and here 29696..
Last edit: Mikael Nordman 2021-09-15