Hello
I am working on a firmware project involving RT117x. My development stack includes FreeRTOS, LittleFS, and the gcc-arm-none-eabi toolchain. I'm currently exploring the implementation of a dynamic linker/loader system to enable plugin functionality, where clients can independently develop and deploy their algorithms.
While I am aware of solutions like the Linkable Loadable Extensions (LLEXT) in Zephyr OS and dynamic linking approaches like udynlink, I am constrained to use FreeRTOS for this project, and thus, I am seeking alternative solutions within this environment.
Specifically, I am looking for insights on:
I'd appreciate any advice, experiences, or references to similar projects within the NXP ecosystem. Thank you for your support!
best regards
Max
Hi @mastupristi
I just started looking at shared objects in ELF ET_DYN format ( *.so using linux) for Zephyr or FreeRTOS and came across this post.
Perhaps that ET_DYN / shared objects could be of some use to you?
Allows import and export, allows some introspection although there is no info on function (parameter) types as far as I can tell.
Plausibly you have made your decisions by now (yes, I am "a bit late to the party"); if so perhaps you have some pointers you would like to share ?
Kind regards
BoE
I don't know ELF ET_DYN format. I tried googling something, but if you give me some links it might be better.
I started studying zephyr's llext with the idea of porting what I need
best regards
Max
Have not made notes of (most) bits and pieces I have gathered, but below a (very) brief summary of my (current) understanding, followed by some reasonably related and relevant links.
Info that can be found a shared object file (elf ET_DYN)
Unsurprisingly loading to be done in close cooperation with OS used; loading mechanism can be provided by OS.
Seems to be outside of FreeRTOS (primary) scope; while I have seen some pointers to rolling-your-own loader, I don't seem to have saved them.
I think (some) Lite-OS related OS's provide dynamic loading
QNX neutrino docs describe how
"... Not all systems support dynamic loading. Unix-like operating systems such as macOS, Linux, and Solaris provide dynamic loading with the C programming language "dl" library. ..."
Hello,
Thank you in advance for contacting NXP support.
Can you please help me clarifying a point you are willing to use freertos to allocate memory in a dynamic way like in the following post?
Or you are just looking to have an specific link file for the application?
Can you please help me clarifying a point you are willing to use freertos to allocate memory in a dynamic way like in the following post?
Or you are just looking to have an specific link file for the application?
I'll try to clarify further (although I think I explained it well enough in my previous post)
I have my own FW, but I have to provide the user with the ability to write, compile, and run its plugins.
What does this mean? The user should not be forced to compile the entire FW by adding its algorithms into the complete set of source files. Conversely, it should be possible to add user algorithms at runtime (the user will be provided with some kind of SDK).
My development stack includes:
Of course, the whole feature must also include the dynamic linker/loader (which will be contained in the FW).
Searching the Internet, I found a couple of projects:
so I repeat and argue the most important and urgent points that I need to know/understand:
I hope this will be enough to clarify the use case and what I'm looking for
regards
Max
Hello,
Thank you in advance for clarifying your information an need I believe that in the Chapter 19 of the MCUXpresso documentation you can find a root to your implementation. Please let me know if there is anything else where I can help you.
I read chapter 19, but it talks about how to configure MCUXpresso IDE to build executables with various options.
I can't figure out how this is going to help me do what I need to do.
Could you kindly point me to or cite the sections that you think are most useful?
In the meantime, I have made the decision to use the elf format for plugins. With this Question 1 should close. This will obviously force me to find an elf interpreter that is feasible in the baremetal context. Do you have any advice for me? Do you know any elf parser projects for microcontrollers (maybe on github)?
regards
Max
Hello,
Please give me a moment to verify if we have something we can offer for the .elf parser. I would let you know ASAP.