Skip to content
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

Expected way to include functionality to objects #638

Open
hannestschofenig opened this issue Dec 3, 2021 · 3 comments
Open

Expected way to include functionality to objects #638

hannestschofenig opened this issue Dec 3, 2021 · 3 comments

Comments

@hannestschofenig
Copy link

Imaging the following use case: I would like to use Wakaama to perform a firmware update and thereby use the firmware update object. The Wakaama client contains the object_firmware.c but there is no code that actually does the firmware update.

What is the expected way to add this necessary code?

Would I write it directly into object_firmware.c (which would be easy)? If so, re-usability becomes a challenge.

@LukasKarel
Copy link

In my opinion it depends.
You cant describe a firmware update process which is usable for all targets (Linux-based client, bare metal microcontroller without OS, ...). Therefore you must implement the firmware update process in a own object_firmware.c specific for your target.

@hannestschofenig
Copy link
Author

So, your proposal is to create a new object_firmware.c file that implements the necessary functionality and to leave the existing file as is.

That's a possible approach but will lead to a situation where nobody contributes platform-specific code to Wakaama, which makes Wakaama usable only for educational purposes rather than something that can be used for actual deployments.

There are projects that follow a different approach. For example, the Mcuboot project implements a bootloader and it can be run on existing hardware while at the same time offering an abstract level that remains unchanged from the hardware. The consequence is that you can actually run it on hardware and if you need to port it to an unsupported hardware platform you can use the existing code as a reference.

@LukasKarel
Copy link

I agree with you. But at the current state of the project there is no useable abstraction (except networking). And as the development of wakaama is inactive again I wouldnt expect that this will change in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants