Wednesday, October 18th 2017, 7:46am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

booherbg

Beginner

Date of registration: Apr 11th 2017

Posts: 2

1

Tuesday, April 11th 2017, 10:07pm

Help with SystemView

I'm trying to get SystemView working. Hopefully it's something simple.

My setup:
- Atmel SAM-ICE
- Atmel ATSAME70Q21
- Atmel Studio 7.0
- FreeRTOS 8.2.3
- SystemView v2.42

We're currently able to build and flash from inside Atmel studio. We're also able to debug, both with Atmel Studio and with Ozone. So the hardware all seems to be working.

I copied over the proper source files into the Atmel project, although I did put them all into a common SEGGER/ folder as I was having linker issues with finding the proper references. It builds fine now. I did have to add a reference to sysclk.h because our FreeRTOSConfig.h file requires it. I've also added the following to our main() cpp file:

Source code

1
2
3
4
5
6
7
8
9
int main(void)
{
	// start SEGGER sysview handler
	SEGGER_SYSVIEW_Conf();
	SEGGER_SYSVIEW_Start();

	// creating various tasks
	vTaskStartScheduler(); // freeRTOS task scheduler
}


Here's the file list:

Source code

1
2
3
4
5
6
7
8
9
Userr@PC MINGW64 ~/project/src/SEGGER
$ ls
Global.h       	SEGGER_SYSVIEW.h
os_trace_events.h  SEGGER_SYSVIEW_Conf.h
SEGGER.h       	SEGGER_SYSVIEW_ConfDefaults.h
SEGGER_RTT.c   	SEGGER_SYSVIEW_Config_FreeRTOS.c
SEGGER_RTT.h   	SEGGER_SYSVIEW_FreeRTOS.c
SEGGER_RTT_Conf.h  SEGGER_SYSVIEW_FreeRTOS.h
SEGGER_SYSVIEW.c   SEGGER_SYSVIEW_Int.h


Here are my symptoms:
- If I straight up try to run SystemView, I get an error. I'm choosing my Target Device (correctly identified), USB, SWD / 4000kHz (matching the Atmel Studio settings), and RTT Auto Detection. I get the same error with 'Start Recording' and with 'Read Recorded Data'. Interestingly, if I try a build that does NOT have the Segger files, I get "RTT Control Block not found", which is good because it's different than the error with Segger files. If I try it with my build that includes Segger files, one of two things happens. Either I get an error "Cannot send command to target. Possible reasons: -Connection to target lost. - Host debug session stopped. - Target application halted." I also get this same error every time I select "Stop Recording". Or I get the first 5 or 6 events like Start, SystemInfo, System Description (which looks correct, including the name in the config), Target time, Registered Modules 0. But then nothing else.
- If I turn on Post Mortem mode, I can usually consistently get those first 5 or 6 errors, but that's it.

Choosing "Read Recorded Data" gives me the following:
- Normal mode, informational prompt with "0 bytes recording data read from target system" (no error)
- Post Mortem mode, we can sometimes get a download of those first few events (106 bytes), but sometimes not.

I've tried increasing the RTT_BUFFER_SIZE but it makes no difference. The Sam-ICE has the latest firmware according to the Segger tools. It would make a world of difference if we could get this to work, as we have a long-running crash that seems to maybe be related to interrupt or task priorities. This would be immensely helpful if we could get the SystemView to work.

Thank you!

I've submitted a screenshot of the events we get as an example.
booherbg has attached the following images:
  • Capture.PNG
  • Capture2.PNG

This post has been edited 1 times, last edit by "booherbg" (Apr 11th 2017, 10:10pm)


booherbg

Beginner

Date of registration: Apr 11th 2017

Posts: 2

2

Tuesday, April 11th 2017, 11:40pm

Quick update: The documentation implies that the FreeRTOS patch may not
be needed, but I went ahead and applied it (manually) to our port
(ARM_CM7). Builds fine. No change in behavior with this in place, other
than sometimes "Start Recording" will not error out, and instead give me
the same 5 events as before.

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 360

3

Wednesday, June 21st 2017, 4:41pm

Hi,

Sorry for the late reply.

Can you check that your target application is still running after you connected SystemView or called SEGGER_SYSVIEW_Start().

This issue is most commonly caused by a crash of the target application, for example because your stack sizes are too small.

Best regards
Johannes