REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
Reserves storage in the data segment (address space that constains static variables, i.e. More...
#include <plugin.h>


Public Member Functions | |
GlobalPluginLoader () | |
![]() | |
bool | can_load () const |
int | load (const Plugin &new_plugin) |
returns 0 on success | |
void | unload () |
frees memory, does not call unloader. | |
virtual int | load_and_execute (JsonObjectConst msg_in, JsonObject &msg_out) |
load from protocol message, gives out reply msg, returns 0 on success | |
virtual int | unload (JsonObjectConst msg_in, JsonObject &msg_out) |
unload from protocol message, gives out reply msg, returns 0 on success | |
Additional Inherited Members | |
![]() | |
optional< Plugin > | plugin |
The slot for a single managed plugin (if loaded). It's load_addr defines the memory address. | |
uint8_t * | load_addr =0 |
Absolute address of the memory segment. It is always (plugin->load_addr = load_addr). | |
uint32_t | memsize =0 |
The maximum memory size managed/accessible/available by this loader. It is always (plugin->size <= memsize). | |
Detailed Description
Reserves storage in the data segment (address space that constains static variables, i.e.
global variables or static local variables) and uses that storage for loading plugin code at runtime.
Pros: (1.) Address is well-known at compile time for a given firmware, this simplifies linking of plugin code. (2.) Plugin loader communcation is reduced thanks to fixed address. Cons: (1.) Storage is always reserved regardless of whether used or not (2.) Cannot grow (cannot hold bigger code then the reserved memory)
Use the compile time constant ANABRID_ENABLE_GLOBAL_PLUGIN_LOADER to enable this mechanism.
Constructor & Destructor Documentation
◆ GlobalPluginLoader()
FLASHMEM GlobalPluginLoader::GlobalPluginLoader | ( | ) |
Definition at line 55 of file plugin.cpp.
References utils::align(), utils::disalignment(), GlobalPluginLoader_Storage, loader::SinglePluginLoader::load_addr, LOGMEV, loader::SinglePluginLoader::memsize, prepare_mpu(), and the_memsize.
The documentation for this struct was generated from the following files:
- lib/controller/src/plugin/plugin.h
- lib/controller/src/plugin/plugin.cpp