QN9080CDK - Enabling System View for Connectivity Software Stack

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QN9080CDK - Enabling System View for Connectivity Software Stack

QN9080CDK - Enabling System View for Connectivity Software Stack

Introduction

This document describes the steps needed to enable System View tool emphasizing in connectivity software stack for the QN9080CDK MCU.

 

Software Requirements

  1. QN908XCDK SDK 2.2.0
  2. SystemView Software
  3. J-Link Software and Documentation Pack  

 

Hardware Requirements

  1. QN9080CDK Board with J-Link debug interface

 

Enabling SystemView in IAR Embedded Workbench IDE

 

1. Unzip your QN908XCDK SDK. Open your desired project from:<SDK_install_path>/boards/qn908xcdk/wireless_examples/<Choose_your_project>/freertos/iar/<Your_project.eww>

 

2. Select the project in the workspace, press the right mouse button and select “Add->Add Group...” option

 

pastedImage_30.png

 

 

3. Create a new group called “SEGGER”, click on the “OK” button. Repeat the step 1 and create other groups called “Config” and “FreeRTOS_SEGGER”.

 

pastedImage_32.png

 

The workspace will be updated as shown below

 

pastedImage_34.png

 

 

4. Create folders called “SEGGER”, “Config” and “FreeRTOS_SEGGER” in the Windows directory at the following path:

    <QN9080_SDK_root>/boards/qn908xcdk/wireless_examples/bluetooth/<your_example>/freertos

 

pastedImage_40.png

 

 

5. Add the following files in the recently created folders (SEGGER, Config and FreeRTOS_SEGGER) on Windows directory (the default SysView installation path is C:\Program Files (x86)\SEGGER\SystemView_V252c):

 

  • For the SEGGER folder:

       All files located at <SysView_installation_path>\Src\SEGGER

 

  • For the Config folder:

      All files located at <SysView_installation_path>\Src\Config

 

  • For the FreeRTOS_SEGGER folder:

      <SysView_installation_path>\Src\Sample\FreeRTOSV9\SEGGER_SYSVIEW_FreeRTOS.c

      <SysView_installation_path>\Src\Sample\FreeRTOSV9\SEGGER_SYSVIEW_FreeRTOS.h

      <SysView_installation_path>\Src\Sample\FreeRTOSV9\Config\SEGGER_SYSVIEW_Config_FreeRTOS.c

 

 

6. Go to the workspace and click the right mouse button on “SEGGER”, “Config” and “FreeRTOS_SEGGER” groups, then select “Add->Add Files...” option. Add the following files:

 

  • For the SEGGER group: 

       All files in <QN9080_SDK_root>/boards/qn908xcdk/wireless_examples/bluetooth/<your_example>/freertos/SEGGER folder 

 

  • For the Config group:

       All files in <QN9080_SDK_root>/boards/qn908xcdk/wireless_examples/bluetooth/<your_example>/freertos/Config folder

 

  • For the FreeRTOS_SEGGER group:

       All files in <QN9080_SDK_root>/boards/qn908xcdk/wireless_examples/bluetooth/<your_example>/freertos/FreeRTOS_SEGGER folder

 

The workspace will be updated as shown in the picture below

 

pastedImage_38.png

 

 

7. Select the project in the workspace and press Alt + F7. Go to “C/C++ Compiler” window and select “Preprocessor”. Include in “Additional include directories” view the following paths:

 

  • $PROJ_DIR$ /../Config
  • $PROJ_DIR$ /../FreeRTOS_SEGGER
  • $PROJ_DIR$ /../SEGGER

 

pastedImage_42.png

 

 

8. Go to “Assembler”, click on “Preprocessor”. Include the last paths on “Additional include directories” view as shown below. Click the OK button.

 

pastedImage_44.png

 

9. Replace the following files in the workspace with the files attached in this post (IAR files.zip). Make sure that each new file is located on the same path as the respectively last one.

 

  • freertos/FreeRTOS.h
  • freertos/task.h
  • freertos/tasks.c
  • freertos/portable/portasm.s
  • freertos/portable/port.c
  • freertos/portable/portmacro.h

 

10. Add #include "SEGGER_SYSVIEW_FreeRTOS.h" at the end of the FreeRTOSConfig.h file located at source/FreeRTOSConfig.h in the workspace.

 
pastedImage_67.png

 

 

11. Search the “SEGGER_SYSVIEW_Config_FreeRTOS.c” file at FreeRTOS_SEGGER folder in the workspace. Modify the SYSVIEW_RAM_BASE value to the lowest RAM address (default 0x20000000 in QN9080) and add an extern declaration to the SystemCoreClock variable:

extern uint32_t SystemCoreClock;‍‍

 

pastedImage_2.png

 

 

12. Search the “fsl_os_abstraction_free_rtos.c” file at framework/OSAbstraction folder in the workspace. Add #include "SEGGER_SYSVIEW.h" at the top of the file. Search the main function and add the following call to function inside:

 

SEGGER_SYSVIEW_Conf();
SEGGER_SYSVIEW_Start();‍‍‍‍‍‍‍‍‍‍

 

pastedImage_50.png

 

 

 13. Build and run your example. Run SystemView in your PC.

 

 

Enabling SystemView in MCUXpresso IDE

1. Install your QN908XCDK SDK in MCUXpresso IDE and import any freertos example from "wireless_examples" folder. 

2. Select the project in the workspace, press the right mouse button and select "New->Source Folder" option

 

pastedImage_13.png

 

3. Create a new folder called “SEGGER”, click on the “Finish” button. Repeat the step 1 and create other folders called “Config” and “FreeRTOS_SEGGER”.

 

pastedImage_17.png

 

The workspace will be updated as shown below

 

pastedImage_19.png

 

4. Add the following files in the SEGGER, Config and FreeRTOS_SEGGER folders on the workspace dragging and dropping (the default SysView installation path is C:\Program Files (x86)\SEGGER\SystemView_V252c):

 

  • For the SEGGER folder:

       All files located at <SysView_installation_path>\Src\SEGGER

 

  • For the Config folder:

      All files located at <SysView_installation_path>\Src\Config

 

  • For the FreeRTOS_SEGGER folder:

      <SysView_installation_path>\Src\Sample\FreeRTOSV9\SEGGER_SYSVIEW_FreeRTOS.c

      <SysView_installation_path>\Src\Sample\FreeRTOSV9\SEGGER_SYSVIEW_FreeRTOS.h

      <SysView_installation_path>\Src\Sample\FreeRTOSV9\Config\SEGGER_SYSVIEW_Config_FreeRTOS.c

 

When dragging and dropping, a new window will appear. Select "Copy files" in the button group and click "OK".

 

pastedImage_12.png

 

 

5. Select the project in the workspace, then go to "Project->Properties". The project properties window will be deployed.

 

pastedImage_2.png 

 

6. Go to "C/C++ Build->Settings->Tool Settings->MCU C Compiler->Includes" view. Click on the "Green plus icon" in the "Include paths" view. A new window will appear, click on "Workspace..." button.

 

pastedImage_9.png

 

 

7. Select SEGGER, Config and FreeRTOS_SEGGER folders and click "OK", then click "Apply and Close" in the Project Properties window.

 

pastedImage_10.png.

 

8. Replace the following files in the workspace with the files attached in this post (MCUXpresso files.zip).

 

  • freertos/FreeRTOS.h
  • freertos/task.h
  • freertos/tasks.c
  • freertos/port.c
  • freertos/portmacro.h

 

9. Add #include "SEGGER_SYSVIEW_FreeRTOS.h" at the end of the FreeRTOSConfig.h file located at source/FreeRTOSConfig.h in the workspace.

 

pastedImage_15.png

 

10. Search the “SEGGER_SYSVIEW_Config_FreeRTOS.c” file at FreeRTOS_SEGGER folder in the workspace. Modify the SYSVIEW_RAM_BASE value to the lowest RAM address (default 0x20000000 in QN9080) and add an extern declaration to the SystemCoreClock variable:

extern uint32_t SystemCoreClock;‍‍

pastedImage_13.png

 

11. Search the “fsl_os_abstraction_free_rtos.c” file at framework/OSAbstraction/Source folder in the workspace. Add #include "SEGGER_SYSVIEW.h" at the top of the file. Search the main function and add the following call to function inside:

SEGGER_SYSVIEW_Conf();
SEGGER_SYSVIEW_Start();‍‍‍‍‍‍‍‍‍‍‍‍

pastedImage_18.png

 

12. Build and run your example. Run SystemView in your PC.

Labels (2)
Tags (1)
Attachments
No ratings
Version history
Last update:
‎09-14-2020 11:54 AM
Updated by: