Reposting from the correct address so it's accepted by the list, sorry for
the noise.
On Tue, Jan 27, 2015 at 5:39 PM, Andreas Fritiofson wrote:
>
>
> On Tue, Jan 27, 2015 at 3:16 PM, Matthias Meier <[email protected]>
> wrote:
>
>> Now I checked it by adding this just after my patch:
>> LOG_INFO("FreeRTOS pxReadyTasksLists: %d",
>> FreeRTOS_VAL_pxReadyTasksLists);
>>
>> if configMAX_PRIORITIES ist set to 5 in the FreeRTOS projects
>> FreeRTOSConfig.h, this gibes following openocd command output:
>> Info : Calculated FreeRTOS max priorities: 5
>> Info : FreeRTOS pxReadyTasksLists: 1
>>
>> So my assumption was correct: your patch reserves too few (only one)
>> tasklist and therefore would not work if more than one priority is used in
>> the FreeRTOS project.
>>
>
> The symbol the patch is using is uxTopReadyPriority,
> not pxReadyTasksLists. I'm not sure what you're trying to show here.
>
> Do you have tasks belonging to more than one priority that are all ready?
>
> My interpretation of uxTopReadyPriority is that it is the highest priority
> list that can contain a task. Ready lists above that priority need not be
> checked as they are empty.
>
> This is confirmed by http://www.aosabook.org/en/freertos.html in the
> chapter called "The System Tick" and also by comments in the FreeRTOS
> source code.
>
> /Andreas
>
By the way, the code
+ max_used_priority = (rtos->symbols[FreeRTOS_VAL_xDelayedTaskList1].address
+ - rtos->symbols[FreeRTOS_VAL_pxReadyTasksLists].address) /
param->list_width;
is flawed because there's no guarantee that xDelayedTaskList1 will be
allocated directly after pxReadyTasksLists. Please verify if the logic
behind change 2399 is correct, I think that's the way forward. We also have
http://openocd.zylin.com/2347 as a final solution if no other method should
work.
/Andreas
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel