Using CrashReport on Mac OS

I copied the one from the relevant folder in TD on macOS.
I remember once getting ?? As the output - does this mean anything specific?
 
Has anyone been able to use the addr2line with the .elf generated by PlatformIO?
I’ve tried but no success, get random characters on output

Hi Rezo

I've had it working with PlatformIO. PlatformIO does have the necessary compiler option set for a standard build (the -g option mentioned above). You need to add that in if you haven't already.

You can add it to your platformio.ini file - mine is like:

[env:teensymm]
platform = teensy
board = teensymm
framework = arduino
build_flags = -D USB_MIDI_SERIAL -g


cheers, Paul
 
I rename addr2line and put it on my desktop. then copy it to the folder with the temp files to make it easy. but I have a bit of a problem. I experienced a random crash doing something I do all the time in my sketch, (and i can't repeat it) and it seems the crash report gave me a non existing address. I tried it with another address and it did show me an existing line.

memory:
Code:
  FLASH: code:255076, data:408040, headers:8624   free for files:7454724
   RAM1: variables:93408, code:249080, padding:13064   free for local variables:168736
   RAM2: variables:341088  free for malloc/new:183200
 EXTRAM: variables:7730400

serial monitor:

Code:
  A problem occurred at (system time) 21:3:55
  Code was executing from address 0x396A4
  CFSR: 82
	(DACCVIOL) Data Access Violation
	(MMARVALID) Accessed Address: 0x0 (nullptr)
	  Check code at 0x396A4 - very likely a bug!
	  Run "addr2line -e mysketch.ino.elf 0x396A4" for filename & line number.
  Temperature inside the chip was 59.68 °C
  Startup CPU clock speed is 720MHz
  Reboot was caused by auto reboot after fault or bad interrupt detected

here is cmd window output (windows 10)

Code:
F:\temp\arduino_build_195491>addr2line -e Brainstorm0015.ino.elf 0x396A4
:?

F:\temp\arduino_build_195491>addr2line -e Brainstorm0015.ino.elf 0x39
F:\Temp\arduino_modified_sketch_457628/Oscope.ino:4
 
With the new compiler, that is being used in the current beta builds, the addr2line has not worked very well.

So instead, I find the list file, that is generated and is in the directory where the HEX file is located. And then search for that address within the file.

It may not show you the exact line number, but will typically show you the actual instruction failed and will have information about which function it is in...
 
Back
Top