View previous topic :: View next topic |
Author |
Message |
bryant@balancebitsconsult
Joined: 21 Nov 2023 Posts: 38
|
RTOS Task Enable from Debugger |
Posted: Thu Nov 30, 2023 6:02 pm |
|
|
In a simple program I seem to be unable to use the CCS C Debugger to "enable" a task. The right click menu has a "Resume" task. Is this different than enable ?
From the debug console I can "Suspend", which will "Disable" the task correctly. The wording is inconsistent here and unclear.
![](https://images2.imgbox.com/8c/91/TbUNvJRD_o.png) |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19358
|
|
Posted: Fri Dec 01, 2023 3:23 am |
|
|
I suggest you ask CCS.
I doubt if pretty much anybody here uses the RTOS and debug.
However, my guess, is that the enable/disable is for the RTOS enable
and disable operation, while the resume, is the normal debugger resume,
and nothing to do with the RTOS. |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9168 Location: Greensville,Ontario
|
|
Posted: Fri Dec 01, 2023 5:45 am |
|
|
my way of thinking...
enable means to allow the 'task' to operate
disable means to not allow the task to operate
suspend means to halt the task at a specific point
resume means to allow task to continue from that specific point
I don't use either RTOS or DEBUG, just spent 70 years trying to figure out how many ways English words can be 'repurposed'. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19358
|
|
Posted: Fri Dec 01, 2023 8:04 am |
|
|
Enable, and Disable are documented. The same meaning as the RTOS_
enable and disable functions. What he is puzzled about is if he right clicks,
a 'resume' option is shown.
I'm fairly sure this is the standard debugger resume option, so nothing
to do with the RTOS at all. Just an option to resume execution of the
code as a whole.
Really just try it and see what happens. However as I said, just ask CCS.
![Very Happy](images/smiles/icon_biggrin.gif) |
|
![](templates/subSilver/images/spacer.gif) |
mario67
Joined: 27 Nov 2023 Posts: 2
|
|
Posted: Sun Dec 03, 2023 3:20 am |
|
|
the right-click menu has a "Resume" task option, but it's unclear if this is the same as "Enable." The debug console allows you to "Suspend," which correctly "Disables" the task, which then create confusion & inconsistency. |
|
![](templates/subSilver/images/spacer.gif) |
bryant@balancebitsconsult
Joined: 21 Nov 2023 Posts: 38
|
|
Posted: Wed Dec 06, 2023 12:27 pm |
|
|
mario67 wrote: | the right-click menu has a "Resume" task option, but it's unclear if this is the same as "Enable." The debug console allows you to "Suspend," which correctly "Disables" the task, which then create confusion & inconsistency. |
Yes, exactly this. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19358
|
|
Posted: Thu Dec 07, 2023 2:58 am |
|
|
If you resume a task, it is enabled.
If you suspend a task it is disabled.
A phrase involving mountains and molehills seems to apply here.
The resume changes the enabled state from disabled to enabled.
The suspend changes the enabled state from enabled to disabled.
Try it.
It is visible immediately what they do. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19358
|
|
Posted: Thu Dec 07, 2023 2:59 am |
|
|
If you resume a task, it is enabled.
If you suspend a task it is disabled.
A phrase involving mountains and molehills seems to apply here.
The resume changes the enabled state from disabled to enabled.
The suspend changes the enabled state from enabled to disabled.
Try it.
It is visible immediately what they do.
They can of course only change when the processor is stopped.
In English, resume means 'start again'. While 'suspend', means 'prevent
from continuing'. Both perfect descriptions of what the options do. |
|
![](templates/subSilver/images/spacer.gif) |
bryant@balancebitsconsult
Joined: 21 Nov 2023 Posts: 38
|
|
Posted: Thu Dec 07, 2023 2:55 pm |
|
|
Ttelmah wrote: | If you resume a task, it is enabled.
If you suspend a task it is disabled.
A phrase involving mountains and molehills seems to apply here.
The resume changes the enabled state from disabled to enabled.
The suspend changes the enabled state from enabled to disabled.
Try it.
It is visible immediately what they do.
They can of course only change when the processor is stopped.
In English, resume means 'start again'. While 'suspend', means 'prevent
from continuing'. Both perfect descriptions of what the options do. |
I would respectfully disagree. The language: "resume" and "enable" are different concepts, and the debugger does not clearly make the connection to "enable" and "disable" -- rtos_enable() , rtos_disable() -- since "Resume" could also imply "enable task and debugger run" since we are in the debugger context and halted.
Thanks for the clarification and contribution, this is exactly how I have been using these drop downs - which, frankly, are not very useful anyway since it appears these can only be used when halted (as you might expect), --- even then I am getting intermittent behavior from the "Disable" dropdown. This is likely a UI/UX issue specific to the debugger, or I could have stumbled onto a bug in the debugger itself or my setup. *shrug* Not going any further here.
Separately, the comment complaining that my question is insignificant is unwelcome.
Onward and upward. I hope this helps a future developer too. |
|
![](templates/subSilver/images/spacer.gif) |
|