[fpc-devel] Re: FPC related fairy tale
mschnell at lumino.de
Fri Oct 19 16:25:27 CEST 2012
On 10/19/2012 03:29 PM, Sven Barth wrote:
> It would be easier if you'd use the C code from within FPC code.
I don't think I can easily do this, as there is a booting system called
"Leash" provided by Innovasic, that finally runs the user code
(everything is compiled to a single loadable/executable file, though,
it's embedded stuff in the end...) Leash is highly configurable,
initializes the chip internal hardware and finally starts and monitors
four user's hardware-Threads, that work (and in the Eclipse-based
debugger look as if there really were) four (plus one) independent
So, if you think it's not easily doable to link a set of fpc procedures
into this monolithic executable, maybe writing a little loader (e.g.
loading the fpc executable into a dedicated predefined memory location)
would be easier to do and workable at least for testing.
> You might also circumvent heap manager issues by using the "cmem" unit.
Or in the loader providing a cmem workalike, that preforms a callback to
the C-generated infrastructure, that of course does provide malloc() and
> But as I already wrote I'm currently using the user space emulation of
> QEMU and with that I don't have the need to find/compile corresponding
> C libraries and I'd anyway like to have FPCs normal syscall interface
> for Linux working. Also I don't know how well FPC will handle it if I
> let it link to libraries as this is not tested yet...
As my system obviously does not run Linux, I hope I might be able to
provide some kind of infrastructure that allows to decently execute FPC
generated files. (This maybe in fact is similar to what QEMU does -
without the code-interpreter.)
More information about the fpc-devel