Disassembly window not showing

Hi, I have problem with the disassembly view: When I’m running my code in debug mode in vscode I click on “show disassembly” but no source comes up.
I’m referring to the panel which you can see here on the righthand side of the window


Call stack shows no source for all the entries.
C++ debug stepping functionalities are working fine.

I’m using
esp32-cam
CJMCU-232H
PlatformIO, version 4.4.0a4
my platofrmio.ini is the following

[platformio]
default_envs = esp32cam

[common]
platform = espressif32
board = esp32cam
framework = arduino
monitor_port = COM7
monitor_speed = 115200
upload_port = COM7
upload_speed = 2000000

[env:esp32cam]
platform = ${common.platform}
board = ${common.board}
framework = ${common.framework}
monitor_port = ${common.monitor_port}
monitor_speed = ${common.monitor_speed}
upload_port = ${common.upload_port}
upload_speed = ${common.upload_speed}

[env:debug]
platform = ${common.platform}
board = ${common.board}
framework = ${common.framework}
build_type = debug
debug_init_break = tbreak setup
upload_protocol = custom
debug_tool = custom
debug_server =
  $PLATFORMIO_HOME_DIR/packages/tool-openocd-esp32/bin/openocd
  -s
  $PLATFORMIO_HOME_DIR/packages/tool-openocd-esp32/share/openocd/scripts/
  -f
  $PLATFORMIO_HOME_DIR/packages/tool-openocd-esp32/share/openocd/scripts/interface/ftdi/esp32_devkitj_v1.cfg
  -f
  $PLATFORMIO_HOME_DIR/packages/tool-openocd-esp32/share/openocd/scripts/board/esp-wroom-32.cfg
  -c 'ftdi_vid_pid 0x0403 0x6014'

Are you sure the processor is stopped when you do that, e.g. by it having hit a breakpoint?

Can you post a screenshot of the before and after picture when you press the “Switch to Disassembly” button?

yeah it’s definitely hitting the breakpoint.

interestingly enough switching the config to this one seems to be working…

[env:esp32cam]
platform = espressif32
board = esp32cam
framework = arduino
monitor_port = COM7
monitor_speed = 115200
upload_port = COM7
upload_speed = 2000000
debug_init_break = tbreak setup
debug_tool = custom
upload_protocol = custom
debug_server =
  $PLATFORMIO_HOME_DIR/packages/tool-openocd-esp32/bin/openocd
  -s
  $PLATFORMIO_HOME_DIR/packages/tool-openocd-esp32/share/openocd/scripts/
  -f
  $PLATFORMIO_HOME_DIR/packages/tool-openocd-esp32/share/openocd/scripts/interface/ftdi/esp32_devkitj_v1.cfg
  -f
  $PLATFORMIO_HOME_DIR/packages/tool-openocd-esp32/share/openocd/scripts/board/esp-wroom-32.cfg
  -c 'ftdi_vid_pid 0x0403 0x6014'

they should be equivalent.
Question is: why the first one with dynamic params doesn’t work?

In the screenshot you can see the disassembly panel is not appearing.

But setup.dbgasm is appearing as a new tab, you might have to pull it out and to the right of the window to pin in it on the right side. Does that work?

Maybe it depends on VSCode settings or previous actions wether that tab is automatically brought to the foreground.

That tab was left open after I tried the second configuration I reported to be working (let’s call it “static”).
To make the screenshots I went back to the first one I posted (let’s call it “dynamic”) which seems break the “switch to assembly” functionality.

If I leave the disasm tab open, run a new debug session and hit “switch to assembly”, I experience a different behaviour between the two configs:
static: switches to the previously opened disasm tab highlighting the currently executed asm instruction (good)
dyanamic: stays on the code tab removing the highlighting from the currently executed C++ instruction code (bad)

Okay, so that seems to be quite reproducable behavior then. Bug report to Issues · platformio/platformio-vscode-ide · GitHub please.

Sorry for hitting this old issue, but was there ever a solution found?
I’ve entered a bug in GitHub for the same issue, now for a TI Tiva C Launchpad Eval. kit I want to use to brush up my firmware programming : https://github.com/platformio/platformio-vscode-ide/issues/3344

1 Like