-
Notifications
You must be signed in to change notification settings - Fork 103
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
Firmwareupdater
– Add support for other processes on multi-core boards
#850
Conversation
@@ -1001,6 +1008,8 @@ void MainWindow::onAppendInfo(boardInfo2_t info,eOipv4addr_t address) | |||
infoTreeWidget->addTopLevelItem(bootStrapNode); | |||
infoTreeWidget->addTopLevelItem(propertiesNode); | |||
|
|||
constexpr uint8_t maxNumberOfProcessesOnSingleCore {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 can see that later on we have a switch(info.boardtype) where it is missing the case of amc.
Some comments:
- the string name in here is wrongly obtained by a switch case and we don't have
amc
. That is a wrong implementation. Because there is another mode of obtaining the string and is by using the relevant functioneoboards_type2string()
inside icub-firmware-shared. We should stick to this latter otherwise we duplicated code and we shall surely forget to change the code in here when new boards come along. - At the same mode, if we want to know if the board has two cores, it is wise to add a function inside icub-firmware-shared. Something as:
eoboards_type2numberofcores()
.
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.
fixed (partially?) in f0b7ded
@@ -815,8 +866,8 @@ std::string EthMaintainer::processMoreInfoReplies(EthBoardList &boardlist) | |||
|
|||
while(mSocket.ReceiveFrom(rxipv4addr, rxipv4port, mRxBuffer, sizeof(mRxBuffer), 500) > 0) | |||
{ | |||
eOuprot_cmd_MOREINFO_REPLY_t *moreinfo = (eOuprot_cmd_MOREINFO_REPLY_t*) mRxBuffer; |
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.
Just a memo to myself for later: so in here we don't need / manage a eOuprot_cmd_MOREINFO2_REPLY_t
, or do we?.
@@ -1066,6 +1115,112 @@ std::string EthMaintainer::prepareMoreInfoText(eOuprot_cmd_DISCOVER_REPLY_t * di | |||
return info; | |||
} | |||
|
|||
std::string EthMaintainer::prepareMoreInfoText(eOuprot_cmd_DISCOVER_REPLY2_t * disc, const char *ipv4rxaddr_string) |
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.
Just a memo to myself: have a look at that.
@@ -22,6 +22,7 @@ const int EthUpdater::partition_UPDATER = uprot_partitionUPDATER; | |||
#define PRINT_DEBUG_INFO_ON_TERMINAL | |||
|
|||
|
|||
// TODO: check here if it is called and when (it seems that it's never called) |
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.
Just a check to myself: Is this code called by the FirmwareUpdater
?
- Resolve some todos simplifying the code - Remove unused dead code - Fix indentation - Fix comparisons between different naive types
- These changes allow the `FirmwareUpdater` to discover and update the processes running on multicore boards such as the `AMC` boards family
- replace `else if` instead of `if` in `EthMaintainer` for `uprot_OPC_DISCOVER2` - get the string type of a board using the convert function instead of checking manually the `info.boardtype` structure.
Hi @sgiraz, I will merge these two linked PRs:
and you should put this PR in ready to review state. @pattacini: the PR is ok by me |
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.
ok by me
Awaiting the CI before merging. |
CI failed, @sgiraz. Could you please have a look at the report? Version of dependencies used:
|
…ed` version 1.30.0
What's new:
main changes
eOuprot_cmd_DISCOVER_REPLY2_t
to parse the reply coming from the AMC multi-core family boards.uprot_OPC_DISCOVER2
help theprocessDiscoveryReplies2
to discriminate the parsing strategy, maintaining the back-compatibility with the existing ones.prepareMoreInfoText
now parses the info contained in theextraprocesses
when they exist.minor changes
cmake_minimum_required
to VERSION 3.12Erase Application
button is visible when running theFirmwareupdate
with the administrator privileges (-a
)EthUpdater.cpp
Notes:
Erase Application
is currently a work in progress, so at the moment it does nothing (it is disabled by default)cc @pattacini @marcoaccame @mfussi66 @davidetome