Page 1 of 1
Problem with StkUnused calculation
Posted: Mon Jan 16, 2017 10:22 am
by thor.thau
ChibiStudio: Preview 17
ChibiOS: 16.1.6
SVN: branches/stable_16.1.x@10032
MCU: STM32F030x8
I have thread where I statically declared working area with a size of 2048 bytes. THD_WORKING_AREA(waThread, 2048U); When I debug and look in ChibiOS/RT 3.x.x Debug View -> Threads tab then the StkUnused is calculated as 0.
Example from my debug view
Code: Select all
Address StkLimit Stack StkUnused
0x20000658 0x20000690 0x20000E14 0
It works correctly if I set the thread working area to 1024 bytes instead.
Re: Problem with StkUnused calculation
Posted: Mon Jan 16, 2017 4:21 pm
by RoccoMarco
Hi,
do you have set CH_DBG_FILL_THREADS as TRUE in chconf.h?
Re: Problem with StkUnused calculation
Posted: Mon Jan 16, 2017 4:34 pm
by thor.thau
RoccoMarco wrote:Hi,
do you have set CH_DBG_FILL_THREADS as TRUE in chconf.h?
Yes, it is set to TRUE and I also checked with the debugger that all the stack memory was set to 0x55.
Re: Problem with StkUnused calculation
Posted: Mon Jan 16, 2017 7:03 pm
by Giovanni
I will look into the plugin, there could be something in there.
Moving into "bug reports".
Giovanni
Re: Problem with StkUnused calculation
Posted: Thu Mar 16, 2017 6:14 am
by jayalfredprufrock
Not sure if this is related, but I have also noticed strange stkunused calculations recently. The majority of my threads are actually reporting more unused stack space than what they have allocated (some times > twice as much). I'm using the the 3.0 eclipse plugin (4.0 version doesn't seem to work for me, at least on OSX). I'm also running the latest release of Chibios (but also tried rolling back a few versions without seeing any difference). I'm positive the FILL_THREADS option is turned on and I see plenty of 0x55 in between my thread stacks. Am I supposed to be using the 4.0 plugin?
Re: Problem with StkUnused calculation
Posted: Tue Apr 25, 2017 9:20 am
by Giovanni
Hi,
The 4.0 plugin is specific for RT4, it does not work with RT3 and vice versa.
Giovanni
Re: Problem with StkUnused calculation
Posted: Tue Aug 22, 2017 1:17 pm
by Giovanni
This problem has been fixed, new plugins are available.
Giovanni