On Mon, 9 Jul 2007, Ameera wrote:
>
> Hi, I was wondering if it was possible to run a C-code executable on
> the ts-7300 board as stand-alone, that is without an OS. I know I have
> to change the boot kernel system, but I'm not sure how. And honestly,
> i'm not sure to go about it in general.
>
> Can anyone please offer me some assistance?
Work out what state the system starts in or is put in by the bootloader
(you'll need the cpu datasheet, hardware specs and bootloader code for
this), write a startup routine to change it to the state you want (often
done in assembly) then jump to your code's start address (usually gcc
provides a trampoline called _start which sets up a few things and calls
main()).
Your program will need to contain _all_ functions that it uses including
hardware-specific I/O (ie, no printf("") unless you implement one, same
with malloc(), fork(), open(), etc). You won't be able to use any of the
hardware unless you write drivers for it - I.E., can't read files unless
you implement 1) a flash device driver for the ts7300's flash device and
2) a filesystem, you won't be able to use the network without implementing
a tcp/ip stack and drivers for the ethernet device, and you won't be able
to use serial without writing a driver for the cpu's serial port.
The above are all things handled by the kernel or libc for you, and would
take a LOT of work to do yourself. You'd end up with half of the existing
kernel anyway.
If you have time-critical I/O and use any functions provided by libc or
the kernel (including system setup routines like clock initialisation, mmu
configuration and memory allocation/management), look into using a
real-time kernel or even a kernel module.
The easiest way would be to keep the kernel and pass
init=/path/to/your/program on its command line so you have all the kernel
and libc functions available as well as being the only process running.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|