Hi.
Yes it would be possible.
But since FF is the operating system, I would do it so that
FF is the main program and C library functions are linked to FF.
Then Forth words can be written to call the top-level C functions
in order to have a fat fs or ip stack or whatever.
This requires some research about how the C-stack frame looks like
and what register conflicts there are.
The C startup code from crt0.s must be included into WARM.
On the PIC18 that was almost nothing, since WARM did everything already
from before.
The linker is then used to make an executable from ff.o and "c.o".
A call to a C function could always be a long call so that C code can be
put outside the normal FF 64 Kb address range.
BR Mike
On 10.3.2012 22:46, om1zz wrote:
> Hi Mike,
> I've been playing with FatFs on dspic33fj. Still thinking how to use
> the FF as a "shell" or a "scripting language" for a bigger C chunks
> (libs). For example, to use C30 as the main language tool, with FF
> included as an asm library (ff.asm) into a C code. So we may have ie
> fatfs, floating point, dsp etc glued to FF. Would this be feasible?
> I.
>
|