| orphan: |
|---|
| vendor: | @xross |
|---|---|
| version: | 0.1.0 |
| scope: | Demo |
| description: | Plugin-like system for xcore |
| category: | Gerneral purpose |
| keywords: | |
| devices: | xcore-200, xcore.ai |
lib_xtnd (xcore Tactical Node Delivery) allows load and execution of code from flash (not XIP)
where the whole application is not known at compile time.
This is useful for applications that wish to allow some limited form of extensibililty by a user,
for example for adding custom code to an ASSP.
Recent renames standardise file and artifact names:
xtnder_exports.S(export table, wasxtender_export.S)xtnder.c/xtnder.xc(wasxtender.c/xtender.xc)- Generated blob artifacts now
xtnder_blob.bin+xtnder_blob.hwith symbolxtnder_blob_bin(wasxtnd_blob.bin/xtnd_blob.h/xtnd_blob_bin)
Update any existing build scripts or includes accordingly. Helper CMake functions in xtnd_utils.cmake now default to these names.
- Provides an easy way to bundle and call code from a plugin (or "xtender") binary
- No special tools or libraries required to build or use
- Look up plugin functions by simple names
- Runs plugin “startup” functions (constructors) when loaded such that resource such as ports can be used
- Small, fast(ish), and comes with clear examples to copy
- No dependencies on other tools or libraries (other than lquadflash for loading from flash)
- All tests and examples should use a fixed a address when loading the xtnder
- is there a better way to handle fixed address and size of xtnder?
- In tests use a shared set of xtenders rather than building them into each test app
- Add a free function to unload the xtender - write a test
- Deal with current fixed int f(int, int) signature
- What is a plugin spawns a thread and uses a timer?
- There is potential issue with pollution of timers between host and plugins when using xc pool timers, however, it's been hard to make a test case for this as the xc compiler seems to fully setup a timer event properly when used or simply uses the gettime instuction.
- Use a single tile xn when building the xtender
- use xmap --first FILE rather than ordering of src files to xcc
- Split ASSP and author and user documentation
- Check for fn count > number of functions in blob
- Documentation improvements
- Remove debug prints (use lib_logging)
- Add hashing for function names
- Run destructors
- Automate function count in user code(?)
- Allow export table to live anywhere in the binary(?)
- Blob checking - checksum/signature etc
- Can we get a free CRC from from an xflash upgrade image? * Use a program running in xsim to generate the CRC?
- Patch plugin for syscalls? (or find another soluton)
- Add thread hobbling to documentation
- xc lock allocated
- Bad magic number
- Bad version number
- Missing function
- Blob too big
- Blob too small
- Flash load
- Limited code integrity checks: no checksum/signature; trust on load.
- Printing from plugin code is a faff (must use un-documented --syscall-address option to xsim)
- Fixed call signature: all exported functions assumed int f(int,int).
- No destructor support yet.
- No isolation or sandbox: plugin code can crash or corrupt host state.
- Blobs must be built for exact layout - build system a bit a abused to achieve this
- Minimal error reporting: failures inside plugin are indistinguishable from valid return codes.
- Stack usage hard-coded: trampoline declares fixed stack words; oversized plugin frames risk overflow.
- XMOS XTC Tools: 15.3.1
- None
- None
Issues can be raised against the software at using GitHub issues.