platformio-core: The debugging of the Arduino Framework fails with FTDI Chip and ESP WROVER KIT

What kind of issue is this?

  • Feature Request. Start by telling us what problem you’re trying to solve. Often a solution already exists! Don’t send pull requests to implement new features without first getting our support. Sometimes we leave features out on purpose to keep the project small.

  • PlatformIO Core. If you’ve found a bug, please provide an information below.

You can erase any parts of this template not applicable to your Issue.


Configuration

Operating system: Windows 7 (the bug has been seen also on Win 8.1)

PlatformIO Version (platformio --version): PlatformIO, version 3.6.1a5 (upgraded to dev version)

Description of problem

The debugging of the Arduino Framework fails with FTDI Chip and ESP WROVER KIT

Steps to Reproduce

  1. Open arduino blinky example with esp wrover kit (see platformio.ini)
  2. Configure FTDI Chip as debugger as described in the forum: https://community.platformio.org/t/esp32-pio-unified-debugger/4541/78 (Normally the debugger sould work with ESP-IDF)
  3. Put a breakpoint in line 15 pinMode(LED_BUILTIN, OUTPUT);
  4. start debug session
  5. Put a breakpoint in line 21 digitalWrite(LED_BUILTIN, HIGH);
  6. Push F5

Actual Results

Instead of stopping a the breakpoint line 21, it stopps in the ASM code below image

If you push start again it never stops, an the led does not blink

Expected Results

It should stops at the line 21

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:esp wrover kit]
platform = espressif32
framework = arduino
board = esp-wrover-kit
monitor_speed = 115200
build_flags =
	; https://docs.espressif.com/projects/esp-idf/en/latest/get-started/get-started-wrover-kit.html#rgb-led
	-D LED_BUILTIN=2
debug_tool = ftdi

Source file to reproduce issue:

/*
 * Blink
 * Turns on an LED on for one second,
 * then off for one second, repeatedly.
 */

#include <Arduino.h>

// Set LED_BUILTIN if it is not defined by Arduino framework
// #define LED_BUILTIN 2

void setup()
{
  // initialize LED digital pin as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop()
{
  // turn the LED on (HIGH is the voltage level)
  digitalWrite(LED_BUILTIN, HIGH);
  // wait for a second
  delay(500);
  // turn the LED off by making the voltage LOW
  digitalWrite(LED_BUILTIN, LOW);
   // wait for a second
  delay(1000);
}

Additional info

More info about this bug in the forum: https://community.platformio.org/t/esp32-pio-unified-debugger/4541/57

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 26 (10 by maintainers)

Most upvoted comments

  1. I added a breakpoint on the line loopTaskWDTEnabled = false; and pressed “Continue”

No, please set breakpoint at void loopTask(void *pvParameters). You should stop at setup();, line 20 in main.cpp