The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

proof-of-concept kernel for the TI nspire CX

Started by nspiredev500, February 27, 2020, 09:54:34 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


TLDR: I am currently trying to create an operating system for the ti nspire and just hit a (small) milestone, searching for testers in the future

In my current project, called simply OSExt for now (because it should extend the normal ti OS sometime in the future), I deviated from simply writing a program that I wanted to integrate with the OS to wanting to write a whole paralell OS kernel.
The whole kernel-idea started because I hated it when I tried to test a program and the calculator crashed, leaving me waiting for it to reboot, and with no clue why it even crashed in the first place.

This is a massive undertaking, and I may never finish it, but I now have a small testing-version finished, which can run a programm in userspace in its own virtual address space, where it can't do harm to the rest of the system if it goes wrong.
Now I need to implement a proper program loader, a way for the program to use files, allocate new memory, create new processes and communicate with them.
I want to use the newlib library, which is actually already used by ndless, so it shouldn't be that hard to port.
My goal is to make a complete POSIX system, so I can eventually port some open-source software to my os.

If someone wants to help me, or maybe volunteer to test it if it's more mature, I'd be happy. Because I only have an ti nspire CX CAS HW-AA, I can only test the rest in the emulator myself.
If you want to test it in firebird yourself: the github page or the .tns file

The current Roadmap:
  • implementing a way for programs to allocate memory
  • implementing a way for programs to access files, if they have the permission
  • implementing POSIX fork and exec to create new processes
  • implementing a message system and a pipe system for the programs to communicate
  • porting newlib
  • implementing a dynamic linker for shared libraries
  • making a lcd driver
  • making a keypad driver
  • making a touchpad driver
  • making a desktop environment with a file browser and the ability to execute programs and let them display to the screen
  • optimizing memory usage
  • if I'm not dead already, implementing a usb storage driver (will certainly take much time for this one)
  • porting gcc and binutils, so I can develop the kernel on my calculator
  • if I'm somehow still alive, integrating it into nLoader to boot from it

I have this shell for debug output:

And here is my proof of going into userspace:

Here is the address space. All but the first and second entries are my kernel:


Nothing groundbreaking, but it now runs a little userspace test on actual hardware.
Now I can start to implement file io, timeslices for processes, IPC and the userspace drivers.
Something a little more visual may be coming in the next weeks, maybe I'm starting with the lcd driver.


It is now able to draw to the screen while the OS is running without any flickering. It does use a bit of performance though.
And weirdly, trying to turn that off while it is installed crashes the calculator, but not the emulator.
I also implemented a miniclock:

Powered by EzPortal