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

Uniformization of behaviour of the eUpdater of amc, ems, mc4plus and mc2plus #490

Merged
merged 3 commits into from
Apr 8, 2024

Conversation

marcoaccame
Copy link
Contributor

@marcoaccame marcoaccame commented Apr 8, 2024

This PR makes sure that the eUpdater of the all the ETH boards behaves in the same way, so that the FirmwareUpdater receives the same replies from all ETH boards.

More details

If the FirmwareUpdater sends commands with opc = uprot_OPC_PROG_DATA with a chunk of data with address that does not belong to the valid FLASH of the receiving board, now all boards behave in the following way:

  • they don't use the data to program the FLASH,
  • they send a reply result of type uprot_RES_OK to tell that the board has successfully managed the command despite the fact that the data to program was not valid.

This behavior is needed because, so far, FirmwareUpdater reads the .hex files and sends commands for every chunk of data the file contains, even if that memory does not belong to FLASH.

So, we need a protection in the board vs wrong memory programming (and that was already implemented) but we also need that the board sends back a uprot_RES_OK to FirmwareUpdater so that this latter can print / return a OK result.

This PR makes sure that amc, ems, mc4plus and mc2plus do that.

Tests

I have tested the new code on an ems and an amc board and FirmwareUpdater succeeds in programming the boards.
It however prints a KO result because of an incorrect count of the number of sent commands.

Behavior of FirmwareUpdater for versions of eUpdater v2.23

The binary of eUpdater, version v2.23, has worked fine in updating its FLASH, so we don't need to operate any retrofit.

Cleaning up

The changes for the above are just the five .c files. However, I noticed that there are a lot of un-necessary .hex binaries in the env folders of ems, mc4plus and mc2plus so I have removed them

Further PRs

Binaries in icub-firmware-build

As per title. The PR will soon come.

Changes to FirmwareUpdater

As previously written, the boards legacy and new binaries of eUpdater are robust vs wrong uprot_OPC_PROG_DATA commands, but FirmwareUpdater prints a KO result despite the programming of the FLASH is successful.

To solve the KO result in FirmwareUpdater we need to:

@marcoaccame marcoaccame merged commit 6abd549 into robotology:devel Apr 8, 2024
davidetome added a commit to davidetome/icub-main that referenced this pull request Apr 11, 2024
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

Successfully merging this pull request may close these issues.

1 participant