[gambit-list] Gambit and termite on an embedded system (Nintendo DS)?
Marc Feeley
feeley at iro.umontreal.ca
Thu Oct 19 09:33:26 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 19-Oct-06, at 7:19 AM, Andrew Lentvorski wrote:
> Marc Feeley wrote:
>> Andrew, that's a neat project! For a long time I have been
>> thinking of running Gambit "on the bare metal" and, although I
>> have never tried to do it, the runtime system has been designed so
>> that there are few dependencies on a specific OS. The C code
>> generated by the compiler is very plain (it only uses the header
>> files limits.h, wchar.h, float.h, setjmp.h, and math.h). The OS
>> dependent stuff is mostly contained in the lib/os*.c files.
>
> I located main() inside gambit.h after peeling apart the
> preprocessor stuff with -E. This then calls ___main_char or
> ___main_UCS_2 inside os_base.c.
>
> I need to initialize some things (interrupts, keyboard, display,
> timers, wifi, etc.) before letting Gambit take over. Where should
> I hook in? Should I hook in before letting the call float through
> to ___main_char or ___main_UCS_2, or is there somewhere else that I
> should break out and start initializing?
>
> Thanks,
> -a
You can either add your initialization code to ___main_* in lib/
os_base.c , or start Gambit from your own main (see the examples in
tests/client.c and examples/pthread to see how to do this).
Marc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
iD8DBQFFN36n//V9Zc2T/v4RAkN8AJ9BlMzlilK8DEeBZ9Y6rHgra4Zt5QCgn4jW
RrNYHu2yzjjDefQ8JZAlEdE=
=e/pu
-----END PGP SIGNATURE-----
More information about the Gambit-list
mailing list