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

Investigate program breakage when using Serial functions #2

Open
dakkshesh07 opened this issue Feb 15, 2025 · 1 comment
Open

Investigate program breakage when using Serial functions #2

dakkshesh07 opened this issue Feb 15, 2025 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@dakkshesh07
Copy link
Member

The Blink example program fails when serial functions are used, even with LTO disabled globally. The LED seems to be stuck in ON position. However, removing the serial code allows the LED to blink normally.

test code:

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);      // Initialize LED pin
  Serial.begin(9600);                    
  Serial.println();                 
  Serial.println("Hello world. I was built with clang!"); 
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH); 
  delay(1000);                  
  digitalWrite(LED_BUILTIN, LOW);   
  delay(1000);                  
}

how ever by removing the serial code the program works normally:

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);      // Initialize LED pin
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH); 
  delay(1000);                  
  digitalWrite(LED_BUILTIN, LOW);   
  delay(1000);                  
}
@dakkshesh07 dakkshesh07 added help wanted Extra attention is needed bug Something isn't working labels Feb 15, 2025
@dakkshesh07
Copy link
Member Author

LLVM issue opened: llvm/llvm-project#128536

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant