Skip to content

Investigate program breakage when using Serial functions #2

Open
@beakthoven

Description

@beakthoven

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);                  
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions