Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Help with stateviewer

Posted by ghughes1 on February 2, 2017

I am having trouble with getting the stateviewer to work with the FreeRTOS. I have a simple test firmware to blink LEDs on the board. It compiles with no error.

I am using the following hardware and software: STM32F446RE Microcontroller (M4 with FPU) Eclipse Neon.2 (4.6.2) GNU ARM Plugin WHIS StateViewer Plugin v2.0.10 (Wittenstein High Integrity Systems) openOCD v0.10.0 FreeRTOS v9 STM32 HAL library

my GDB OpenOCD debug console as follows:

"Open On-Chip Debugger 0.10.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD adapter speed: 2000 kHz adapternsrstdelay: 100 none separate srstonly separate srstnogate srstopendrain connectassertsrst Started by GNU ARM Eclipse Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : clock speed 1800 kHz Info : STLINK v2 JTAG v23 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info : using stlink api v2 Info : Target voltage: 3.249376 Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints Info : accepting 'gdb' connection on tcp/3333 Info : device id = 0x10006421 Warn : STM32 flash size failed, probe inaccurate - assuming 512k flash Info : flash size = 512kbytes undefined debug reason 7 - target needs reset Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz adapter speed: 1800 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08003b64 msp: 0x20020000 Info : Unable to match requested speed 8000 kHz, using 4000 kHz Info : Unable to match requested speed 8000 kHz, using 4000 kHz adapter speed: 4000 kHz semihosting is enabled Info : Auto-detected RTOS: FreeRTOS Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz adapter speed: 1800 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08003b64 msp: 0x20020000, semihosting Info : Unable to match requested speed 8000 kHz, using 4000 kHz Info : Unable to match requested speed 8000 kHz, using 4000 kHz adapter speed: 4000 kHz Info : Padding image section 0 with 12 bytes target halted due to breakpoint, current mode: Thread xPSR: 0x61000000 pc: 0x20000046 msp: 0x20020000, semihosting Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz adapter speed: 1800 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08003b64 msp: 0x20020000, semihosting Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz adapter speed: 1800 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08003b64 msp: 0x20020000, semihosting ===== arm v7m registers (0) r0 (/32): 0x00000000 (1) r1 (/32): 0x00000000 (2) r2 (/32): 0x00000000 (3) r3 (/32): 0x00000000 (4) r4 (/32): 0x00000000 (5) r5 (/32): 0x00000000 (6) r6 (/32): 0x00000000 (7) r7 (/32): 0x00000000 (8) r8 (/32): 0x00000000 (9) r9 (/32): 0x00000000 (10) r10 (/32): 0x00000000 (11) r11 (/32): 0x00000000 (12) r12 (/32): 0x00000000 (13) sp (/32): 0x20020000 (14) lr (/32): 0xFFFFFFFF (15) pc (/32): 0x08003B64 (16) xPSR (/32): 0x01000000 (17) msp (/32): 0x20020000 (18) psp (/32): 0x00000000 (19) primask (/1): 0x00 (20) basepri (/8): 0x00 (21) faultmask (/1): 0x00 (22) control (/2): 0x00 (23) d0 (/64): 0x0000000000000000 (24) d1 (/64): 0x0000000000000000 (25) d2 (/64): 0x0000000000000000 (26) d3 (/64): 0x0000000000000000 (27) d4 (/64): 0x0000000000000000 (28) d5 (/64): 0x0000000000000000 (29) d6 (/64): 0x0000000000000000 (30) d7 (/64): 0x0000000000000000 (31) d8 (/64): 0x0000000000000000 (32) d9 (/64): 0x0000000000000000 (33) d10 (/64): 0x0000000000000000 (34) d11 (/64): 0x0000000000000000 (35) d12 (/64): 0x0000000000000000 (36) d13 (/64): 0x0000000000000000 (37) d14 (/64): 0x0000000000000000 (38) d15 (/64): 0x0000000000000000 (39) fpscr (/32): 0x00000000 ===== Cortex-M DWT registers (40) dwtctrl (/32) (41) dwtcyccnt (/32) (42) dwt0comp (/32) (43) dwt0mask (/4) (44) dwt0function (/32) (45) dwt1comp (/32) (46) dwt1mask (/4) (47) dwt1function (/32) (48) dwt2comp (/32) (49) dwt2mask (/4) (50) dwt2function (/32) (51) dwt3comp (/32) (52) dwt3mask (/4) (53) dwt3function (/32) Info : dropped 'gdb' connection"

On debug I get the following error Message:

"Error in final launch sequence Failed to execute MI command: tbreak main Error message from debugger back end: Cannot access memory at address 0x8000230 ,Failed to execute MI command: continue Error message from debugger back end: The program is not being run. Failed to execute MI command: tbreak main Error message from debugger back end: Cannot access memory at address 0x8000230 Cannot access memory at address 0x8000230 Failed to execute MI command: continue Error message from debugger back end: The program is not being run. The program is not being run."

My best guess its to do with the stateviewer, everything worked before that. So its something with the stateviewer

FreeRTOS settings: configQUEUEREGISTRYSIZE 10 configUSETRACEFACILITY 1

openOCD.cfg added "$_TARGETNAME configure -rtos auto", It does auto detect the FreeRTOS correctly as seen above.

Anyidea would be helpful Thanks Greg


Help with stateviewer

Posted by rtel on February 2, 2017

WHIS StateViewer Plugin v2.0.10 (Wittenstein High Integrity Systems)

Did you ask WITTENSTEIN?


Help with stateviewer

Posted by ghughes1 on February 3, 2017

I got that figure from the forums over GNU arm plugin.

I do have a rtos question now..

when I debug ...

Error: Error: null stack pointer in thread Error: RTOS: failed to get register list Error reading stack frame from FreeRTOS thread

Whats causing these errors?

Any idea would be helpful

Console Output:

Open On-Chip Debugger 0.10.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD adapter speed: 2000 kHz adapternsrstdelay: 100 none separate srstonly separate srstnogate srstopendrain connectassertsrst Started by GNU ARM Eclipse Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : clock speed 1800 kHz Info : STLINK v2 JTAG v23 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info : using stlink api v2 Info : Target voltage: 3.246225 Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints Info : accepting 'gdb' connection on tcp/3333 Info : device id = 0x10006421 Warn : STM32 flash size failed, probe inaccurate - assuming 512k flash Info : flash size = 512kbytes undefined debug reason 7 - target needs reset Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz adapter speed: 1800 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08003ae8 msp: 0x20020000 Info : Unable to match requested speed 8000 kHz, using 4000 kHz Info : Unable to match requested speed 8000 kHz, using 4000 kHz adapter speed: 4000 kHz semihosting is enabled Info : Auto-detected RTOS: FreeRTOS Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz adapter speed: 1800 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08003ae8 msp: 0x20020000, semihosting Info : Unable to match requested speed 8000 kHz, using 4000 kHz Info : Unable to match requested speed 8000 kHz, using 4000 kHz adapter speed: 4000 kHz Info : Padding image section 0 with 12 bytes target halted due to breakpoint, current mode: Thread xPSR: 0x61000000 pc: 0x20000046 msp: 0x20020000, semihosting Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz adapter speed: 1800 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08003ae8 msp: 0x20020000, semihosting Error: Error reading stack frame from thread Error: RTOS: failed to get register list Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz adapter speed: 1800 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08003ae8 msp: 0x20020000, semihosting ===== arm v7m registers (0) r0 (/32): 0x00000000 (1) r1 (/32): 0x00000000 (2) r2 (/32): 0x00000000 (3) r3 (/32): 0x00000000 (4) r4 (/32): 0x00000000 (5) r5 (/32): 0x00000000 (6) r6 (/32): 0x00000000 (7) r7 (/32): 0x00000000 (8) r8 (/32): 0x00000000 (9) r9 (/32): 0x00000000 (10) r10 (/32): 0x00000000 (11) r11 (/32): 0x00000000 (12) r12 (/32): 0x00000000 (13) sp (/32): 0x20020000 (14) lr (/32): 0xFFFFFFFF (15) pc (/32): 0x08003AE8 (16) xPSR (/32): 0x01000000 (17) msp (/32): 0x20020000 (18) psp (/32): 0x00000000 (19) primask (/1): 0x00 (20) basepri (/8): 0x00 (21) faultmask (/1): 0x00 (22) control (/2): 0x00 (23) d0 (/64): 0x0000000000000000 (24) d1 (/64): 0x0000000000000000 (25) d2 (/64): 0x0000000000000000 (26) d3 (/64): 0x0000000000000000 (27) d4 (/64): 0x0000000000000000 (28) d5 (/64): 0x0000000000000000 (29) d6 (/64): 0x0000000000000000 (30) d7 (/64): 0x0000000000000000 (31) d8 (/64): 0x0000000000000000 (32) d9 (/64): 0x0000000000000000 (33) d10 (/64): 0x0000000000000000 (34) d11 (/64): 0x0000000000000000 (35) d12 (/64): 0x0000000000000000 (36) d13 (/64): 0x0000000000000000 (37) d14 (/64): 0x0000000000000000 (38) d15 (/64): 0x0000000000000000 (39) fpscr (/32): 0x00000000 ===== Cortex-M DWT registers (40) dwtctrl (/32) (41) dwtcyccnt (/32) (42) dwt0comp (/32) (43) dwt0mask (/4) (44) dwt0function (/32) (45) dwt1comp (/32) (46) dwt1mask (/4) (47) dwt1function (/32) (48) dwt2comp (/32) (49) dwt2mask (/4) (50) dwt2function (/32) (51) dwt3comp (/32) (52) dwt3mask (/4) (53) dwt3function (/32) Error: Error: null stack pointer in thread Error: RTOS: failed to get register list Error reading stack frame from FreeRTOS thread

Error: RTOS: failed to get register list


Help with stateviewer

Posted by rtel on February 4, 2017

Sorry - no idea - those errors are not coming from the RTOS.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner