Closed HokageM closed 5 months ago
The line address=0x700269BD contains an odd address - i.e. bit 0 == 1'b1 This is not permitted. Memory files must be 2 or 4 byte aligned.
There is an issue with the error message and handling. The table of error message strings contains an error in the two of the messages are in the wrong order. This results in the "bad read length" message, where it should be a "invalid address range" message.
This will be fixed in the next release.
Regards
Mike
Thank you! Using the right even address solves the problem with the "bad read length" message.
Use Case
I saved the last collected data from the ETB (in cyclic mode) inside a persistent buffer and I only turned on the ETM4 (see ETM Configuration). Now, I want to decode the data using the
trc_pkt_lister -decode -ss_dir .
command on my snapshot.ETM Configuration
Snapshot
My snapshot looks like this:
[device_list] device0=cpu_0.ini device1=device_1.ini
[trace] metadata=trace.ini
[trace_buffers] buffers=buffer0
[buffer0] name=ETB file=etmout.bin format=coresight
[source_buffers] ETM_0=ETB
[core_trace_sources] cpu_0=ETM_0
[device] name=cpu_0 class=core type=Cortex-M4
[regs] R15=0x700269BD R13=0 CPSR=0x1D3
[dump0] file=firmware.bin address=0x700269BD
[device] name=ETM_0 class=trace_source type=ETM4
[regs] TRCCONFIGR(0x010)=0x00000011 TRCTRACEIDR(0x040)=0x00000010 TRCAUTHSTATUS(0xFB8)=0x000000C0 TRCIDR0(0x1E0)=0x080006E1 TRCIDR1(0x1E4)=0x4100F401 TRCIDR2(0x1E8)=0x00000004 TRCIDR8(0x180)=0x00000001 TRCIDR9(0x184)=0x00000000 TRCIDR10(0x188)=0x00000000 TRCIDR11(0x18C)=0x00000000 TRCIDR12(0x190)=0x00000001 TRCIDR13(0x194)=0x00000000
Trace Packet Lister: CS Decode library testing
** Library Version : 1.5.2
Test Command Line:- trc_pkt_lister -decode -ss_dir . -v
Trace Packet Lister : Warning: Ignored unknown option -v. Trace Packet Lister : reading snapshot from path . Using ETB as trace source ss2_dcdtree : 0x0021 (OCSD_ERR_MEM_ACC_BAD_LEN) [Memory accessor returned a bad read length value (larger than requested.]; Failed to create memory accessor for file ./firmware.bin.Trace Packet Lister : Protocol printer ETMV4I on Trace ID 0x10 Trace Packet Lister : Set trace element decode printer Gen_Info : Mapped Memory Accessors Gen_Info : ======================== Idx:2604; ID:10; [0x06 0x96 0xf6 0xe1 ]; I_NOT_SYNC : I Stream not synchronised Idx:2604; ID:10; OCSD_GEN_TRC_ELEM_NO_SYNC( [init-decoder]) Trace Packet Lister : Data Path fatal error 0x0021 (OCSD_ERR_MEM_ACC_BAD_LEN) [Memory accessor returned a bad read length value (larger than requested.]; Failed to create memory accessor for file ./firmware.bin.Trace Packet Lister : Trace buffer done, processed 4096 bytes.