-
Notifications
You must be signed in to change notification settings - Fork 665
[GSoC2025] Add Silicon Heaven protocol adaptation into NuttX and SHV examples #3170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
b1c5f3b
to
7ca6f60
Compare
.method = shv_fwstable_confirm | ||
}; | ||
|
||
static const shv_method_des_t * const shv_dev_fwstable_dmap_items[] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should also be fwStable:get
method that returns true
or false
based on fw status.
int rid) | ||
{ | ||
shv_unpack_data(&shv_ctx->unpack_ctx, 0, 0); | ||
shv_send_int(shv_ctx, rid, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shv_send_int(shv_ctx, rid, 1); | |
shv_send_int(shv_ctx, rid, 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm about to add a .app node into shv-libs4c library. After the fix, I shall remove the .app node definition.
'-i', '--image', | ||
dest='image', | ||
type=str, | ||
default='update.img', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default='update.img', | |
default='nuttx.nximg', |
ad61dea
to
12f3c4f
Compare
ae76556
to
b46e8ce
Compare
…xamples This commit marks the end of my GSoC 2025 project in the NuttX section. All changes: - Silicon Heaven protocol (SHV) implementation: The library is cloned from github.com/silicon-heaven/shv-libs4c and compiled here. The library has out-of-the-box support for NuttX and possibly all posix systems. The library is compiled with CONFIG_SHV_LIBS4C_PLATFORM define set to "nuttx". The library's dependancy is Pavel Pisa's ULUT and originates from Michal Lenc's GSoC. - examples/shv-nxboot-updater: An example which constructs a SHV tree with which you can perform firmware updates using a SHV "file node". The file node wraps around NXBoot's update partition. The application also allows for NXBoot confirmation of the images. This application is to be meant used as a "background service", started before any apps, possibly using rcS. The tree is allocated as GAVL (see below). - examples/shv-test: An example which constructs a SHV tree and gives the user the ability to choose which type of construction should be used, either: - GAVL: dynamic SHV tree allocation encapsulated within an AVL tree. - GSA: dynamic SHV tree allocation encapsulated within a continuous array with binary search - GSA_STATIC: SHV tree is defined as static const, this means all the data structures are placed in .rodata. Extremely beneficial for embedded systems, as .rodata is located in flash and embedded systems usually have more flash than sram, thus reducing sram usage. The downside is that the definitions are rather tedious, but can be automated in case of some code generation (like in pysimCoder). All of it is places in a continuous array with binary search. Signed-off-by: Stepan Pressl <[email protected]>
b46e8ce
to
b657b39
Compare
This commit marks the end of my GSoC 2025 project in the NuttX section.
Currently creating as a draft pull request.
I have agreed with Pavel Pisa to separate the library's dependancy named ulut from the shv-libs4c repository (located currently here https://github.com/silicon-heaven/shv-libs4c/tree/master/submodule). This will require more time for me. Also, I have discussed with Karel Koci from Elektroline a.s. about the posibilities of the exports of external libraries - something that I somehow solved in this commit: #3154.
In the end we have agreed that this should be considered as "hacking the whole Makefile system" and I should rather come up with a better solution, and thus I'm postponing it. Since I require the export for the GSoC, I'd be glad to leave it here as draft until I solve all the issues already mentioned.
I am about to add documentation into the nuttx repo, too.
Summary
Please look into the commit's verbose message :-).
Impact
Adds the Silicon Heaven protocol implementation. A framework designed to register your callbacks into your application. The callbacks are organized into nodes and the nodes can form a tree structure.
Testing
The testing was done on my custom samv7 board. In nuttx:
tools/configure.sh myboard/myconfig
- configuration OKmake
- downloads the shv-libs4c repo from github, and compiles OKDISCLAIMER: in my GSoC, I was using
make export
. But with the solution used here (https://github.com/zdebanos/pysimCoder/tree/shv-refactor) I succesfully compiled against automatically generated source code in pysimCoder.