Hello. I am trying to integrate segger sysview on my board. I can't see the variable I need to see and I'm getting an error like this. While compiling, it sometimes deletes the codes I wrote. What is the reason? Could you help?
Hi,
What files are you modifying where you changes are being reverted?
There are some folders in the project that will be auto-generated and should not be edited by the user, these are in the ra_gen and ra-cfg folders. The files in the ra folder will not be overwritten unless the file is deleted in which case it will be regenerated when you build. All files in the src folder are unaffected by the build process.
-Gary
Thanks for your answer. As you said, I want to add new libraries to the FreeRTOS.h folder inside the ra_cfg folder.#include "SEGGER_SYSVIEW_FreeRTOS.h"
I removed it from where it was and added it to another folder. He didn't delete it this time. Created the same folder again. I want to make new additions to this .h file. How can I do that? Can you help me? How can I make the change here? I'm waiting for your help. Thank you so much.
In the properties for FreeRTOS you can add a user header file :-
that will be added to the generated file ra_cfg/aws/FreeRTOSConfig.h :-
Hello. Thanks for your quick response. The thing I got error for a long time was actually deleting the files from where I wrote them. Now I want to add some definitions to the same file and main.c file.
#define DWT_CTRL (*(volatile uint32_t*)0xE0001000)
It gives an error when I add these definitions. I thought about adding it to hal_entry.c but it should run before freeRTOS functions in main. Can you help with this?
All the Cortex peripheral registers are defined in the CMSIS header files already, e.g. for the CM33 core, for the DWT :-
and can already be used in hal_entry.c with no additional header files required :-
DWT->CTRL = ( 4<<DWT_CTRL_NUMCOMP_Pos);
The system is beautiful. Health to your hands. The other issue I'm stuck with is I can't add a function to the main.c file.
SEGGER_SYSVIEW_Conf(); SEGGER_SYSVIEW_Start();
I also want to add to the FreeRTOSConfig.h file. If there is a line equivalent to this addition, I would appreciate it if you would specify.
#define INCLUDE_pxTaskGetStackStart 1
Can you share a document about integrating the segger systimview interface with e2 Studio? We need to see the debug when using FreeRTOS. I need your help for this. Thanks a lot for your help.
Hi ylmaz-
main.c is an automatically generated file and at the top of the file it says to not edit it since any changes are overwritten when next generated.
You can edit files in your source directory without them being overwritten.
Hello. Then do I need to define the following functions inside each thread? Do you mind if I define it this way? What is your opinion?SEGGER_SYSVIEW_Conf();SEGGER_SYSVIEW_Start();
I also want to add it to FreeRTOSConfig.h. If there is a line equivalent to this addition, I would appreciate it if you could specify.#define INCLUDE_pxTaskGetStackStart 1
Someone else will need to help with your other questions- or you can just try adding the functions inside each thread to see what happens ;-)
You only need to call these in one thread.
SEGGER_SYSVIEW_Conf();SEGGER_SYSVIEW_Start();
FreeRTOS must be instrumented to work with SystemView. So, when an RTOS event occurs e.g. task creation, semaphore posting etc the event information is written to RTT. In the Segger SyetemView supplied files there is a patch for FreeRTOS. The patch works with FreeRTOS 10.4.3 which is version included in FSP 3.6.0. However, the patch cannot be directly applied to the FSP FreeRTOS sources as the source and include files have a slightly different folder structure to that of the standard FreeRTOS distribution. So, you will need to take the FSP FreeRTOS sources and use them to create the standard folder structure and then exclude the originals from the build. The patch can then be applied.
The below video (and others in the series) should be useful in understanding how to apply the patch and set up SystemView in e2studio which is Eclipse based.
www.youtube.com/watch
Ian.