Home / Embedded-Systems / Study-Guide Comments

1 Bugs in the book's *.jdebug files

2 Problems in running Ozone

2.1 Debug-session does not fully start and Ozone hangs

2.2 Ozone does not exit

3 Troubleshooting debugger connection-problems

3.1 Console output for a successful debugger connection

 

Ozone : problems in Ozone and the book's .jdebug files

 

Document contents:

      The book's Ozone config-files have bugs (the .jdebug files).  The bugs are described, and fixes are provided.

      Problems in running Ozone were encountered, and they are described. 

      To help troubleshoot debugger connection-problems, Ozone's console-output is provided for a successful connection.

 

1  Bugs in the book's *.jdebug files

For the book's example programs, .jdebug files are provided for running the programs with the Ozone debugger, e.g., Chapters5_6.jdebug.   There's typically one .jdebug file per book-chapter.

 

There are several bugs in the .jdebug files.  The chapters' .jdebug files all have the same bugs.

 

The bugs and their fixes are described in the study-guide's web-page Chapters 4-6,  at these list-items:

      "Bugs in the book's code (Chapters5_6.jdebug), page 139"

      "Bug in book and Chapters5_6.jdebug, pages 144-145"

 

There's a GitHub repo for the present study-guide, and the repo has a copy of Chapters5_6.jdebug, with the bug-fixes:

      chapter-5--Chapters5_6--fixed.jdebug

 

Those bug fixes should also be applied to the other chapters' .jdebug files.

2  Problems in running Ozone

2.1  Debug-session does not fully start and Ozone hangs

      Problem: 

o      When starting an Ozone debug-session, Ozone may hang and the debug-session does not fully start. 

o      Prior to using Ozone, I had been using SystemView.  I suspect the problem was due to SystemView not shutting-down properly

      Solution:

o      Use Task Manager to see if any SystemView tasks are running, and end them.

o      Or, reboot the computer that runs Ozone

      Problem details:

o      After starting Ozone for a project, "Download and Reset Program" was run.

o      But, a debug session was not started, as expected.

      For example, I didn't get the expected icon to run the program (i.e., "Resume Program Execution")

o      The last part of the Console messages are shown below.

      There were no error messages related to this problem

      The last message is:  Debug.Start();

...

File.Open ("C:\projects\packtBookRTOS\Chapter_8\semaphoreExample\Chapter8_SemaphoreExample.elf");

File.Open: completed in 503 ms

Debug.ReadIntoInstCache: updated instruction information within 1 code ranges (0x08000200-0x08004BB8)

Warning (98): The symbol location decoder encountered an unsupported operand: 0xFA.

RTT active

Debug.SetConnectMode (CM_DOWNLOAD_RESET);

Debug.Start();

 

2.2  Ozone does not exit

      Problem:

o      The Ozone app will not exit, even after clicking on Exit, or GUI's exit-icon (X)

      Solution:

o      Disconnect the board's USB cable

o      Use Task Manager to end the Ozone task

      Problem details:

o      Connection to target device lost.

 

3  Troubleshooting debugger connection-problems

3.1  Console output for a successful debugger connection

      From chapter 6, in the  section "Attaching Ozone to the MCU" (page 139)

 

Disabled output of control characters

J-Link software found at: C:/Program Files/SEGGER/Ozone/JLink_x64.dll

File.Open ("C:/projects/packtBookRTOS/Chapters5_6/Chapters5_6.jdebug");

Project.SetTraceSource ("SWO");

SWO active

Project.SetDevice ("STM32F767ZI");

Target core support plugin loaded.: C:/Program Files/SEGGER/Ozone/Plugins/Core/CorePluginARM.dll

Project.SetHostIF ("USB", "");

Project.SetTargetIF ("SWD");

Project.SetTIFSpeed ("50 MHz");

Project.AddSvdFile ("C:\ST\STM32CubeIDE_1.5.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.productdb.debug_1.5.0.202011051456\resources\cmsis\STMicroelectronics_CMSIS_SVD\STM32F767.svd");

Project.AddSvdFile ("C:/Program Files/SEGGER/Ozone/Config/CPU/Cortex-M7.svd");

Project.SetOSPlugin ("FreeRTOSPlugin_CM7");

File name resolved: "FreeRTOSPlugin_CM7.js" was found at "C:/Program Files/SEGGER/Ozone/Plugins/OS/FreeRTOSPlugin_CM7.js"

RTOS awareness plugin loaded: C:/Program Files/SEGGER/Ozone/Plugins/OS/FreeRTOSPlugin_CM7.js.

File.Open ("C:\projects\packtBookRTOS\Chapters5_6\Debug\Chapter5_main.elf");

File.Open: completed in 200 ms

Debug.ReadIntoInstCache: updated instruction information within 1 code ranges (0x08000200-0x08007A50)

RTT active

Debug.SetConnectMode (CM_DOWNLOAD_RESET);

Debug.Start();

Device "STM32F767ZI" selected.

Found SW-DP with ID 0x9BA02477

Found SW-DP with ID 0x9BA02477

DPv0 detected

Scanning AP map to find all available APs

AP[1]: Stopped AP scan as end of AP map has been reached

AP[0]: AHB-AP (IDR: 0x74770001)

Iterating through AP map to find AHB-AP to use

AP[0]: Core found

AP[0]: AHB-AP ROM base: 0xE00FD000

CPUID register: 0x411FC270. Implementer code: 0x41 (ARM)

Found Cortex-M7 r1p0, Little endian.

FPUnit: 8 code (BP) slots and 0 literal slots

CoreSight components:

ROMTbl[0] @ E00FD000

ROMTbl[0][0]: E00FE000, CID: B105100D, PID: 000BB4C8 ROM Table

ROMTbl[1] @ E00FE000

ROMTbl[1][0]: E00FF000, CID: B105100D, PID: 000BB4C7 ROM Table

ROMTbl[2] @ E00FF000

ROMTbl[2][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7

ROMTbl[2][1]: E0001000, CID: B105E00D, PID: 000BB002 DWT

ROMTbl[2][2]: E0002000, CID: B105E00D, PID: 000BB00E FPB-M7

ROMTbl[2][3]: E0000000, CID: B105E00D, PID: 000BB001 ITM

ROMTbl[1][1]: E0041000, CID: B105900D, PID: 001BB975 ETM-M7

ROMTbl[0][1]: E0040000, CID: B105900D, PID: 000BB9A9 TPIU-M7

Cache: Separate I- and D-cache.

I-Cache L1: 16 KB, 256 Sets, 32 Bytes/Line, 2-Way

D-Cache L1: 16 KB, 128 Sets, 32 Bytes/Line, 4-Way

Connected to target device.

Reset: Halt core after reset via DEMCR.VC_CORERESET.

Reset: Reset device via AIRCR.SYSRESETREQ.

Elf.GetBaseAddr(); // returns 0x8000000

Target.ReadU32 (0x08000000); // returns 0x20080000

Target.SetReg ("SP", 0x20080000);

Target.ReadU32 (0x08000004); // returns 0x8007959

Target.SetReg ("PC", 0x8007959);

J-Link: Flash download: Bank 0 @ 0x08000000: Skipped. Contents already match

Elf.GetBaseAddr(); // returns 0x8000000

Target.ReadU32 (0x08000000); // returns 0x20080000

Target.SetReg ("SP", 0x20080000);

Target.ReadU32 (0x08000004); // returns 0x8007959

Target.SetReg ("PC", 0x8007959);

Startup complete (PC=0x080076C8)

Executed J-Link command "SetRTTAddr 0x2000535c"

Debug.Continue();