Hello,
I am trying to debug AM263P4 (TMDSCNCD263P) with Ozone. Code is compiled with CCS20
Is this supported? Could you provid an example?
Best regards
Hello,
I am trying to debug AM263P4 (TMDSCNCD263P) with Ozone. Code is compiled with CCS20
Is this supported? Could you provid an example?
Best regards
https://forum.segger.com/index.php/Thre…-is-set-to-Max/
XMC4500 Relax Kit
#include <stdint.h>
// global struct
typedef struct {
uint32_t dbga1;
uint32_t dbga2;
uint32_t dbga3;
} GD_t;
volatile GD_t D7;
// global variable
volatile uint32_t dbgb1;
volatile uint32_t dbgb2;
volatile uint32_t dbgb3;
// static variable
void foo(void) {
static volatile uint32_t dbgc1;
static volatile uint32_t dbgc2;
static volatile uint32_t dbgc3;
D7.dbga1++;
D7.dbga2++;
D7.dbga3++;
dbgb1++;
dbgb2++;
dbgb3++;
dbgc1++;
dbgc2++;
dbgc3++;
}
int main(void) {
while(1) {
foo();
}
}
Display More
I made similar observations (win10, ozone 3.36, j-link ultra+ v5.1). quick example:
I have these variables:
// global struct
typedef struct {
uint32_t dbga1;
uint32_t dbga2;
uint32_t dbga3;
} GD_t;
volatile GD_t D7;
// global variable
volatile uint32_t dbgb1;
volatile uint32_t dbgb2;
volatile uint32_t dbgb3;
// static variable
void foo(void) {
static volatile uint32_t dbgc1;
static volatile uint32_t dbgc2;
static volatile uint32_t dbgc3;
}
Display More
I want to sample D7.dbga[1-3] or dbgb[1-3] or dbgc[1-3]
All variables are in the same memory (DTCM of a STM32H745 in this case)
Sampling with max frequency results in requests send every ~20us on the SWD lines running at 25MHz.
observations:
sampling D7.dbga[1-3]
=>GUI very laggy, many sample points missing
sampling dbgb[1-3]
=>GUI laggy, some sample points missing
(but one time this also ran smoothly)
sampling <artificial>::dbgb[1-3] (result of "graph" in context menu of GlobalData pane)
=>GUI very laggy, many sample points missing
sampling (<artificial>::D7).dbga[1-3] (result of "graph" in context menu of GlobalData pane)
=>GUI very very laggy, many sample points missing
sampling addresses directly
=>GUI very laggy, many sample points missing
btw.: changing the variables that are being sampled, while sampling on max, often results in breaking the sampling all together and I have to powercycle the probe and restart ozone.
It says 1us@200MHz per event. For an ISR with 100 kHz, that means 20% of CPU load is only for SystemView events, that may be too much.
Reproduce 1:
Reproduce 2:
Too bad.
SystemView may be too much overhead.
Playing around with tracebuffer and a J-Link Edu V11 I noticed two things. Both happen when power sampling is enabled.
If you choose to not support power sampling for J-Link Edu/Base/Plus, please at least make in a way it is not disturbing normal operation (or just allow it with a limited sampling rate)
And yes, I know (now) if I set sampling to “off”, it “solves” this problem. But since I didn't turn it on, or even use the power pane, this was not the first thing that came to mind.
1. I cannot zoom into the code timeline, y-axis x-axis keeps getting reset
2. if the connection is lost, waring messages pop up as long as the session is not stopped.
I was not asking about the visuals in Ozone. But since you mentioned it, I don't think the round corners are a good idea and make it more difficult to read.
I was wondering if only interrupt entries and exits can be viewed. To reduce data so a longer period of time can be displayed. I don't care what functions a called inside the interrupts or in the main loop. I'm more interested in the timing of the ISRs (when, how long, priority handling). With other debuggers I saw options like exception trace. Right now, I do it with IOs and a logic analyser. I was hoping to do something similar with the debugger, so I can also correlate it with sampled data.
There is this ITM thing, where I can write to, e.g. to mark the start and end of an ISR, could this be displayed somehow?
I am just wondering what a J-Trace can do for me, that I maybe don't know of, since tracing is new to me. More than a J-Link can do and besides tracing every single instruction, which is not so important for me.
I there any way I can use Ozone or a J-Link/Trace to visualize interrupt entrys and exits (I don't have a RTOS)? Live or afterwards (if I can record for a few minutes).
Or is there anything at all, that a J-Trace can do, to get me more live informations. (Besides profiling)
Hello,
I'm curently testing J-Trace with Ozone. As I already found out, there is only a limited amount of traced data visible in the timeline. And while the MCU is running, no data is visible at all.
Can (a limited amount of) data be shown while the MCU is running?
This is my use case: I want to record and analyse / display in the timeline, what my code is doing for a longer period of time, e.g. a few minutes. I cannot halt the MCU during this time. Is this possible at all?
Hello,
I have a few questions regarding the debugging of a STM32H745 dual core controller.
1. Is simultaneous debugging of both cores fully supported/possible?
It works, more or less, but I noticed some problems:
e.g. sampling a variable for the timeline data graph with one Ozone instance connected to CM7, while another Ozone instance is connected to CM4, will result in zeros in the graph, and even worse, it will zero the sampled variable in memory.
In the image you can see how "dwtval_avg" (on-chip calculated average of dwtval) gets reset
I also had cases, where the debugger (J-link Ultra+ V5.1), lost its firmware while trying to start a debug session and needed to reload it.
2. what does Ozone do when I click “Download & Reset Program” and why could it fail?
e.g. right now, I cannot access the CM4, while CM7 works fine
From console:
Debug.Start();
Device "STM32H745XI_M4" selected.
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 8us
InitTarget() start
SWD selected. Executing JTAG -> SWD switching sequence.
DAP initialized successfully.
Enabling debug in 'Standby', 'Stop' & Sleep mode.
InitTarget() end - Took 21.9ms
Found SW-DP with ID 0x6BA02477
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[1]: AHB-AP (IDR: Not set)
AP[2]: APB-AP (IDR: Not set)
AP[3]: AHB-AP (IDR: Not set)
AP[3]: Skipped ROMBASE read. CoreBaseAddr manually set by user
AP[3]: Core found
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
Cortex-M: The connected J-Link (S/N 5051*****) uses an old firmware module: V2 (current is 3)
FPUnit: 6 code (BP) slots and 2 literal slots
ROM table scan skipped. CoreBaseAddr manually set by user: 0xE00FF000
I-Cache L1: 0 KB, 1 Sets, 16 Bytes/Line, 1-Way
D-Cache L1: 0 KB, 1 Sets, 16 Bytes/Line, 1-Way
Connected to target device.
J-Link/J-Trace serial number: 5051*****)
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Elf.GetBaseAddr(); // returns 0x8100000
Target.ReadU32 (0x08100000); // returns 0x4, data is 0x10000600
Target.SetReg ("SP", 0x10000600);
Elf.GetEntryPointPC(); // returns 0x81023CC
Target.SetReg ("PC", 0x81023CC);
Timeout while preparing target, RAMCode did not respond in time!
Failed to perform RAMCode-sided Prepare()
Verification of RAMCode failed @ address 0x24000558.
Write: 0xE7DB4798 69236961
Read: 0xE7DB47A5 69236961
Download failed: J-Link reports an unspecified download error
Elf.GetBaseAddr(); // returns 0x8100000
Target.ReadU32 (0x08100000); // returns 0x4, data is 0x10000600
Target.SetReg ("SP", 0x10000600);
Elf.GetEntryPointPC(); // returns 0x81023CC
Target.SetReg ("PC", 0x81023CC);
Memory map 'after startup completion point' is active
Startup complete (PC=0x08101934)
T-bit of XPSR is 0 but should be 1. Changed to 1.
Display More
2a. Does it reset/halt both cores or just one?
2b. Does it write something to RAM? Because the error above mentions RAMCode
2c. What could prevent the debugger from debugging? The core must be on, I guess, anything else?
2d. What is the "T-bit of XPSR" and what does this warning/info mean?
Hi,
some issues with the GUI:
1. copying data from memory window may not work correctly:
reproduce:
a. right click on a variable => show data (Ctrl + T), memory in memory window is selected in gray
b. right click into gray area in memory window, gray selection turns blue (i.e. selected), context menu opens
2. Scroll bar of memory window is flawed:
3. First character of a line in the console cannot be selected (besides by selecting the whole line by clicking on it)
4. Window arrangement
The windows can be arranged inside the main window, but there are two configurations. One for: if the main window is maximized, and one for: when it is not. Since I use Ozone with both, I need to (re)arrange the windows always two times. If this is supposed to be a feature, please make it disableable.
5. Window arrangement
Some window arrangements are not loaded correctly. More specific, after opening Ozone they will get loaded correctly, but after 1 second they get rearranged. Example attached.
New Project Wizard => STM32H743VI => use attached elf file => apply suggested freertos plugin addition
Console shows CM4 plugin was loaded.
While you have already loaded the elf file, please observe the global variables view having a problem with structs/unions and bitfields and add it to your list, if this is not already there. (see image attached)
typedef struct {
union {
struct {
_Bool b1 : 1;
_Bool b2 : 1;
_Bool b3 : 1;
_Bool b4 : 1;
} bits;
uint32_t word;
} U1;
union {
struct {
float f1;
float f2;
float f3;
float f4;
} named;
float data[4];
};
struct {
uint32_t ui1;
union {
struct {
float f1;
float f2;
} named;
float data[2];
};
} S1;
} DataStruct_t;
volatile DataStruct_t DS = {};
Display More
PS: This board has problems too: timeouts, unknown errors with the file upload. Also I posted this answer already yesterday, but apparently it was not saved. Probably because an error message appeared on the bottom, out of screen, unnoticed, telling me that this post is too long. Which it wasn’t, but a pasted image gets counted with 1 char per pixel or something, so I hit the 10000 char limit …
I want to suggest a more clear naming of the stack info column of the freeRTOS plugin or a change of the shown data, to avoid misconception.
Right now it shows free stack / total stack, as I found out after too long of time. I expected it to show used space / total space.
Personally I would prefer it to show stack usage instead of free space. At least it should have a properly named title.
On a side note, a minor bug: While creating a new CM7 project (I didn’t test, if this is processor specific), the suggestion to add the freeRTOS plugin, adds the CM4 version.
Project.SetDevice ("STM32H743VI");
…
Project.SetOSPlugin ("FreeRTOSPlugin_CM4");
...I missed the logic of the default STM32Cube code. M7 will timeout until I am able to start the second debug session and M4 will end up in stop-mode.
After fixing that, now both cores are running, but halting the CPU on either Ozone instance will only stop the M4, the M7 keeps running.
How can I halt the M7 or both at once?
Hello,
I am trying to debug a dual core STM32H745 with Ozone V3.30d.
While I can flash and step thought the code on the M7, it does not work on the M4. Flashing works, but I cannot debug.
Console output after clicking Resume:
Subsequent Resumes result in the same message.
Is this essentially possible with Ozone?
What am I missing?
22. If you modify an expression at runtime Ozone needs to dump the data already sampled anyway because the data sampled for the previous expression does not fit to the new expression. There is a technical limitation which does not allow Ozone to change parts of the addresses sampled during data sampling - only the whole set of addresses can be changed. Since adding a new expression may change the addresses to be sampled the whole data needs be reset, the new set of addresses is calculated and sampling started anew.
I'm not talking about changing what is sampled, but about the calculations that are done with that data.
var SetOfAddressesToSample = GetAddressesToSample();
if (SetOfAddressesToSample == SetOfAddressesBeingSampled) RecalcualteExpressions();
else RestartSamplingWithNewAddresses(SetOfAddressesToSample);
I imagine it like this: You store the data of the sampled addresses in arrays/lists, one for each address, and the calculated results in additional arrays/lists, one for each expression. and then you can simply recalculate the expressions if they change, as long as the addresses being sampled don't change.
13. expressions again (in watched data):
broken operators:
expressions are not saved/loaded properly. after I close and reopen ozone, it looks like this:
What's wrong with Y-Axis adapting to values growing into the negative? This is intended.
Then I don't understand your intentions. Why adapt it with negative growing values but not with positive growing values? Don't change it at all, unless I enable Auto Fit Height or something.
Same goes for the connection between data sampling window and timeline window: This is intended, as you can see in the Ozone user's manual, section 4.6.7. Since you can read the value in the data sampling window there is no need for a value box. As you can see in section 4.22.6 of the Ozone user's manual, the value boxes are connected to the hover cursor, and this is not in place in the scenario you describe.
I don't see the full benefit of this approach, but maybe there is one. So let me word it as wishes:
We are not aware of power sampling at high frequencies slowing down Ozone, as you describe. Please provide a reproducer on an evaluation board (Ozone project, ELF file, Board details) and describe how to reproduce the issue.
It is not the power sampling (I think, I don't use it much), but the variable sampling. I'll send you something if I have something, but it is not so easy to reproduce on a demo board with only a small programm running.
Just so you are aware of the problems I encounter, here are two more examples: (Not easy to reproduce, but will happen from time to time)
Finally, another wish:
22. don't reset the sampling when I change an expression, just recalculate (unless the sampled variables change)
e.g. when I have two variables, one that goes from 0..1 and one from 0..1000, which I only realize after they got sampled. Then I may want to add "/1000" in order to scale the waveform, so I can see the small values as well. But that needlessly resets the sampling and removes the data.
Is this also the solution for the still not working watched data expressions? Just calculate it on the target ?!
This is exactly what I don’t want or can’t do, because it costs time. My time to code and flash it every time I want to change the calculation and the time for the calculation itself needed on the target, which I possibly don’t have, e.g. on a small Cortex M0 w/o FPU. That is what I have a capable debugger for, or at least that is what I thought.
Reminder for problems with watched data:
With Auto Fit Height I often don't have enough margin, as you can clearly see in last posts picture, that's why I'm mentioning it.
y-axis zoom would be a great new feature, yes. setting the range by typing in numbers is really tedious.
Same goes for unrestricted y-axis movement. (why limit it in the first place?) this would also solve the overlap inconvenience.
with "y-axis range" I mean what I wrote in post 4, and this is a real problem, because it makes the whole recorded data unusable.
what is wrong with time-axis zoom is what you see in the third GIF in post 1.
Found another problem:
y-axis will move down with the min value.
An another:
time-axis (relative to data) will move when scrolling the samples list. While this may be a “feature”, it is very irritating. Just start the time-axis at 0 when I start debugging and leave it at that.
Maybe add a right click menu entry “set origin here”, so users can change the origin if they really want to. But don’t change it just because I scroll down the list.
If you want to show the point selected* in the list in the plot (this is of cause a great feature), do it in the same way as if I would move my mouse in the timeline. The benefit of that would be that I can also see the value boxes.
(*I didn't even select anything)
19. (...) For the time being I recommend not changing the sampling frequency during recording. The benefit of doing so is questionable anyway.
If the sampling would work smoothly I wouldn't need to change the sampling frequency and let it run on max or 10kHz all the time. But this doesn't always work, as mentioned before. Often Ozone then gets really laggy, so I only set the sampling frequency to a high value when needed and only for a short period of time. This is of cause an unpleasant experience because Ozone is unresponsive, but the only way to achieve the highest possible sampling rate.
A few comments on the UI:
+ thumbs up for optional names at cursor, thicker boarder and better default colors.
- long expressions are problematic, because the color boxes may end up far away from the shorter names. I suggest moving them to the right next to the checkboxes or something like that. And/or allow me to choose my own names. In this example "Vbat" would be a much better, and shorter(!), description for what I want to plot, instead of the long expression. Would keep the legend smaller too.
- value boxes may overlap time marker and since the grid is not moveable by mouse in y-direction beyond min/max values, i cannot manually circumvent this by moving the waveforms down, like in the middle of the timeline window, so that the boxes won't overlap.
While I appreciate the graphical improvements, I would rather see a fix of y-axis range and time-axis zoom behaviour, because these problems really make everyday usage very annoying if not impossible.