Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_exit.dbgasm called when debugging with VSCode, Pico becomes non-responsive #63

Open
mytechnotalent opened this issue Apr 21, 2024 · 3 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@mytechnotalent
Copy link

mytechnotalent commented Apr 21, 2024

When attempting to debug this code, the exit.dbgasm is being called and causing the Pico to be unresponsive as it calls exit.

I am using a Pico Debug Probe https://www.raspberrypi.com/products/debug-probe/

CODE

#include "pico/stdlib.h"
#include "hardware/uart.h"

const int UART_TX_PIN = 12; // GPIO0 is TX for UART0
const int UART_RX_PIN = 13; // GPIO1 is RX for UART0
const int BAUD_RATE = 115200;

void setup() {
    // Initialize UART0
  uart_init(uart0, BAUD_RATE);
  
  // Set TX and RX pins for UART0
  gpio_set_function(UART_TX_PIN, GPIO_FUNC_UART);
  gpio_set_function(UART_RX_PIN, GPIO_FUNC_UART);
  
  // Enable UART0 receiver and transmitter
  uart_set_hw_flow(uart0, false, false);
  uart_set_format(uart0, 8, 1, UART_PARITY_NONE);
  Serial.begin(115200);
}

void loop() {
  volatile uint8_t num = 42;
  uart_puts(uart0, "AT+SEND=0,1,K\r\n");
  sleep_ms(10);
}

CONFIG:

[env:rpipico]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = rpipico
framework = arduino
board_build.core = earlephilhower
debug_tool = cmsis-dap

_exit.dbgasm:

0x10006ad8: 00 be           	bkpt	0x0000
0x10006ada: fd e7           	b.n	0x10006ad8 <_exit>
@maxgerhardt maxgerhardt added the bug Something isn't working label Apr 29, 2024
@maxgerhardt maxgerhardt self-assigned this Apr 29, 2024
@maxgerhardt
Copy link
Owner

Does it also crash and become unresponsive when you load the same firmwarecode in the regular Arduino IDE with the Arduino-Pico core installed? If yes, better open an issue in Arduino-Pico itself.

@maxgerhardt maxgerhardt added the question Further information is requested label Apr 29, 2024
@mytechnotalent
Copy link
Author

HI @maxgerhardt first thank you for getting back. We use your work on just about everything our DEFCON local chapter codes and really appreciate your work. I have not tested on the Arduino IDE as I really prefer PlatformIO however will test for you and report back.

@mytechnotalent
Copy link
Author

I was unable to reproduce in Arduino IDE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants