The Contiki program loader is an abstract interface for loading and starting programs. More...
Data Structures | |
| struct | dsc |
| The DSC program description structure. More... | |
Modules | |
| The Contiki ELF loader | |
The Contiki ELF loader links, relocates, and loads ELF (Executable Linkable Format) object files into a running Contiki system. | |
Files | |
| file | loader.h |
Default definitions and error values for the Contiki program loader. | |
Defines | |
| #define | DSC(dscname, description, prgname, process, icon) CLIF const struct dsc dscname = {description, prgname} |
| Instantiating macro for the DSC structure. | |
| #define | LOADER_OK 0 |
| No error. | |
| #define | LOADER_ERR_READ 1 |
| Read error. | |
| #define | LOADER_ERR_HDR 2 |
| Header error. | |
| #define | LOADER_ERR_OS 3 |
| Wrong OS. | |
| #define | LOADER_ERR_FMT 4 |
| Data format error. | |
| #define | LOADER_ERR_MEM 5 |
| Not enough memory. | |
| #define | LOADER_ERR_OPEN 6 |
| Could not open file. | |
| #define | LOADER_ERR_ARCH 7 |
| Wrong architecture. | |
| #define | LOADER_ERR_VERSION 8 |
| Wrong OS version. | |
| #define | LOADER_ERR_NOLOADER 9 |
| Program loading not supported. | |
| #define | LOADER_LOAD(name, arg) LOADER_ERR_NOLOADER |
| Load and execute a program. | |
| #define | LOADER_UNLOAD() |
| Unload a program from memory. | |
| #define | LOADER_LOAD_DSC(name) NULL |
| Load a DSC (program description). | |
| #define | LOADER_UNLOAD_DSC(dsc) |
| Unload a DSC (program description). | |
The Contiki program loader is an abstract interface for loading and starting programs.
The Contiki DSC structure is used for describing programs.
It includes a string describing the program, the name of the program file on disk (or a pointer to the programs initialization function for systems without disk support), a bitmap icon and a text version of the same icon.
The DSC is saved into a file which can be loaded by programs such as the "Directory" application which reads all DSC files on disk and presents the icons and descriptions in a window.
| #define DSC | ( | dscname, | |||
| description, | |||||
| prgname, | |||||
| process, | |||||
| icon | ) | CLIF const struct dsc dscname = {description, prgname} |
Instantiating macro for the DSC structure.
| dscname | The name of the C variable which is to contain the DSC. | |
| description | A one-line text describing the program. | |
| prgname | The name of the program on disk. | |
| initfunc | A pointer to the initialization function of the program. | |
| icon | A pointer to the CTK icon. |
| #define LOADER_ERR_NOLOADER 9 |
| #define LOADER_LOAD | ( | name, | |||
| arg | ) | LOADER_ERR_NOLOADER |
Load and execute a program.
This macro is used for loading and executing a program, and requires support from the architecture dependent code. The actual program loading is made by architecture specific functions.
| name | The name of the program to be loaded. | |
| arg | A pointer argument that is passed to the program. |
| #define LOADER_LOAD_DSC | ( | name | ) | NULL |
| #define LOADER_UNLOAD | ( | ) |
1.6.1