Skip to content

Commit fe808e5

Browse files
committed
doxygen: convert 6.components
Signed-off-by: Chen Wang <[email protected]>
1 parent 8bd3dfb commit fe808e5

File tree

12 files changed

+447
-437
lines changed

12 files changed

+447
-437
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
11
@page components Components
2+
3+
- @subpage component_finsh
4+
- @subpage component_vfs
5+
- @subpage component_utest
6+
- @subpage component_dlmodule
7+
- @subpage component_sal
8+
- @subpage component_at
9+
- @subpage component_posix
10+
- @subpage component_ulog
11+
- @subpage component_pm
12+
- @subpage component_network

documentation/INDEX.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@
3535
- @ref device_wlan
3636
- @ref device_sensor
3737

38-
**Components**
39-
40-
- [FinSH Console](finsh/finsh.md)
41-
- [Virtual File System](filesystem/README.md)
42-
- [utest Framework](utest/utest.md)
43-
- [Dynamic Module: dlmodule](dlmodule/README.md)
44-
- [Socket Abstraction Layer: SAL](sal/sal.md)
45-
- [AT Commands](at/at.md)
46-
- [POSIX Interface](posix/README.md)
47-
- [Ulog Log](ulog/ulog.md)
48-
- [Power Management: PM](pm/pm.md)
49-
- [Network Framework](network/network.md)
38+
@subpage components
39+
40+
- @ref component_finsh
41+
- @ref component_vfs
42+
- @ref component_utest
43+
- @ref component_dlmodule
44+
- @ref component_sal
45+
- @ref component_at
46+
- @ref component_posix
47+
- @ref component_ulog
48+
- @ref component_pm
49+
- @ref component_network
5050

documentation/at/at.md

Lines changed: 40 additions & 40 deletions
Large diffs are not rendered by default.

documentation/dlmodule/README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Dynamic Module: dlmodule #
1+
@page component_dlmodule Dynamic Module: dlmodule
22

33
In traditional desktop operating systems, user space and kernel space are separate. The application runs in user space, and the kernel and kernel modules run in kernel space. The kernel module can be dynamically loaded and deleted to extend the kernel functionality. `dlmodule` is a software component of the dynamic module loading mechanism provided in kernel space of RT-Thread. In versions of RT-Thread v3.1.0, this was also called the `Application Module`. After RT-Thread v3.1.0 and later, it returned to the tradition and was named after the `dynamic module`.
44

55
`dlmodule` is more of an ELF format loader. The code segment and data segment of a separately compiled elf file are loaded into memory, and the symbols are parsed and bound to the API address exported by the kernel. The elf files are primarily placed on file systems under RT-Thread.
66

7-
## Introduction ##
7+
# Introduction
88

99
The dynamic module provides a mechanism for dynamically loading program modules for RT-Thread. Because it is also compiled independently of the kernel, it is more flexible to use. In terms of implementation, this is a mechanism to separate the kernel from the dynamic modules. Through this mechanism, the kernel and dynamic modules can be compiled separately, and at runtime, the compiled dynamic modules are loaded into the kernel through the module loader in the kernel.
1010

@@ -15,11 +15,11 @@ In the dynamic module of RT-Thread, two formats are currently supported:
1515

1616
The current RT-Thread architecture supporting dynamic modules mainly includes ARM architecture and x86 architecture, and will be extended to MIPS and RISC-V architecture in the future. The RT-Thread kernel firmware section can use a variety of compiler toolchains, such as GCC, ARMCC, IAR and other toolchains; however, dynamic module partial compilation currently only supports GNU GCC toolchain compilation. Therefore, compiling the RT-Thread module requires downloading GCC tools, such as CodeSourcery's arm-none-eabi toolchain. In general, it's best to use kernel and dynamic modules to compile with the same toolchain (so that it doesn't produce inconsistent behavior in *libc*). In addition, dynamic modules can only be loaded into RAM and used for symbol resolution binding to the API address exported by the kernel. Instead of running directly in XIP mode based on Flash (because Flash can't modify the code segment again).
1717

18-
## Using Dynamic Module ##
18+
# Using Dynamic Module
1919

2020
When you want to use the dynamic modules in your system, you need to compile a firmware that supports dynamic modules, as well as dynamic modules that need to be run. The following two parts are compiling firmware and compiling dynamic modules.
2121

22-
### Compile Firmware ###
22+
## Compile Firmware
2323

2424
When you want to use the dynamic module, you need to open the corresponding option in the firmware configuration, use menuconfig to open the following configuration:
2525

@@ -82,7 +82,7 @@ Then execute the `scons` under the BSP project directory and generate the firmwa
8282

8383
to generate the kernel header file search path and global macro definitions that need to be included when compiling the dynamic module.
8484

85-
### Compile Dynamic Module ###
85+
## Compile Dynamic Module
8686

8787
There is a separate repository on github: [rtthread-apps](https://github.com/RT-Thread/rtthread-apps) , which contains some examples of dynamic modules and dynamic libraries.
8888

@@ -151,11 +151,11 @@ int main(int argc, char *argv[])
151151
}
152152
```
153153
154-
## APIs of Dynamic Module
154+
# APIs of Dynamic Module
155155
156156
In addition to dynamically loading and executing dynamic modules via msh, dynamic modules can be loaded or unloaded using the dynamic module API provided by RT-Thread in the main program.
157157
158-
### Load Dynamic Module
158+
## Load Dynamic Module
159159
160160
```c
161161
struct rt_dlmodule *dlmodule_load(const char* pgname);
@@ -170,7 +170,7 @@ struct rt_dlmodule *dlmodule_load(const char* pgname);
170170

171171
This function loads the dynamic module from the file system into memory, and if it is loaded correctly, returns a pointer to the module. This function does not create a thread to execute this dynamic module, just load the module into memory and parse the symbolic address.
172172

173-
### Execute Dynamic Module
173+
## Execute Dynamic Module
174174

175175
```c
176176
struct rt_dlmodule *dlmodule_exec(const char* pgname, const char* cmd, int cmd_size);
@@ -187,7 +187,7 @@ struct rt_dlmodule *dlmodule_exec(const char* pgname, const char* cmd, int cmd_s
187187
188188
This function loads the dynamic module according to the `pgname` path and starts a thread to execute `main` of the dynamic module. At the same time, `cmd` is passed as the command line Parameter to `main` entry of the dynamic module.
189189
190-
### Exit Dynamic Module
190+
## Exit Dynamic Module
191191
192192
```c
193193
void dlmodule_exit(int ret_code);
@@ -199,7 +199,7 @@ void dlmodule_exit(int ret_code);
199199

200200
This function is called by the module runtime, it can set the return value of the module exit `ret_code`, and then exit from the module.
201201

202-
### Find Dynamic Modules
202+
## Find Dynamic Modules
203203

204204
```c
205205
struct rt_dlmodule *dlmodule_find(const char *name);
@@ -214,7 +214,7 @@ struct rt_dlmodule *dlmodule_find(const char *name);
214214
215215
This function uses `name` to find out if there is already a dynamic module loaded in the system.
216216
217-
### Return Dynamic Module
217+
## Return Dynamic Module
218218
219219
```c
220220
struct rt_dlmodule *dlmodule_self(void);
@@ -227,7 +227,7 @@ struct rt_dlmodule *dlmodule_self(void);
227227

228228
This function returns a pointer of the dynamic module in the calling context.
229229

230-
### Find Symbol
230+
## Find Symbol
231231

232232
```c
233233
rt_uint32_t dlmodule_symbol_find(const char *sym_str);
@@ -242,11 +242,11 @@ rt_uint32_t dlmodule_symbol_find(const char *sym_str);
242242
243243
This function returns the symbol address based on the symbol name.
244244
245-
## Libdl API of POSIX Standard ##
245+
# Libdl API of POSIX Standard
246246
247247
The POSIX standard libdl API is also supported in RT-Thread dlmodule. It is similar to loading a dynamic library into memory (and parsing some of the symbol information). This dynamic library provides the corresponding set of function operations. The libdl API needs to include the header files: `#include <dlfcn.h>`
248248
249-
### Open Dynamic Library
249+
## Open Dynamic Library
250250
251251
```c
252252
void * dlopen (const char * pathname, int mode);
@@ -262,7 +262,7 @@ void * dlopen (const char * pathname, int mode);
262262

263263
This function is similar to the `dlmodule_load` , which loads the dynamic library from the file system and returns the handle pointer of the dynamic library.
264264

265-
### Find Symbol
265+
## Find Symbol
266266

267267
```c
268268
void* dlsym(void *handle, const char *symbol);
@@ -278,7 +278,7 @@ void* dlsym(void *handle, const char *symbol);
278278
279279
This function looks in the dynamic library `handle` for the presence of the symbol of `symbol` , if there is an address that returns it.
280280
281-
### Close Dynamic Library
281+
## Close Dynamic Library
282282
283283
```
284284
int dlclose (void *handle);
@@ -293,15 +293,15 @@ int dlclose (void *handle);
293293
294294
This function closes the dynamic library pointed to by `handle` and unloads it from memory. It should be noted that when the dynamic library is closed, the symbolic address originally returned by `dlsym` will no longer be available. If you still try to access it, it may cause a fault error.
295295
296-
## FAQs
296+
# FAQs
297297
298-
Please refer to [*User Manual of Env*](../env/env.md) for issues related to the Env tool.
298+
Please refer to @ref env for issues related to the Env tool.
299299
300-
### Q: Dynamic modules cannot be run successfully according to the documentation.
300+
## Q: Dynamic modules cannot be run successfully according to the documentation.
301301
302302
**A:** Please update the RT-Thread source code to version 3.1.0 and above.
303303
304-
### Q: Compile the project with the scons command, prompting "undefined reference to __rtmsymtab_start".
304+
## Q: Compile the project with the scons command, prompting "undefined reference to __rtmsymtab_start".
305305
306306
**A:** Please refer to the qemu-vexpress-a9 BSP GCC link script file *link.lds* to add the following to the TEXT section of the project's GCC link script.
307307

0 commit comments

Comments
 (0)