-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
samples: benchmarks: coremark: migrate to STM logging on nrf54h20dk #17479
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 8aabb18701fb7da017228e951fd29a4fd2ef0d35 more detailssdk-nrf:
Github labels
List of changed files detected by CI (19)
Outputs:ToolchainVersion: f51bdba1d9 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
Third item on TODO list is potentially fixed by the following PR: |
ef4112e
to
7547a60
Compare
Standard rebase |
7547a60
to
be446fd
Compare
small fix for |
Rebasing to fix conflicts after upmerge |
Rebased on top of the newest main branch |
Added changes to address the missing items |
Rebased on top of the newest main branch |
Added changelog entries. |
return; | ||
} | ||
|
||
LOG_INF("Logging is stalled until the logging core finishes the CoreMark benchmark\n"); |
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.
until the application core finishes
- shouldn't be more specific here - it might be not obvious to user that application core is doing logging.
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.
Hmm, I wanted to generalize it as we may change the logging core. Perhaps until this core finishes
? The user gets the domain prefix next to this log
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.
wouldn't then it say that for every core and "Logging is stalled" only when appcore is busy?
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 wonder if even we need this as a log. Comment won't be enough?
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 think the log here is helpful and is not very intrusive (one log per app core benchmark start). When the app core starts executing the benchmark it looks as if the system stalled. Apart from that, users may omit the note from Readme and get confused when logs do not appear when they are running benchmarks on remaining cores.
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.
Logging is blocked for all cores until this core finishes the CoreMark benchmark
@@ -130,7 +130,7 @@ int main(void) | |||
k_panic(); | |||
} | |||
|
|||
LOG_INF("Press %s to start the test ...", BUTTON_LABEL); | |||
LOG_INF("Press %s to start the test ...\n", BUTTON_LABEL); |
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.
this doesn't really improve readability, it looks really weird in the output
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.
This sample already uses break lines in other places, I wanted to add them here for consistency so that we have a line break before every wait period (e.g. k_sem_take
).
if (IS_ENABLED(CONFIG_APP_MODE_FLASH_AND_RUN)) { | ||
LOG_INF("CoreMark finished! Press the reset button to restart...\n"); | ||
} else { | ||
LOG_INF("CoreMark finished! Press %s to restart ...\n", BUTTON_LABEL); |
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.
likewise here, jarring
Addressed reviewe comments |
ba59f44
to
d874a10
Compare
small update of the static function name |
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publish GitHub Action. |
Optimized the stack size in the multiple thread configuration of the CoreMark sample. Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
The CoreMark sample now uses logging in the STM standalone mode for the nRF54H20 DK target. Ref: NCSDK-27517 Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Applied the same logging format in the standard logging mode as is currently used in the multi-domain logging mode in the CoreMark sample. Ref: NCSDK-27517 Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
d874a10
to
51c6389
Compare
Optimized the stack size in multiple thread configuration to fit the application image into TC RAM block. |
Tested all configuration variants and they seemed to work fine after migration to STM-based logging |
Enabled the logs in the CoreMark sample in the case of fatal errors. Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
One additional improvement to developer experience before I finalize this PR |
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.
The newlines in log output need further discussion
The CoreMark sample now uses logging in the STM standalone mode for the nRF54H20 DK target.
Ref: NCSDK-27517
TODO items:
STM log formatting to follow the style used with theCONFIG_LOG_MODE_MINIMAL
optionCONFIG_COMPILER_OPT="-O3"
that cause reboots.