-
Should I return? Updates from past few years
04/10/2023 at 04:09 • 1 commentI haven't been on HaD for a few years now. But this Arduino computer project has, in some way, continued to advance. I'm going to write a series of logs outlining the changes and developments that have happened over the past few years, not necessarily in chronological order.
At some point I took some code I wrote, copied and restructured it into a git submodule, and started building an OS around it. A bigger, more flushed out OS and fragments of a kernel and HAL.
The repo is on my personal GitLab instance here if you want to take a peek at the modern source code: https://git.nuclaer-servers.com/Nuclaer/ntios-2020
In all honesty, I never planned on releasing it, so there's some pieces that were copied from around the internet but probably have attributions in the comments.
I've created many devices with this software over the past 2-3 years:Various devices I built over the last few years Writing assembly in a text editor on a hacked-together laptop-like computer Closer image of some of the associated electronics Terminal output (device pictured lower right in top image) All of the devices above run ~95% the same software. The only differences are in the exact mapping/configuration of the hardware and some drivers to plug it in to the rest of the HAL.
I kindof just wanted to sneak peek what the project kindof is now, and see what people think. This is not very much, and doesn't describe what's going on or how any of this works, this is just kindof a preview. If you want to see/learn more, comment so I know people are interested.
What does this run on?
If you pay attention, you'll see I'm quite a fan of the Teensy 4.1 now. I've used other chips like the ESP32 and Artemis, but T4.1 has been my go-to for a while now. I haven't used AVR in many of my projects for a long time now, but I think I could run this on an ATmega2560. The software stack is getting rather large though, and probably ever more memory intensive, so I don't think I could run this well on an ATMega328p or similar chip.
Relation to the original software
When I first created this new OS in May 2020, I probably only copied over the existing system() function I had written for this project, but it seems like everything else was written from scratch to be more modular and use more OOP. It's not clear if I copied some stuff from the NTIOS_2.0 codebase, or if I started from scratch. In either case, the way the HAL is set up for the new OS project has some strange resemblance to the HAl in NTIOS_2.0. But in all honesty, at some point I had pretty much completely forgotten about the NTIOS_2.0 code and what I had been working on. This happens more frequently than I would like to admit...Should this even be considered the same project?
I think this is the logical continuation of this project. I don't even know where the hardware is for this project anymore, but I want to make it nicer and more modern anyway. Is it the same? Well we have a new codebase, new hardware... But yet it has the same objectives and interestingly, seemingly, some of the same architecture. I don't know, but this project will die if it stays what it was, because that is in the past. Grow, or die, is the way of life.
Where is this project going now?
My hopes for the new system are a bit more lofty. My newer code is far more mature and advanced. I think I can load and execute ELF files from an SD card on ARM if I put some more work into it. In the meantime we can assemble programs for a built-in emulator and execute them. Currently this still is compiled and uploaded from Arduino.
If I come back to HaD, this project is going to change a lot. The code will be newer and more capable. The hardware will become more powerful and more portable (like tablets and laptops instead of a static device). -
GPIO Support
10/12/2019 at 23:28 • 0 commentsI added GPIO drivers, and a gpio program to test the drivers.
Essentially I just set pin 13 to output, then set it HIGH. And yes, it worked! Yay!
What's nice about the way this is programmed is that it is independent of hardware and the Arduino IDE. the GPIO command I used uses whichever driver(s) for GPIO that it finds, regardless of what hardware this is running on. I even can run this OS on my linux machine as a cli command. Great for testing!
-
AVR Support
10/11/2019 at 06:08 • 0 commentsWait - didn't this used to run on Arduino?
Yea, in the Arduino IDE. I am no longer using the Arduino IDE, and uploading to AVR via a makefile works great!
After overhauling the OS I lost AVR support. I have regained it! Here's what the result is:
I am still using the Arduino IDE for a serial monitor, but everything seems to work. I still need to add support for lots of stuff now, but I'm running on a microcontroller again, which is nice.
Anyway, I'm super excited, next I plan to add a GPIO API, so that later I can add software serial (then graphics support via an NGT30 :D)
-
Overhaul of the OS
10/05/2019 at 04:53 • 0 commentsIt's been a while since I worked on this, and I see things differently now.
First, I designed this dumb. It's not scalable. It was too hard to add drivers and programs and nothing was organized.
Now I have separate directories for programs/commands and drivers. Also, I have python scripts to configure the programs and drivers before compilation. They are configured with JSON files that the python scripts read, and each component can be enabled/disabled.
So I now have organization and scalability!!! Yay!
This is wonderful because I want to make this OS cross-platform. I want support for more hardware, more processor types, and I want it to be usable in more ways. For instance, to use it on microcontrollers as a usable OS in projects that need less processing power than a raspberry pi, like small robots, in home automation, and simple portables (like my #OpenPDA project).
I definitely have a ways to go, but this is a major step. See PR on Github here: https://github.com/NuclearManD/NTIOS_2.0/pull/1
Note:
- Not as much hardware support - yet. Only UART, NGT30, and PS2 Keyboard support
- No GUI anymore (can be fixed later)
- Added a man command
- Filesystem is not working, even though it is there.
- No multitasking at this time
Like I said, lots of work to do!
-
basic BASIC and filesystem commands work!
04/24/2018 at 00:58 • 2 commentsNow the SD card is actually useful! Project is now getting even more fun :D
-
SD Card working (finally!)
12/02/2017 at 23:38 • 0 commentsMy arduino desktop now has a filesystem. I can't do much with it yet, but it works. I also made some other improvements:
- better task manager
- CLI improvements
- new GUI color scheme
Here is a video:
Also, like I said in the video, I am making a board with:
- Arduino mega
- NGT20
- PS/2 Keyboard port
- SD card slot
All in one arduino-mega sized board.
-
More alphabets and where the project is going
08/13/2017 at 20:36 • 3 commentsI love language so I decided to add some new alphabets. I added the characters in the Cyrillic alphabet that are used in Russian, plus the characters from an alphabet I made up for fun a while back.
Now I can print with more characters:
On top: Hello World!
On bottom: Hello (Informal)
Benefits:
- more alphabets
- smaller text (so more can fit on the screen)
- adjustable character length
Drawbacks:
- Slower loading and displaying
- Only white characters are supported - no green or red
- can't really mix with Latin alphabet due to size and interface differences
I also ported a simple game I made for the ATmega328p a few years back:
Other than those things, however, my project is so far somewhat useless. The biggest drawback is that it isn't currently possible to execute some generic program: all must be hard coded into the OS (essentially). Well, I remember a while back reading that Java had been ported to AVR - uJ. Adding this and enabling Ethernet would allow community made programs to be downloaded and executed to the Arduino Desktop without the aid of another computer. Not that it has a community - but you hopefully get the point. Java enables a useful stand alone system. Also, since I have the extra 32KiB RAM I have more room for programs, plus graphics and keyboard.... Soon hopefully Ethernet and SD support too.
-
void system(char* input){ ... }
08/01/2017 at 20:40 • 0 commentsC++ has this function, system(), that executes a command. If I want a command line for my arduino computer, I might as well implement this function.
My friend, @Andrey Skvortsov, sent me an arduino shield that makes the arduino a ton more powerful. It adds 32KB of SRAM, but its parallel, not serial. Furthermore it maps directly into the AVR address space, so you don't have to manipulate pins. Its basically an extra 32KB blazing fast SRAM addition for the Arduino MEGA. I have barely used it to any potential, but I have begun making memory allocation functions and such for it, so I can go farther. My system function actually uses the shield, and removing the shield breaks the system() function. SO the shield works! See that project here: #Arduino MEGA 2560 32Kb RAM shield
I had the arduino auto-execute these commands:
sudo
sudo -f
terminate 0
lspsOutput:
The sudo command is like linux : get elevated permissions. I added sudo -f, f as in FORCE. Basically force events to occur where possible. So the "Self-hacking ENABLED" is from sudo -f. terminate 0 : terminate process 0 (but there was no process, so we get error bad PID). lsps is LiSt ProceSses. It said "0 processes:", because no processes were executing.
Now I am working on a terminal and will add more commands later. Terminal, for now, will block all other processes until exit. Multitasking terminals, as I have discovered, aren't the easiest.
-
Progress of new architecture and File System work
05/20/2017 at 23:38 • 0 commentsI took a break from this project for a while, but I have come back. I have a basic terminal with one command working, along with a file system. The terminal has only a help command that prints a string on the screen. I have working file IO now. File IO works kinda.... different. Basically instead of accessing the SD card directly by the emulated CPU in the Arduino, the SD library's functions are mapped to the CPU's emulated hardware IO. This does a few things:
- Makes there no need for a complex file system driver
- SD card library functions are faster because they are not run on an emulator
- I don't have to find a way to directly read/write bytes on the SD card
Think of it like having a filesystem driver (software) mapped to your CPU's hardware IO.
I will do something similar for network access. So that my OS can download updates to the SD card.
-
New (And superior) CPU architecture
05/18/2017 at 03:42 • 0 commentsI'm pretty much no longer going to use the old MMC architecture. I now have a simpler, faster, and generally better CPU architecture I designed. I will also use it for my FPGA computer. Most instructions are one or two bytes, as opposed to my older architectures that took WAY too many. It's still WIP, but it has run on the Arduino Desktop and works well in place of the MMC architecture.