Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Heap Log Analyser for esp32

edited January 29 in Mongoose OS

I am on Windows 10(Home edition) and refering to the Heap Log Analyser Documentation . It is written that when we set the debug level to 3 and add 'build_vars' to the 'mos.yml' , rebuild and flash it , we get to see alot of hl{...} in our console log. I am running the default mjs example code and for me the console log is not showing anything new regarding the heap log messages. I have attached my yml file and the console.log. Thanks...

Comments

  • nliviunliviu Romania

    Heap log tracing is available only for ESP8266:

    egrep --include="Makefile.*" -rn "MGOS_ENABLE_CALL_TRACE|MGOS_ENABLE_HEAP_LOG" ~/cesanta/mongoose-os
    /path/cesanta/mongoose-os/fw/platforms/esp8266/Makefile.build:46:MGOS_ENABLE_HEAP_LOG ?= 0
    /path/cesanta/mongoose-os/fw/platforms/esp8266/Makefile.build:49:MGOS_ENABLE_CALL_TRACE ?= 0
    /path/cesanta/mongoose-os/fw/platforms/esp8266/Makefile.build:248:ifneq "${MGOS_ENABLE_HEAP_LOG}${MGOS_ENABLE_CALL_TRACE}" "00"
    /path/cesanta/mongoose-os/fw/platforms/esp8266/Makefile.build:249:  HEAP_LOG_FLAGS += -DMGOS_ENABLE_HEAP_LOG
    /path/cesanta/mongoose-os/fw/platforms/esp8266/Makefile.build:255:ifeq "${MGOS_ENABLE_CALL_TRACE}" "1"
    /path/cesanta/mongoose-os/fw/platforms/esp8266/Makefile.build:257:  HEAP_LOG_FLAGS += -finstrument-functions -DCALL_TRACE_SIZE=33 -DMGOS_ENABLE_CALL_TRACE
    
    Thanked by 1sumedhburbure
  • edited January 30

    @nliviu I have noticed that whenever a core dump happens, it creates a file named 'core-...' inside the app directory. Is there any way to analyse the core dumps on esp32? I can't figure out the cause for it by looking at the generated files :( .My guess is it is related to heap .The core-dump file starts with something like this:
    <`--- BEGIN CORE DUMP ---
    {"app": "MyApp", "arch": "esp32", "version": "1.0", "build_id": "20190126-105326", "build_image": "docker.io/mgos/esp32-build:3.2-r1",
    "REGS": {"addr": 1073533444, "data": "
    UMMAQIilEIDgmPw/AAAAAORQ+z8WCAAAAAAAAHsiZGEiZGF0YSI6ewAAAAAAAAAAAwAAAMCY/D/ImPw/AQAAAAoAAADvvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e
    776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e776t3u++rd7vvq3e
    +9Uc3E6XuqSK1Cpi7anaxH61vnOEyNmSN5WuDlMkHzQZ2eNCW7yA2Phj8/NEJ9PW0moBb3bnCrc8Pc1BicS81ztSJrMT4DO6dNicYevRmLwJI
    hH7Y8oU9MqBVEDSktye2Omkk19oQpjBmrmVSxrq30OBvXw5srmA+Y+PFjcnd6zrixZwXfqq9YXsJHKLic/SKhSuHTFaiN19csy+VaIX9op1ywGptwprsdnd7K0DY3kCjldkvMY3Raj8BKJV1lD43BkhkmYm3aVng'>

  • nliviunliviu Romania
    edited January 30

    mos debug-core-dump core_file_here
    Or if you have mos console running, you'll see the results of the analysis.

Sign In or Register to comment.