Giter Site home page Giter Site logo

jiejietop / doraos Goto Github PK

View Code? Open in Web Editor NEW
147.0 8.0 65.0 12.93 MB

DoraOS 是我个人所写的RTOS内核,结合FreeRTOS、uCOS, RT-Thread, LiteOS 的特性所写,取其精华,去其糟粕,本项目将持续维护,欢迎大家fork与star。

License: GNU General Public License v3.0

C 99.02% Objective-C 0.03% C++ 0.34% Assembly 0.08% CMake 0.28% Makefile 0.15% HTML 0.05% Perl 0.06%
rtos embedded-systems c cortex-m

doraos's Introduction

DoraOS

DoraOS 是我个人所写的RTOS内核,结合FreeRTOS、uCOS, RT-Thread, LiteOS 的特性所写,取其精华,去其糟粕,本项目将持续维护,欢迎大家fork与star。

名字的由来:Dora 谐音为哆啦,我个人非常喜欢哆啦A梦,梦想有一天能将哆啦A梦2577集看完(可惜程序员太忙没时间).... OS则为操作系统 Operating System。

目前已实现M3内核的任务切换与调度。理论上支持无限多个优先级,采用bit map方式寻找最高优先级任务,支持时间片调度。

内存管理算法采用“最佳匹配”算法,每个内存块节点信息结构只需 8 Byte,在内存堆首部存在内存管理信息控制块,大小为 16 Byte。采用内存切割与合并管理,最大化降低内存碎片的产生。 实现icp通信机制...

文件目录如下:
DoraOS/
├── common
│   ├── lwip
│   │   ├── lwip相关文件
│   │   └── lwip相关文件
│   └── salof
│       ├── fifo.c
│       ├── format.c
│       └── salof.c
├── demo
│   ├── stm32f103
│   │   ├── Doc
│   │   │   └── readme.txt
│   │   └── Project
│   │       └── stm32f103.uvprojx
│   └── stm32f429
│       ├── Doc
│       │   └── readme.txt
│       └── Project
│           └── stm32f429.uvprojx
├── example
│   ├── app_event.c
│   ├── app_mem.c
│   ├── app_memp.c
│   ├── app_mutex.c
│   ├── app_queue.c
│   ├── app_sem.c
│   └── app_swtmr.c
├── include
│   ├── common
│   │   └── salof
│   │       ├── fifo.h
│   │       ├── format.h
│   │       └── salof.h
│   ├── config
│   │   ├── debug.h
│   │   ├── dos_config.h
│   │   └── dos_def.h
│   ├── event.h
│   ├── list.h
│   ├── log.h
│   ├── mem
│   │   ├── mem.h
│   │   └── memp.h
│   ├── mutex.h
│   ├── port
│   │   ├── arm
│   │   │   ├── cortex-m3
│   │   │   │   ├── arm_cmsis.h
│   │   │   │   └── port.h
│   │   │   └── cortex-m4
│   │   │       └── port.h
│   │   └── cmsis
│   │       └── arm_cmsis.h
│   ├── queue.h
│   ├── sem.h
│   ├── swtmr.h
│   ├── sys.h
│   └── task.h
├── LICENSE
├── mem
│   ├── mem.c
│   └── memp.c
├── port
│   └── arm
│       ├── cortex-m3
│       │   ├── port.c
│       │   └── port.s
│       └── cortex-m4
│           ├── port.c
│           └── port.s
├── README.md
└── src
    ├── event.c
    ├── list.c
    ├── log.c
    ├── mutex.c
    ├── queue.c
    ├── sem.c
    ├── swtmr.c
    ├── sys.c
    └── task.c

doraos's People

Contributors

ghsecuritylab avatar jiejietop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doraos's Issues

OS应发挥cortex-m的特性!

有幸发现这个OS和你的博客,能自主编写OS的人较少,但你参考的这几个OS(FreeRTOS、uCOS, RT-Thread, LiteOS)都没有发挥Cortex-M的特性,都关闭了中断。它们为了兼容更多的MCU而采用了古老的关闭中断的方式避免OS函数重入。

Cortex-M的众多特性就是为OS而生的,包括双堆栈、SVC、PendSV、EXC_RETURN、咬尾中断、原子指令等等,完全不用关闭中断即可实现OS。

Cortex-M解决了两大普通MCU和普通RTOS的硬伤,1:关闭了中断,导致一些敏感事件响应可能存在延迟,例如外部中断(虽然一般场景对于短暂的关闭中断不敏感)。2:每个任务的堆栈空间都要考虑中断嵌套的额外开销。但Cortex-M不会有上述问题。

唯一值得参考的为Cortex-M设计的OS是ARM CMSIS下的RTX。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.