Skip to content

Commit

Permalink
Avoid USB bug related with O2 optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulStoffregen committed Aug 27, 2018
1 parent 92533cb commit cb6289f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions teensy3/usb_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@
#include "usb_mem.h"
#include <string.h> // for memset

// This code has a known bug with compiled with -O2 optimization on gcc 5.4.1
// https://forum.pjrc.com/threads/53574-Teensyduino-1-43-Beta-2?p=186177&viewfull=1#post186177
#if defined(__MKL26Z64__)
#pragma GCC optimize ("Os")
#else
#pragma GCC optimize ("O3")
#endif

// buffer descriptor table

typedef struct {
Expand Down

0 comments on commit cb6289f

Please sign in to comment.