Hello there
I trying to use platformio debug for last two days, I always getting the same error:
PlatformIO: Initializing remote target...
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
.pioinit:13: Error in sourced command file:
Bogus trace status reply from target: timeout
I looked at a lot of search results(for example: 1, 2, and more(new users can insert up to two links)) and none of them helped me.
Here is my platformio.ini:
// *** Include libs ***
#include "Arduino.h"
#include "avr8-stub.h"
#include "app_api.h"
#include <Adafruit_NeoPixel.h>
// #include <EasyButton.h>
#include <avr/power.h>
#include <NoDelay.h>
#include <EEPROM.h>
// *** Include header files ***
#include "typedefs.h" //Here is the definition of the Functions type
//! (but other type definitions may appear there in future updates)
#include "config.h" //Definition of the EEPROM_CONFIG type,
//common for all files, together with its initial appearance
#include "FwF.h" //Header file for essential firmware functions
//(serial.cpp and startup.cpp)
#include "helpers.h" //Small helper functions designed to simplify files
#include "definitionOfModes.h" //In order not to include a dozen or even more mode files,
//you can use just one header file
EEPROM_CONFIG CONFIG; //Its initial appearance of EEPROM_CONFIG
#define LED_DATA_PIN 53
#define CHANGE_MODE_BUTTON_PIN 52
#define TURN_OFF_BUTTON_PIN 51
#define NUMBER_OF_PIXELS 150
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMBER_OF_PIXELS, LED_DATA_PIN, NEO_GRB + NEO_KHZ800);
//Target for management, the meaning of the existence of the firmware
// EasyButton changeModeButton(CHANGE_MODE_BUTTON_PIN);
// EasyButton turnOffButton(TURN_OFF_BUTTON_PIN);
//This is the button to change the mode
const int CONFIG_ADDRESS = 0;
uint8_t modeSelected = 0;
//Currently selected mode
uint8_t maxSelected = 6;
//maxSelected to reset the mode selection to the first one
//!Max count of modes in firmware is 255
bool __FLAG__doModes = false;
//Can stop the execution of modes, used in startup() to wait for the ESP8266 chip to be fully ready
Functions modes[] = { redAndGray::doTick }; //Defined in typedefs.h
void serialEvent3() { doReadSerial(); }
void setup() { debug_init(); startup(); }
void loop() {
// changeModeButton.read();
// turnOffButton.read();
if (__FLAG__doModes) { modes[modeSelected](); }
}
Then something in your large project is preventing it from working. I would throw out / deacitvate everyething Serial related first and just keep the debug_init().
I’ll ask you to wait, please. I’m waiting for the result, just informing
main.cpp:
// *** Include libs ***
#include "Arduino.h"
#include "avr8-stub.h"
#include "app_api.h"
#include <Adafruit_NeoPixel.h>
// #include <EasyButton.h>
#include <avr/power.h>
#include <NoDelay.h>
#include <EEPROM.h>
// *** Include header files ***
#include "typedefs.h" //Here is the definition of the Functions type
//! (but other type definitions may appear there in future updates)
#include "config.h" //Definition of the EEPROM_CONFIG type,
//common for all files, together with its initial appearance
#include "FwF.h" //Header file for essential firmware functions
//(serial.cpp and startup.cpp)
#include "helpers.h" //Small helper functions designed to simplify files
#include "definitionOfModes.h" //In order not to include a dozen or even more mode files,
//you can use just one header file
EEPROM_CONFIG CONFIG; //Its initial appearance of EEPROM_CONFIG
#define LED_DATA_PIN 53
#define CHANGE_MODE_BUTTON_PIN 52
#define TURN_OFF_BUTTON_PIN 51
#define NUMBER_OF_PIXELS 150
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMBER_OF_PIXELS, LED_DATA_PIN, NEO_GRB + NEO_KHZ800);
//Target for management, the meaning of the existence of the firmware
// EasyButton changeModeButton(CHANGE_MODE_BUTTON_PIN);
// EasyButton turnOffButton(TURN_OFF_BUTTON_PIN);
//This is the button to change the mode
const int CONFIG_ADDRESS = 0;
uint8_t modeSelected = 0;
//Currently selected mode
uint8_t maxSelected = 6;
//maxSelected to reset the mode selection to the first one
//!Max count of modes in firmware is 255
bool __FLAG__doModes = false;
//Can stop the execution of modes, used in startup() to wait for the ESP8266 chip to be fully ready
Functions modes[] = { redAndGray::doTick }; //Defined in typedefs.h
void serialEvent3() { doReadSerial(); }
void setup() { debug_init(); startup(); }
void loop() {
// changeModeButton.read();
// turnOffButton.read();
breakpoint();
if (__FLAG__doModes) { modes[modeSelected](); }
}
Hmm… It’s bad, but it definitely got better. Here is debug output:
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = avr-stub
PlatformIO: Initializing remote target...
Ignoring packet error, continuing...
0x00000572 in _NeoPixelGammaTable ()
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = loop`
PlatformIO: More configuration options -> https://bit.ly/pio-debug
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.