Skip to content

Debugger does not work as compiled binaries are not in the sketch folder #1102

Closed
@kittaakos

Description

@kittaakos

Bug Report

#1042 breaks the debug -I command. The binaries are not where the debugger expects.

Current behavior

Steps to reproduce:

% rm -rf ~/Library/Arduino15
% rm -rf ~/Documents/Arduino/hardware
% ./arduino-cli version --format json
{
  "Application": "arduino-cli",
  "VersionString": "0.14.0-rc1",
  "Commit": "7d4baa9",
  "Status": "alpha",
  "Date": "2020-12-03T17:24:59Z"
}
% ./arduino-cli core install arduino:avr --format json
% cat ~/Documents/Arduino/DigisparkBlink/DigisparkBlink.ino 

#define LED_BUILTIN 1

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

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

% ./arduino-cli compile -b arduino:avr:uno ~/Documents/Arduino/DigisparkBlink --format json
{
  "compiler_out": "Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.\nGlobal variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.\n",
  "compiler_err": "",
  "builder_result": {
    "build_path": "/var/folders/k3/d2fkvv1j16v3_rz93k7f74180000gn/T/arduino-sketch-F389360393BFFB04E3EC135340A2EF23",
    "executable_sections_size": [
      {
        "name": "text",
        "size": 924,
        "maxSize": 32256
      },
      {
        "name": "data",
        "size": 9,
        "maxSize": 2048
      }
    ]
  },
  "success": true
}
% ./arduino-cli debug -b arduino:avr:uno ~/Documents/Arduino/DigisparkBlink -I
Error getting Debug info: compiled sketch not found in /Users/akos.kitta/Documents/Arduino/DigisparkBlink/build/arduino.avr.uno
% 

Expected behavior

It works as it worked before #1042

Environment

  • CLI version (output of arduino-cli version):
  • OS and platform:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions