Familiar with the software and hardware environment of RT-Thread [RT-Thread Study Notes 1] and rt-thread Study Notes
Software environment: Win7 + MDK4.7.2
Hardware environment: STM32F4Discovery
OS code used: RT-Thread2.0.0 beta: https://github.com/RT-Thread/rt-thread/archive/v2.0.0_beta.zip
After decompression, use \ rt-thread-2.0.0_beta \ bsp \ stm32f40x \ project. uvproj for the experiment.
Scons and python are not used. This is not necessary.
Today, I am only familiar with the software environment:
1,RTGo to mainBefore,
Like a normal MDK-STM32 program. The SystemInit function in the system_stm32f4xx.c file is used to initialize the clock.
2,MainThe function is located in startup. c.File. For two jobs
Before the system starts, rt_hw_interrupt_disable will disable all interruptions.
Then start RTThread with rtthread_startup
3, Function rtthread_startup ()Completed tasks:
1. Call the rt_hw_board_init function to initialize the board.
2. display version information: rt_show_version
3. initialization system ticking: rt_system_tick_init
4. system kernel object initialization: rt_system_object_init
5. Timer initialization: rt_system_timer_init
6. System stack initialization rt_system_heap_init
7. Task Scheduler initialization: rt_system_scheduler_init
8. rt_application_init // Add a custom task
9. FINSH module initialization,
10. Timer thread initialization: rt_system_timer_thread_init
11. initialize rt_thread_idle_init for idle tasks
12. Start task scheduling. The OS takes over the MCU: rt_system_scheduler_start.
After the task scheduling starts, the OS is started. The subsequent tasks are all run under the OS management.
4In RTTHow to add a peripheral driver in the example project:
Add driver header file to board. h
Domestic RTOS, such as Dujiangyan real-time operating system? RT-Thread? And so on. Are there other things besides these two? Is there a company dedicated to RTOS?
RT-Thread RTOS
This is an open-source real-time operating system developed by RT-Thread studio in China. RT-Thread is a real-time kernel (fully preemptible priority scheduling, scheduler time complexity O (1), but in the development process, the RT-Thread real-time operating system is fully supported by embedded development engineers from all over the country and has become a complete and full-featured operating system: file system, network protocol stack, graphical interface components... Only you can't think of it, but you can't do it: RT-Thread is a platform. You can bring your ideas together. The RT-Thread developers are at your side in the big community of the small platform.
How does rt-thread build a gui?
RT-Thread/GUI is designed for the RT-Thread operating system, and RT-Thread features are used in corresponding places, it is a graphic interface with independent intellectual property rights, which is almost written from scratch (excluding JPEG, PNG, and other graphic libraries ). Under the terms of the RT-Thread license, it can be used in commercial products for free. Features of RT-Thread/GUI include:
-Multi-threaded graphical user interface;
-Depends on the Real-Time graphical user interface of the RT-Thread scheduler;
-Introduce the Panel concept in an innovative embedded system to reduce the multi-thread and Multi-Window graphical user interface programming costs:
* Workbench, which corresponds to multiple threads;
* View, corresponding to different user interface views;
* Window, corresponding to multiple windows;
-Comprehensive object-oriented design in C language:
* The object has runtime type information;
* Automatic destruction of objects makes memory management easier;
-Rich controls:
* Button, checkbox, radiobox
* Textbox
* Progressbar, slider
* Listview, filelist_view