Skip to content

Latest commit

 

History

History
104 lines (93 loc) · 3.48 KB

HowToUseRamdump.md

File metadata and controls

104 lines (93 loc) · 3.48 KB

How to Use Ramdump

Contents

Ramdump Upload Steps
Ramdump Parsing Steps

Ramdump Upload Steps

Below configuration must be enabled to support ramdump upload

  1. Enable crashdump support (CONFIG_BOARD_CRASHDUMP=y)
Hardware Configuration > Board Selection -> Enable Board level logging of crash dumps to y
  1. Enable ramdump (CONFIG_BOARD_RAMDUMP_UART=y)
Hardware Configuration > Board Selection -> Enable ramdump via UART to y
  1. Enable Stack Dump (CONFIG_ARCH_STACKDUMP=y)
Hardware Configuration > Chip Selection -> Dump stack on assertions to y
  1. Enable Debug (CONFIG_DEBUG=y)
Debug Options -> Enable Debug Output Features to y
  1. Enable frame pointer for generating stack frame (CONFIG_FRAME_POINTER=y)
Debug Options -> Enable backtracking using Frame pointer register  to y

Run ramdump tool from host after target crashed.

  1. If target got PANIC (asserted), below messages will be promted.
	****************************************************
	Disconnect this serial terminal and Run Ramdump Tool
	****************************************************
  1. Disconnect/close serial termial (may be minicom)

  2. Run ramdump tool

cd $TIZENRT_BASEDIR/tools/ramdump/
./ramdump.sh
  1. Ramdump Tool recieves the ram contents from target.
Target Handshake successful do_handshake
Target entered to ramdump mode
Receiving ramdump......
ramdump_recv: ramdump_address = 02020000, ramdump_size = 968704
[===========================================================>]
Ramdump received successfully
copying ramdump_0x02020000_0x0210c800.bin to  $TIZENRT_BASEDIR/build/output/bin

Ramdump Parsing Steps

DumpParser Script privodes two interfaces: CUI and GUI

DumpParser using CUI

  1. Run Ramdump Parser Script
cd $TIZENRT_BASEDIR/tools/ramdump/
python dumpParce.py -r $TIZENRT_BASEDIR/build/output/bin/ramdump_0x02020000_0x0210c800.bin -e $TIZENRT_BASEDIR/build/output/bin/tinyara -g 0
  1. See the Output

DumpParser using GUI

The UI configuration of DumpParser is as follows

(X) (-) Dump Parser
ELF path <Your ELF path> Browse
(O) AssertLog
(O) AssertLogFile
(O) Ramdump
Ramdump path <Your Ramdump path> Browse
Run DumpParser
  1. Run GUI Ramdump Parser Script
cd $TIZENRT_BASEDIR/tools/ramdump/
python gui_dumpParser.py
  1. Browse ELF path
  2. Select Ramdump mode
  3. Browse Ramdump path
  4. Click Run DumpParser button
  5. See the Output

Example Call Stack Output

********************************************************************
Board Crashed at :
PC: [0x40cb800] simulate_data_abort+0x20 [Line 63 of  "hello_main.c]"
LR: [0x40cb340] up_putc+0x28 [Line 1102 of  "chip/s5j_serial.c]"
FP: 0x2024fc4 and SP: 0x2024fb8
*******************************************************************
Call Trace of Crashed Task :[appmain] with pid :2 and state :TSTATE_TASK_RUNNING
*******************************************************************
[<40cb800>] simulate_data_abort+0x20         [Line 63 of \"hello_main.c\"]
[<40cb828>] hello_main+0x18         [Line 68 of \"hello_main.c\"]
[<40c9fec>] task_start+0x64         [Line 173 of \"task/task_start.c\"]
********************************************************************