cancel
Showing results for 
Search instead for 
Did you mean: 

How to Debug FreeRTOS?

Yuji Udagawa
Associate II
Posted on February 16, 2017 at 21:38

I

remodeled

DemonstrationProgram

of

ST32Cube

into

STM32F746G-Discovery

and

was able to

play

the

MP3

in

audioplayer

.

My

MP3Program

may

sometimes

do

Stall

in

Error

.

Will

there be

the

good

method

to perform of

Debug

in

FreeRTOS

?

Best Regards.

#freertos-stm32cube
4 REPLIES 4
Posted on February 16, 2017 at 22:47

Output diagnostic and telemetry information about flow and status via the VCP attached USART, or via the SWV debugger channel, and viewable with the ST-LINK Utilities.

Running the code in a debugger might also provide some fine grain understanding, but first you probably want to get a feel for the mechanics of what the code is doing, and how tasks are interacting.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Yuji Udagawa
Associate II
Posted on February 17, 2017 at 00:33

Thank you for

a

reply

I

intend

to use

SWV

,

but

do not

understand

how to use

.

Should

I

output

it

simply

in

printf

?

Best Regards

Posted on February 17, 2017 at 03:41

In something like Keil you'd have to provide fputc() type functionality using ITM_SendChar() to get information via SWV. The SWO (PB3) pin needs to be connected to the debugger, and the viewer needs to be configured to the frequency of the core.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Yuji Udagawa
Associate II
Posted on February 17, 2017 at 04:57

I

use

System

Workbench

for

STM32

.

Debugger

is

GDB

and

OpenOCD

.

I

appoint

SWD

in

Interface

in

ST-LinkV2

in

Device

of

Script

.

__STATIC_INLINE

uint32_t

ITM_SendChar

(

uint32_t

ch

)

I

check

Function

mentioned above

.

Yours sincerely,