48 PROCESS(shell_exec_process,
"exec");
51 "exec <filename>: load and execute the ELF file filename",
62 if(name ==
NULL || strlen(name) == 0) {
64 "exec <file>: filename must be given",
"");
76 "exec: could not open ", name);
90 print =
"Bad ELF header";
93 print =
"No symbol table";
96 print =
"No string table";
99 print =
"No text segment";
102 print =
"Symbol not found: ";
106 print =
"Segment not found: ";
110 print =
"No starting point";
113 print =
"Unknown return code from the ELF loader (internal bug)";
133 shell_exec_init(
void)
#define ELFLOADER_NO_TEXT
Return value from elfloader_load() indicating that the size of the .text segment was zero...
#define ELFLOADER_SEGMENT_NOT_FOUND
Return value from elfloader_load() indicating that one of the required segments (.data, .bss, or .text) could not be found.
void elfloader_init(void)
elfloader initialization function.
int cfs_open(const char *name, int flags)
Open a file.
void shell_output_str(struct shell_command *c, char *text1, const char *text2)
Output strings from a shell command.
#define PROCESS_EXIT()
Exit the currently running process.
#define PROCESS_BEGIN()
Define the beginning of a process.
#define CFS_WRITE
Specify that cfs_open() should open a file for writing.
int elfloader_load(int fd)
Load and relocate an ELF file.
#define NULL
The null pointer.
#define CFS_READ
Specify that cfs_open() should open a file for reading.
#define ELFLOADER_NO_STRTAB
Return value from elfloader_load() indicating that no string table could be found in the ELF file...
#define ELFLOADER_NO_SYMTAB
Return value from elfloader_load() indicating that no symbol table could be found in the ELF file...
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
cle_scratch elfloader_unknown
If elfloader_load() could not find a specific symbol, it is copied into this array.
#define PROCESS_END()
Define the end of a process.
void shell_register_command(struct shell_command *c)
Register a command with the shell.
#define PROCESS(name, strname)
Declare a process.
struct process *const * elfloader_autostart_processes
A pointer to the processes loaded with elfloader_load().
#define ELFLOADER_BAD_ELF_HEADER
Return value from elfloader_load() indicating that the ELF file had a bad header. ...
#define ELFLOADER_SYMBOL_NOT_FOUND
Return value from elfloader_load() indicating that a symbol specific symbol could not be found...
#define ELFLOADER_OK
Return value from elfloader_load() indicating that loading worked.
A brief description of what this file is.
#define ELFLOADER_NO_STARTPOINT
Return value from elfloader_load() indicating that no starting point could be found in the loaded mod...
Header file for the Contiki ELF loader.
#define SHELL_COMMAND(name, command, description, process)
Define a shell command.
void cfs_close(int fd)
Close an open file.