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

Errors when compiling on TD1.54 #101

Open
david-res opened this issue Jul 7, 2021 · 2 comments
Open

Errors when compiling on TD1.54 #101

david-res opened this issue Jul 7, 2021 · 2 comments

Comments

@david-res
Copy link

I am getting the following errors when I try to compile a sketch using snooze on the most recent release of Teensyduino 1.54
Compiling for Teensy 4.0

/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp: In member function 'virtual void SnoozeDigital::enableDriver(uint8_t)': /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp:12:15: error: expected unqualified-id before numeric constant #define DR 0 ^ /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4/imxrt.h:5662:33: note: in expansion of macro 'DR' #define GPIO6_DR (IMXRT_GPIO6.DR) ^ /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp:99:35: note: in expansion of macro 'GPIO6_DR' case ( uint32_t )&GPIO6_DR: { ^ /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp:12:15: error: expected ')' before numeric constant #define DR 0 ^ /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4/imxrt.h:5662:33: note: in expansion of macro 'DR' #define GPIO6_DR (IMXRT_GPIO6.DR) ^ /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp:99:35: note: in expansion of macro 'GPIO6_DR' case ( uint32_t )&GPIO6_DR: { ^ /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp:502:1: error: expected ':' at end of input } ^ /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp:502:1: error: expected statement at end of input /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp:502:1: error: expected '}' at end of input /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp:502:1: error: expected '}' at end of input /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp:502:1: error: expected '}' at end of input /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp:502:1: error: expected '}' at end of input /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeCompare.cpp: In member function 'virtual void SnoozeCompare::disableDriver(uint8_t)': /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeCompare.cpp:174:18: warning: 'IRQ_CMP' may be used uninitialized in this function [-Wmaybe-uninitialized] IRQ_NUMBER_t IRQ_CMP; ^ /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeCompare.cpp: In member function 'virtual void SnoozeCompare::enableDriver(uint8_t)': /Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/libraries/Snooze/src/hal/TEENSY_40/SnoozeCompare.cpp:302:18: warning: 'IRQ_CMP' may be used uninitialized in this function [-Wmaybe-uninitialized] IRQ_NUMBER_t IRQ_CMP; ^ Error compiling for board Teensy 4.0.

@CorBer
Copy link

CorBer commented Jul 15, 2021

Hi,

I just experienced the same issues also with for instance 1.54beta7.

regards
Cor

@stefphd
Copy link

stefphd commented Aug 3, 2021

Hi,
I probably solved the same issue by commenting #define DR 0 and replacing IMR with another name (e.g. IMR0) in Snooze/src/hal/TEENSY_40/SnoozeDigital.cpp. I do not known if it will work properly. Maybe the macros DR and IMR conflict with other macros defined in teensy/avr/cores/teensy4/imxrt.h.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants