-
(TECHNICAL) The all-new multitasking watchdog!
01/09/2021 at 05:58 • 0 commentsAs part of the rewrite, I'm working on some improvements to the multitasking system in arcticOS. There are two main "threads" - the main thread runs the bulk of the code, and the second thread runs smaller sub-processes. The issue is that these sub-processes can't be interrupted - the only context switching is switching between the main and secondary threads. This means that you need to wait for all of them to finish running before the main thread can continue running. But what if a sub-process takes too long? That's where the new watchdog comes into play.
If a task takes too long, the new watchdog will wait for it to finish, and then save the position in the process list. Then, it will skip the remaining sub-processes and drop back into the main thread to let it continue executing. The next time the second thread runs, the watchdog will skip to the task after the one that was causing the block, so the rest of the sub-processes can finish running. This lets the main thread get more CPU time in the event of slow processes in the secondary thread, therefore increasing system speed.
-
(UPDATE) Rewriting arcticOS
01/09/2021 at 01:39 • 0 commentsI am in the middle of rewriting arcticOS. I'm doing this mostly because the existing code is a complete mess. The new code will have a few benefits, like better file organization and more modularity.
-
(TECHNICAL) How the screens will interface with the phone
12/29/2020 at 14:52 • 0 commentsOne issue I've had is that writing screen drivers is kind of difficult - I need to be able to tell the screen what to do, and store fonts, graphics, etc...
There are already Arduino libraries for tons of displays, but I want arcticOS to be more modular, and having screens require Arduino libraries would immediately break them for something that isn't compatible with some random library.
Plus, fonts and graphics take up space! In the ATMega chips, program memory and RAM are at a premium. When I tried adding some Arduino libraries to arcticOS (for testing, not for release) my program memory usage shot up from 30% to around 80%, and my RAM was left with less than 200 bytes.
My solution? Create a standardized screen communication protocol and have a separate board to store fonts and graphics, and handle drawing to the screen. The board will be based on an Arduino Nano (but could be replaced with a Nano for any DIY projects) and shouldn't add too much to the cost. Plus, having a standardized pinout means that screens can be upgraded on phones without needing a new motherboard to interface with the new display. Plus, if I write the UI code properly, it should detect and scale to the new screen without even needing a reflash!
The new protocol will work over I2C, but I haven't figured out the exact bytes that need to be sent yet. Stay tuned!
-
(UPDATE) December 2020 Update
12/29/2020 at 14:40 • 0 commentsFirst, I'd like to say sorry th
First, I'd like to say sorry that I didn't make my mid-December goal for releasing the OS's source code. I have been having trouble getting the screen driver to work, but I have decided to handle the screen a different way than I have been, so it needs at least a bit of a rewrite. The new method means that drivers will take much less time to write AND the phone will run faster! I will have a version of the OS without the broken screen driver up later today, but it is basically unusable in its current state which I will be working to fix once I've modified my prototype to work with the new screen control system.
When the OS is in a working state (and the parts I need have arrived) I will be making an easy to follow tutorial on how to build a devkit for arcticOS. It won't have cellular, flash storage, or a keypad, but can still be used for development and testing. Even if you can't code, you can still help with development - bug reports and suggestions are super appreciated!
I have opened the Hackaday page (https://hackaday.io/project/176575-open-source-minimalist-phone) and will be posting minor updates and technical information there. From there, you can find a link to the GitHub page for arcticOS. I'll be working on getting the proper development hardware ready to show off soon - it will have pretty close to the final featureset and will probably be the first thing I sell (I'll probably sell on Tindie, since it seems to have some sort of Hackaday integration)
Also, I said on a livestream with u/jbriones95 that I'd most likely have a modular modem/baseband so it could be upgraded later - sadly, I can't do this because it would make the phone too bulky to be comfortable in the pocket. Luckily, the phone will support 4G/VoLTE along with 3G and 2G so it should hopefully last a while. I have been writing the driver for a 3G only modem so far though, so that will need to be ported to the new modem - this is another thing that won't make it into the first alpha release but I'll have an (untested until I get the final dev hardware) driver for 4G up soon.
One last thing, thanks to the new method of communicating with the screen, I can now offer multiple screen options that can all be compatible with one motherboard! Right now, I am working on a TFT LCD option as well as an E-Ink option. The version with the LCD should still cost around $75 USD. The E-Ink one will be more expensive, but it offers better battery life, and a higher resolution than the LCD. You can always upgrade from the LCD down the line if you'd like, because the screen will be modular.
at I didn't make my mid-December goal for releasing the OS's source code. I have been having trouble getting the screen driver to work, but I have decided to handle the screen a different way than I have been, so it needs at least a bit of a rewrite. The new method means that drivers will take much less time to write AND the phone will run faster! I will have a version of the OS without the broken screen driver up later today, but it is basically unusable in its current state which I will be working to fix once I've modified my prototype to work with the new screen control system.
When the OS is in a working state (and the parts I need have arrived) I will be making an easy to follow tutorial on how to build a devkit for arcticOS. It won't have cellular, flash storage, or a keypad, but can still be used for development and testing. Even if you can't code, you can still help with development - bug reports and suggestions are super appreciated!
I have opened the Hackaday page (https://hackaday.io/project/176575-open-source-minimalist-phone) and will be posting minor updates and technical information there. From there, you can find a link to the GitHub page for arcticOS. I'll be working on getting the proper development hardware ready to show off soon - it will have pretty close to the final featureset and will probably be the first thing I sell (I'll probably sell on Tindie, since it seems to have some sort of Hackaday integration)
Also, I said on a livestream with u/jbriones95 that I'd most likely have a modular modem/baseband so it could be upgraded later - sadly, I can't do this because it would make the phone too bulky to be comfortable in the pocket. Luckily, the phone will support 4G/VoLTE along with 3G and 2G so it should hopefully last a while. I have been writing the driver for a 3G only modem so far though, so that will need to be ported to the new modem - this is another thing that won't make it into the first alpha release but I'll have an (untested until I get the final dev hardware) driver for 4G up soon.
One last thing, thanks to the new method of communicating with the screen, I can now offer multiple screen options that can all be compatible with one motherboard! Right now, I am working on a TFT LCD option as well as an E-Ink option. The version with the LCD should still cost around $75 USD. The E-Ink one will be more expensive, but it offers better battery life, and a higher resolution than the LCD. You can always upgrade from the LCD down the line if you'd like, because the screen will be modular.