Friday, September 23, 2005

C Code Only

I figured out a way to load into my main() in c without any assembly using only my linker script. Right now it boots into the firmware using inline asm inside of my main().

Next steps:
  • Find a way to get a form of output. Right now my output has been binary (true / false). If something I'm testing works, it boots into the firmware, otherwise it does nothing. This isn't very helpful in alot of cases. I may consider buying the serial BDM link so that I can get more info, as I will need the cable eventually anyways.
  • Write the kernel. This will likely be time consuming, much more so if I can't get meaningful output from the box.
Related to the kernel, there are two issues that I need to figure out how to resolve:
  • I need to be able to run a thread for a set number of instructions in user mode and get back to supervisor mode afterwards. I need it to jump back to my supervisor instructions if an exception is raised.
  • I need to find a way for a thread in user mode to interact with supervisor instructions. For example, from what I read it looks like LCD drawing, button presses, and basically every other type of IO needs to be done in supervisor mode. So if I have user mode threads, they need to be able to access these functionalities.
So I have a lot of work ahead of myself. I will try to find out the best way to post files to my blog. I really don't have a good network setup so running a server at my home is unrealistic.