Commit Graph

845 Commits

Author SHA1 Message Date
MacRsh
2758172108 feat(kernel/fifo): Optimize the creation of fifo. 2025-06-11 23:14:03 +08:00
MacRsh
46bf4594c6 <type>(<scope>): Rename libc/printf to snprintf 2025-06-10 22:40:18 +08:00
MacRsh
96f7c9f70a feat(all): Compress the system kernel.
1.Remove the particularly costly parts such as the path of the object, reduce the system kernel, and support fine-grained kernel cropping. Compatible with low-capacity products.
2.Support low-power mode.
2025-06-05 22:49:26 +08:00
MacRsh
70bce9b264 feat(kfifo): Add kfifo overwrite write function. 2025-05-14 23:56:35 +08:00
MacRsh
532d6e2bd6 feat(kfifo): Add the kernel fifo. 2025-05-14 00:51:16 +08:00
MacRsh
6a8628352e fix(ktimer): Fix the error check in the ktimer parameter check.
1.Fix the error tick >= (MR_TICK_MAX / 2) in the ktimer parameter check. The highest bit is used to mark the period, causing periodic timers to be unusable.
2025-05-12 23:51:19 +08:00
MacRsh
c6dc2d83c9 fix(string): Fix the logical errors of the "mr_ffs32" and "mr_ffs64" series interfaces.
1.Fix the incorrect result caused by the fls numerical conversion error.
2.Remove the ack mechanism in irq.
2025-05-11 23:55:58 +08:00
MacRsh
3d8fcd2fdc fix(kobject): Add an empty string ("") check.
1.New parameter checking has been added. Fixed the issue where an empty string ("", that is, only the end character) was passed in. The parameter checking of kobject failed to detect the problem, resulting in data errors.
2025-05-10 22:24:59 +08:00
MacRsh
8715e785b9 feat(irq): Add the IRQ defer feature.
1.The brand-new IRQ delay mechanism realizes delay processing by using the work queue. It is convenient to synchronize time-consuming operations to the thread environment for use. If in a bare-metal environment, the delay processing can be synchronized to the soft interrupt by using a soft interrupt.
2025-05-10 00:40:13 +08:00
MacRsh
641a29e455 feat(irq): New interrupt controller added.
1.New interrupt controller added, the unified takeover system interruption will be carried out. This module has not passed the test yet.
2025-05-07 00:59:04 +08:00
MacRsh
20a1e71d04 fix(entry,hook,atomic): Optimize warnings under different compilers.
1.Optimize keil entry points.
2.Modify the detection mode of atomic operations.
3.Optimize type conversion warnings.
2025-04-10 00:33:43 +08:00
MacRsh
707f7c58b7 fix(string/mr_strncpy): Fix padding errors while copying. 2025-04-03 00:29:03 +08:00
MacRsh
e819d60745 feat(libc,kref): Optimize internal implementation. 2025-04-01 23:15:18 +08:00
MacRsh
6ec649a02b docs(README): Update readme. 2025-03-13 22:15:09 +08:00
MacRsh
29428703b6 docs(README): Add readme. 2025-03-13 22:11:07 +08:00
MacRsh
3ecee007f4 refactor(tools): Remove the tool and prepare to release the minimum kernel version. 2025-03-13 20:36:31 +08:00
MacRsh
9547c02b82 fix(initcall,kworkqueue): Optimize kernel initialization process, optimize kernel workqueue hook.
1.Kernel initialization abandons the section feature and uses it only for user initialization.
2.The kernel work queue is optimized, and the transfer of the work queue in the threading environment can be completed by obtaining the semaphore in the hook and releasing the semaphore by the wakeup node.
2025-03-13 20:34:08 +08:00
MacRsh
e0342228ad feat(kworkqueue): Provide affinity scheduling for kwork (join a previously worked kworkqueue). 2025-03-12 00:25:27 +08:00
MacRsh
cbe32df329 feat(kworkqueue): Added work queue hook, remove osal.
1.The osal is merged into the module, the core structure is basically intact (except sscanf), and stability testing begins.
2025-03-11 23:21:53 +08:00
MacRsh
cb0e676930 feat(kworkqueue): Added work queue, fixed object lookup error put.
1.Added a work queue that supports instant and delayed start of multithreading (can be used without os, multithreading needs to create its own thread) to improve concurrency.
2.By adding parent2 to save the parent node, fixed an issue where forgetting the parent object changed when looking for an object, resulting in the wrong parent object being put when exiting.
2025-03-10 23:46:05 +08:00
MacRsh
62b92f2b3b fix(kobject): Fixed a lifecycle operation issue with the parent in the kernel object.
1.There is a delay in getting the parent when the kernel object is operating, making it possible to be insecure for some time. Fix this by adjusting the timing of access to the parent.
2025-03-09 23:32:00 +08:00
MacRsh
2c7efd9d5d feat(kobject): Optimize kobject lookup memory.
1.Optimize the short path registration and lookup process for kernel objects using stack memory.
2025-03-08 16:22:21 +08:00
MacRsh
dd832181ba feat(kobject,ktimer,printf): Kernel object added attribute, kernel timer ADAPTS attribute operation, fix printf print error.
1.Added attributes of kernel objects. You can directly manipulate the attributes supported by objects by running show and store.
2.The kernel timer has three attributes: tick,mode, and status. Because of the danger of OS operations, attributes are not supported by kernel OS objects.
3.Kernel printf has a bug when printing strings, an incorrect comparison condition causes the print to be missing content.
2025-03-06 23:46:11 +08:00
MacRsh
7d477f26ff feat(initcall): Optimize the initialization process. 2025-03-04 22:24:54 +08:00
MacRsh
45cb3d5183 feat(kmutex): Added kernel mutex. 2025-03-03 23:52:39 +08:00
MacRsh
ed754db9d9 fix(rt-thread): Fixed a bug where the thread type (static/dynamic) was not distinguished when a thread was deleted, causing assertions to be triggered. 2025-03-03 22:04:49 +08:00
MacRsh
5b4ae2a4f3 feat(kthread): kernel threads support static creation.
1.Kernel threads are supported by static stack creation, which is not reusable (i.e. secondary initialization) due to the release of threads in different os.
2025-03-03 21:53:19 +08:00
MacRsh
8bf3af77ab feat(os,port,initcall): Added kernel thread adaption for RT-Thread and FreeRTOS
1.Threads that fit RT-Thread and FreeRTOS.
2.Thread deletion and suspension support treats null as the current thread.
3.Supports automatic handling of initialization status. If the kernel is not initialized when the user initializes, the kernel is automatically initialized.
2025-03-02 00:26:01 +08:00
MacRsh
faa71c4026 refactor(kthread): Refactoring kernel threads to remove inlining.
Previous versions of the os memory inline within the kthread, making the adaptation of different os more complicated (because each thread deletion mechanism is different, the inline memory needs to wait until the thread is recycled before release); Kernel threads are now simplified, and the memory of thread objects remains in mr-X, while the memory of threads is managed by the os.
2025-02-28 23:16:29 +08:00
MacRsh
ea4123b24c fix(kthread): Optimize kthread runtime control.
1.The kthread adds a run-time reference counter, initialized to 0, and enters run-time management at startup.
2025-02-20 23:43:11 +08:00
MacRsh
b4652dcf9e style(printf): Optimize the code format. 2025-02-19 23:30:00 +08:00
MacRsh
63c97f6ea4 删除文件 arch/kos.c 2025-02-19 14:53:53 +00:00
MacRsh
7cb6fa173a feat(printf): Kernel integration custom lightweight printf. 2025-02-19 22:48:35 +08:00
MacRsh
dcc5b8c4ee style(all): Supports clipping components other than kernel objects 2025-02-18 21:30:51 +08:00
MacRsh
135d40a1ea fix(kthread.c): Fixed lifecycle management when threads take over.
1.The default thread is already started when the takeover takes place, so you need to increase the run time reference count after the takeover is successful.
2025-02-13 23:13:21 +08:00
MacRsh
b4f55fdc20 perf(kspinlock,kthread): Introduce spinlocks into the kernel and optimize kthread lifecycle management.
1.The level of spin lock required for kernel operation may be different in different environments, so separate the kernel from the application spin lock.
2.Optimize the lifecycle management of kThreads by creating a lifecycle for the runtime and releasing it in cleanup (instead of exit).
2025-02-12 21:54:32 +08:00
MacRsh
d28cca8766 fix(kos,kthread): Fixed thread lifecycle management issues. 2025-02-11 23:37:47 +08:00
MacRsh
3a4d77588c feat(kos): Added the os adaptation layer feature. 2025-02-11 20:16:27 +08:00
MacRsh
76e7efce33 refactor(all): The previous writing is not good so all refactoring. 2025-02-04 22:55:53 +08:00
MacRsh
967b18db25 refactor(all): Refactoring kernel objects and structures
1.Was not satisfied with the original kernel object implementation, so it was refactored.
2.Due to the structure, the rest also needs to be reconstructed.
2025-01-22 23:35:55 +08:00
MacRsh
dcc6539f93 feat(all,task): Refactor projects and add task scheduling.
1.It was reconstructed because the original project structure was not satisfied.
2.Developing without an OS was too difficult, so a separate stack coroutine was added.
2024-12-19 23:24:52 +08:00
MacRsh
f81f81396c feat(class,atomic): New class functions and class interfaces.
Class functions are functions used by users, and class interfaces are interfaces used for class abstraction.
At instantiation time, the interface is implemented through constructor injection.
2024-08-01 23:38:57 +08:00
MacRsh
6e3f2a1389 <feat>(class,atomic): Use classes to implement atomic
New class macros (classes, interfaces, implementations).
Implement the object-oriented atomic class using class macros.
2024-07-31 23:13:07 +08:00
MacRsh
e114e41ecc <feat>(class, tool): Lead-in class system, tool restricted Python version >= 3.10.0
A class system is introduced to implement OOPC-like functions(original class is temporarily removed).
Classes support automatic construction and destruction. Scope control is achieved by importing types.

Tool restrictions the minimum Python version is 3.10.0(type annotation syntax restrictions)
2024-07-29 00:34:21 +08:00
MacRsh
c9551080e5 <feat>(tools): New project tools
The tool supports build project(currently only supported MDK) and runs menuconfig.
2024-07-26 11:18:41 +08:00
MacRsh
ba3f400524 fix(atomic): Remove GNUC extension syntax.
Fixes compilation errors caused by GNUC extension syntax(Fully adopted C99 standard).
Temporary removal tools(Function incomplete).
2024-07-25 02:01:46 +08:00
MacRsh
4ac318667b feat(class): Supports determining whether it is a subclass
This change adds a new method to the class that allows checking whether a given class is a subclass of the base class.
The new rule states that the private data size of the subclass must be larger than that of the base class.
2024-07-24 00:21:42 +08:00
MacRsh
392f184ac7 refactor(all): 1.重构mr-library项目。
1.重构项目,将项目管理范围从设备驱动扩展到整体。引入class类型作为管理的基础单元。
2024-07-21 21:00:11 +08:00
MacRsh
c44ddf64e6 style(service): 格式重构,新增上下文控制器宏
body
1.行截断修改为100(原80),较完成的函数名和变量名导致频繁截断,过于影响观感。
2.对于运行前后需要对资源进行处理的任务,引入类似python的with上下文管理器。
2024-06-10 18:52:19 +08:00
MacRsh
f7f3f87a91 feat(device): 设备版本更新v1.0.0 2024-06-10 18:45:26 +08:00