Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
openocd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
openocd
Commits
85219514
Commit
85219514
authored
13 years ago
by
Evan Hunter
Committed by
Øyvind Harboe
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix FreeRTOS thread list parsing
parent
dd318f82
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/rtos/FreeRTOS.c
+8
-5
8 additions, 5 deletions
src/rtos/FreeRTOS.c
with
8 additions
and
5 deletions
src/rtos/FreeRTOS.c
+
8
−
5
View file @
85219514
...
...
@@ -102,6 +102,7 @@ enum FreeRTOS_symbol_values
FreeRTOS_VAL_xTasksWaitingTermination
=
7
,
FreeRTOS_VAL_xSuspendedTaskList
=
8
,
FreeRTOS_VAL_uxCurrentNumberOfTasks
=
9
,
FreeRTOS_VAL_uxTopUsedPriority
=
10
,
};
static
char
*
FreeRTOS_symbol_list
[]
=
...
...
@@ -116,6 +117,7 @@ static char* FreeRTOS_symbol_list[] =
"xTasksWaitingTermination"
,
"xSuspendedTaskList"
,
"uxCurrentNumberOfTasks"
,
"uxTopUsedPriority"
,
NULL
};
...
...
@@ -226,15 +228,15 @@ static int FreeRTOS_update_threads( struct rtos *rtos )
}
//
Unfortunately, we can't know how many lists ther
e
a
re
for
pxReadyTasksLists,
// So figure it out via other variables
int
num_ready_task_lists
=
(
rtos
->
symbols
[
FreeRTOS_VAL_xDelayedTaskList1
].
address
-
rtos
->
symbols
[
FreeRTOS_VAL_
pxReadyTasksLists
].
address
)
/
param
->
list_width
;
//
Find out how many lists are needed to b
e re
ad from
pxReadyTasksLists,
int64_t
max_used_priority
=
0
;
retval
=
target_read_buffer
(
rtos
->
target
,
rtos
->
symbols
[
FreeRTOS_VAL_
uxTopUsedPriority
].
address
,
param
->
pointer_width
,
(
uint8_t
*
)
&
max_used_priority
)
;
symbol_address_t
*
list_of_lists
=
(
symbol_address_t
*
)
malloc
(
sizeof
(
symbol_address_t
)
*
(
num_ready_task_lists
+
5
)
);
symbol_address_t
*
list_of_lists
=
(
symbol_address_t
*
)
malloc
(
sizeof
(
symbol_address_t
)
*
(
max_used_priority
+
5
)
);
int
num_lists
;
for
(
num_lists
=
0
;
num_lists
<
num_ready_task_lists
;
num_lists
++
)
for
(
num_lists
=
0
;
num_lists
<
max_used_priority
;
num_lists
++
)
{
list_of_lists
[
num_lists
]
=
rtos
->
symbols
[
FreeRTOS_VAL_pxReadyTasksLists
].
address
+
num_lists
*
param
->
list_width
;
}
...
...
@@ -479,3 +481,4 @@ static int FreeRTOS_create( struct target* target )
target
->
rtos
->
rtos_specific_params
=
(
void
*
)
&
FreeRTOS_params_list
[
i
];
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment