Install module to run in flash.
More...
|
struct | app_installer_info_t |
|
typedef void(* | module_init_func_t) (void) |
|
typedef void(* | module_cleanup_func_t) (void) |
|
rt_err_t | mod_install (const char *mod_name, const char *package_path, const char *install_path) |
| Install dlmodule. More...
|
|
rt_err_t | app_install (app_installer_info_t *info) |
| Install application. More...
|
|
int32_t | app_uninstall (const char *app_name, const char *res_install_path, const char *pgm_install_path) |
| Uninstall application. More...
|
|
int32_t | mod_installer_init (uint32_t sys_prog_start_addr, uint32_t sys_prog_end_addr) |
| Init mod_installer. More...
|
|
#define | DLMODULE_STRINGIFY_(val) #val |
|
#define | DLMODULE_STRINGIFY(val) DLMODULE_STRINGIFY_(val) |
|
#define | DLMODULE_CONCAT_2_(p1, p2) p1##p2 |
|
#define | DLMODULE_CONCAT_2(p1, p2) CONCAT_2_(p1, p2) |
| Concatenates two parameters. More...
|
|
#define | MODULE_CONTEXT (DLMODULE_CONCAT_2(MODULE_NAME, _ctx)) |
|
#define | MODULE_CONTEXT_DEFINE static MODULE_USER_DATA_TYPE *MODULE_CONTEXT |
|
#define | MODULE_CONTEXT_ALLOC() do { MODULE_CONTEXT = rt_malloc(sizeof(MODULE_USER_DATA_TYPE)); RT_ASSERT(MODULE_CONTEXT)} while (0) |
|
#define | MODULE_CONTEXT_FREE() do {rt_free(MODULE_CONTEXT); MODULE_CONTEXT = RT_NULL;} while (0) |
|
#define | MODULE_INIT_DEF(init_func) |
|
#define | MODULE_CLEANUP_DEF(cleanup_func) |
|
#define | MODULE_NAME module |
|
Install module to run in flash.
◆ DLMODULE_CONCAT_2
#define DLMODULE_CONCAT_2 |
( |
|
p1, |
|
|
|
p2 |
|
) |
| CONCAT_2_(p1, p2) |
Concatenates two parameters.
It realizes two level expansion to make it sure that all the parameters are actually expanded before gluing them together.
- Parameters
-
p1 | First parameter to concatenating |
p2 | Second parameter to concatenating |
- Returns
- Two parameters glued together. They have to create correct C mnemonic in other case preprocessor error would be generated.
◆ DLMODULE_STRINGIFY
#define DLMODULE_STRINGIFY |
( |
|
val | ) |
DLMODULE_STRINGIFY_(val) |
Converts a macro argument into a character constant.
◆ app_install()
Install application.
- Parameters
-
[in] | info | Application installer info |
- Return values
-
RT_EOK | success, other: fail, negative value for error code, such as -RT_ERROR |
◆ app_uninstall()
int32_t app_uninstall |
( |
const char * |
app_name, |
|
|
const char * |
res_install_path, |
|
|
const char * |
pgm_install_path |
|
) |
| |
Uninstall application.
- Parameters
-
[in] | app_name | application name |
[in] | res_install_path | Resource install path |
[in] | pgm_install_path | Program install path |
- Return values
-
◆ mod_install()
rt_err_t mod_install |
( |
const char * |
mod_name, |
|
|
const char * |
package_path, |
|
|
const char * |
install_path |
|
) |
| |
Install dlmodule.
- Parameters
-
[in] | mod_name | module name |
[in] | package_path | .so file path |
[in] | install_path | where to install the module |
- Return values
-
RT_EOK | success, other: fail, negative value for error code, such as -RT_ERROR |
◆ mod_installer_init()
int32_t mod_installer_init |
( |
uint32_t |
sys_prog_start_addr, |
|
|
uint32_t |
sys_prog_end_addr |
|
) |
| |
Init mod_installer.
- Parameters
-
[in] | sys_prog_start_addr | Start address of system program |
[in] | sys_prog_end_addr | End address of system program |
- Return values
-