- Notifications
You must be signed in to change notification settings - Fork1
Not a real operating system, but a wrapper on FreeRTOS and M5Stack
License
0xf104a/GumOS
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
WORK IN PROGRESS
Not a real operating system, but a wrapper on FreeRTOS and M5Stack. Will support lua script for M5Stack(currently lua does not support drawing and working with hardware – writing library implementing all of those is still to be done)
GUI is not yet ready. Also I have no idea why git don't want to add ramfs folder completely and adds only logo.
As I don't know how to implement dynamic loading on esp32 modules are currently hardcoded insrc/kernel/kmodule.cpp
This file stands for kernel configuration.
Parameter | Description |
---|---|
KERENEL_VERSION | Just kernel version. |
KLOOP_SLEEP_MS | Sleep time for kernel loop( located inkstart(void) src/kernel/kernel.cpp ) |
ARRAY_CAPACITY | Default capacity for array capacity(seesrc/kernel/types/array.h) |
HASHTABLE_CAPACITY | Default capacity for array capacity(seesrc/kernel/types/hashtable.h) |
TASK_STACK_DEPTH | Max stack depth for FreeRTOS task(seehttps://www.freertos.org/a00125.html) |
TIMER_SLEEP_TIME | Timer loop sleep time. |
TIMER_PRIORITY | Priority of timer task. |
TIMER_INITIAL_TIME | Initial UNIX time to set.(For precision could bedouble ) |
MICRORAMFS_SIZE | microramfs maximum size. |
MIN_FREE_HEAP | This is sometimes useful to detect memory leaky. If free heap is less than MIN_FREE_HEAP then kernel will panic. |
LOAD_GUI | Set to 1 to enable GUI. |
LOAD_POWERCTL | Set to 1 to enable powerctl. |
LOAD_SOUNDCTL | Set to 1 to enable soundctl. |
LOAD_HIDCTL | Set to 1 to enable keyboard. |
LOAD_AUTOSTART | Set to 1 to load lua autorun |
microramfs is builtin virtual filesystem that store resources and some of sensors states. It has fixed maximum size and in case of exceeding this space you will get error 8 (seehttps://github.com/Andrewerr/GumOS/blob/master/src/kernel/error.h ).
microramfs initializes from static array placed insrc/kernel/microramfs/init.h
. It could be generated from any folder with this tool.
Any function returnint
which is error code(0 means no error).
Each function accepts filesystem instance(microramfs *fs
) as first parameter.
Function | Description |
---|---|
create_file(microramfs *fs,char *path) | Creates file with given path(path should include file name). |
write_file(microramfs *fs,char *path,uint8_t *data, uint64_t sz) | Writedata to file(file will be truncated).sz is size of data |
read_file(microramfs *fs,char *path, uint8_t **data, uint64_t *sz) | Read data from file. IMPORTANT: *data should be NULL before calling this function.Size of read data will be written to sz |
rm_file(microramfs *fs,char *path) | Remove file by given path. |
ls_dir(microramfs *fs, char *path, array_t **array) | List dir and put all object instances toarray |
create_dir(microramfs *fs,char *path, char *name) | Create directory withname in directorypath |
Following functions are not yet implemented(and even not added to headers):rm_dir
,append_file
Bootlogo byRoundIcons
PlatformIOhttps://platformio.org
FreeRTOShttps://www.freertos.org
m5stackhttps://github.com/m5stack/M5Stack
Files:
src/lua
Copyright © 1994–2019 Lua.org, PUC-Rio.Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
A lot things to do.
- Fix issues
- Add network services
- Add NTP syncrhonization
- Add bluetooth connection to smartphone for syncing messages,notifications etc.
- Make GUI
- Add sleep mode
- Add SDCard interface
- Add updater
- A lot more...