Skip to content

Conversation

@vrepetenko
Copy link
Collaborator

No description provided.

@haneefdm
Copy link
Contributor

It is not clear to me if this was handled but we expect more than one RTOS at the same time. This happens in multu-core debug where each core may be running an RTOS. So, the state info may have to be session specific. I would use the session name.

@vrepetenko
Copy link
Collaborator Author

It is not clear to me if this was handled but we expect more than one RTOS at the same time. This happens in multu-core debug where each core may be running an RTOS. So, the state info may have to be session specific. I would use the session name.

I think you mean this part:

            for (const rtosSession of this.sessionMap.values()) {
                promises.push(rtosSession.updateUIElementState(elementId, state));
            }
should be:

promises.push(currentSession.updateUIElementState(elementId, state));

But where currentSession can be found?

@haneefdm
Copy link
Contributor

haneefdm commented Feb 28, 2023

There is no concept of the current session. We need to pass the session-name to the new and all settings can be then stored as a combination of <session-name>-<rtos-name>-propname. So a chance would be specific to a session and its rtos.

I have to look in the code to figure out how to pass the session-name to the webview side

Also, there could be more than one session stopped. This is why there is no concept of a current session.

@haneefdm
Copy link
Contributor

We can make each RTOS session info under a div whose element-id would be the session-name. Session names will be unique as VSCode will not allow dups (AFAIK).

So, if you extract the full path to your element, then that could be the key.

@vrepetenko
Copy link
Collaborator Author

We can make each RTOS session info under a div whose element-id would be the session-name. Session names will be unique as VSCode will not allow dups (AFAIK).

So, if you extract the full path to your element, then that could be the key.

Do you mean full Dom path?
Can not get what problem we are trying to solve with this path...
Now any RTOS implementation can use 'rtos-panels' or may not use it at all.
Or xRTOS extension uses the same sessions list in different VSCODE windows, so if you open two VSCODE windows and run two different debug session there will be a problem with rtos-panels change event processing?

@haneefdm
Copy link
Contributor

Okay, not sure we are on the same wavelength here. In a multi-core setup, we can have more than one debug session going at the same time. One session can use FreeRTOS and another can use ChibiOS. We put in a whole lot of effort to make this happen in a single instance of VSCode.

https://github.com/Marus/cortex-debug/wiki/Multi-core-debugging

You can also have multiple sessions independent of the cortex-debug method in the same instance of VSCode.

And, I am not talking about two different VSCode windows. That is a completely different topic.

@vrepetenko
Copy link
Collaborator Author

it is clear now, thanks for explanation!
I will try to find a solution...

@haneefdm
Copy link
Contributor

haneefdm commented Mar 9, 2023

Hmmm. It appears that a build has failed. Looks like npm run compile failed. Something wrong with package.json or node_modules?

@haneefdm
Copy link
Contributor

@PhilippHaefele when you get a chance, could you review this PR?

"sourceMap": true,
"allowJs": true,
"checkJs": false,
"skipLibCheck": true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, didn't know that one

{ columnDataKey: 'counter', title: 'Iterations' },
{ columnDataKey: 'cumulative', title: 'Cumulative Time' } ];

const traceCols = [{ columnDataKey: 'event', title: 'Event' },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intended that traceCols is not used?

Copy link
Collaborator Author

@vrepetenko vrepetenko Mar 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, trace code is not in use now. It takes too long to get trace data.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

{ name: 'aria-label', value: 'Statistics' }]);

const htmlRTOSPanels = this.getHTMLPanels([{ title: 'GLOBAL' },
{ title: `THREADS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see the threads as the default (first) entry.

I think this is the first thing a user wants to see in the first place to get an overview of the OS state.

@haneefdm Any opinion regarding this?

@@ -1,11 +1,13 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { breadcrumbTemplate } from '@microsoft/fast-foundation';
import { buffer } from 'stream/consumers';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buffer and breadcrumbTemplate do not seem to be used or do i overse something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@haneefdm
Copy link
Contributor

I would like to see the threads as the default (first) entry.

Agree. This would be the expectation

@haneefdm
Copy link
Contributor

I would like to make a release soon. Quite a few things are batched up. I will merge this soon. I know @PhilippHaefele is busy for a couple of days but I would like him to finish his review.

Can you all update the CHANGELOG as needed if not already done?

@PhilippHaefele
Copy link
Collaborator

Only the default view discussion is open and after that being resolved, we're good to go from my side 👍

@vrepetenko
Copy link
Collaborator Author

vrepetenko commented Mar 11, 2023

Only the default view discussion is open and after that being resolved, we're good to go from my side 👍

check this out:
1bde86c

@PhilippHaefele
Copy link
Collaborator

PhilippHaefele commented Mar 11, 2023

Ups that somehow got hidden from me in the GitHub app 😄

@haneefdm So we're good to go

@haneefdm haneefdm merged commit 491fcb7 into mcu-debug:main Mar 11, 2023
@vrepetenko
Copy link
Collaborator Author

I would like to make a release soon. Quite a few things are batched up. I will merge this soon. I know @PhilippHaefele is busy for a couple of days but I would like him to finish his review.

Can you all update the CHANGELOG as needed if not already done?

@haneefdm, should I update CHANGELOG with new PR?

@haneefdm
Copy link
Contributor

I already made a release over the weekend. But, sure you can edit the CHANGELOG and update what I said. Add the PR# perhaps.

It is best to update the Changelog as we submit PRs.

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.

3 participants