-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add support for SMP on FreeRTOS #44
base: main
Are you sure you want to change the base?
Conversation
I have close to 0 experience with pull requests on github, similar with VS code extension developement and typescript... so I'd be very gratefull if someone could help me with the process. |
@hwmland First of all thank you very much for your contribution. I did have a quick look look over the code and seems to be ok in general (no real world testing and FreeRTOS code check done). Still @haneefdm and my concerns that we should properly support SMP (multiple cores) are not addressed #14 (comment). I do need to check latest FreeRTOS code and see if anything general changed in the meanwhile (e.g. removal of old pxCurrentTCB) which maybe would admit an intermediate / incomplete adaption. What was the issue with #43? Which part of your changes fixed it? I personally can't see a relation in the changes. |
Just did check the code and when we do not have more than one core via So the extension/FreeRTOS part should build up multiple tables, one for each core. When there's only one core we should not have an issue regarding the general functionality (maybe other things have changed that result in problems like #43, which should be addressed in a separate PR). Also when using only one core with a core configuration of > 1, we maybe need to use the second instance in the array (haven't checked how cores are addressed in |
Ummm. With SMP there should still be one table. That is my thought. SMP means that the RTOS will schedule a thread to any available core (with possible affinity or binding). To me, that is what SMP means. Or, does FreeRTOS not work like how normal SMP works for CPUs and Desktop OSes If there is one instance of RTOS, there should be one table. That is another thought. This is why I was having trouble tackling this. I need to understand how this actually works. I didn't want to guess. I don't have a test case and the right HW was also another problem. |
Hello, I'll try to answe to all remarks:)
I think I did so. I show proper status of all threads, for running threads I show on which core it runs
Generally port defines
Exactly this way it works. There are still 'common' lists of threads (blocked, ready, ...) for both cores, scheduler is just able to schedule them on multiple cores, so there could be more threads in the running state.
There are now 2 oficiall examples ( |
Can you create an actual application and put it on github.
Unlike other extensions I own/support, this is a unique one. Anyone who contributes has to do that is it is impossible to know all the different OSes. |
Sure, I’ll. Just some questions to be sure:
|
Sorry missed that on my smartphone 🫢. And of course in SMP we're good with one table. Mixed AMP, SMP and SMP with core pinning somehow in my head. @haneefdm Thanks for jumping in here. I do have some RP2040 boards lying around, so I'm happy to help with testing once the example project ist setup 😃 |
Example project with simple build instructions are here |
some updates? is it going to be merged? |
Well - last merge to this repo is March 2023... If you want it, I'm afraid you have to fork and be on your own... |
Will try to test this soon. Was very busy and @haneefdm also (see Marus/cortex-debug#1027) |
This PR resolves #14 and resolves #43