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

Using Control Surface with Teensy 4.1 board #1047

Open
RandyRyanG opened this issue May 29, 2024 · 3 comments
Open

Using Control Surface with Teensy 4.1 board #1047

RandyRyanG opened this issue May 29, 2024 · 3 comments

Comments

@RandyRyanG
Copy link

RandyRyanG commented May 29, 2024

Getting the following errors when I include the control surface library.

Select Teensy 4.1 as board
Try to verify any of the control surface examples.

Should code verify with out issue?

// In file included from C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\SPI/SPI.h:23,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/AH/Hardware/LEDs/MAX7219_Base.hpp:8,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/AH/Hardware/LEDs/MAX7219SevenSegmentDisplay.hpp:3,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/Control_Surface.h:19,
                 from C:\Users\randy\AppData\Local\Temp\.arduinoIDE-unsaved2024429-16576-2p7owe.sr72\NoteButtonMatrix\NoteButtonMatrix.ino:34:
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/DMAChannel.h: In copy constructor 'DMASetting::DMASetting(const DMASetting&)':
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/DMAChannel.h:399:25: warning: implicitly-declared 'constexpr DMASetting& DMASetting::operator=(const DMASetting&)' is deprecated [-Wdeprecated-copy]
  399 |                 *this = c;
      |                         ^
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/DMAChannel.h:397:9: note: because 'DMASetting' has user-provided 'DMASetting::DMASetting(const DMASetting&)'
  397 |         DMASetting(const DMASetting &c) {
      |         ^~~~~~~~~~
In file included from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/Control_Surface.h:98,
                 from C:\Users\randy\AppData\Local\Temp\.arduinoIDE-unsaved2024429-16576-2p7owe.sr72\NoteButtonMatrix\NoteButtonMatrix.ino:34:
c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/MIDI_Inputs/MCU/VU.hpp: At global scope:
c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/MIDI_Inputs/MCU/VU.hpp:188:7: warning: 'cs::MCU::VU' has a field 'cs::MCU::VU::decayTimer' whose type uses the anonymous namespace [-Wsubobject-linkage]
  188 | class VU : public MatchingMIDIInputElement<MIDIMessageType::ChannelPressure,
      |       ^~
In file included from C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/WProgram.h:58,
                 from C:\Users\randy\AppData\Local\Temp\arduino\sketches\524D84EAEDA2A1D34F17FC939CBC56EE/pch/Arduino.h:6,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/AH/Math/FixArduinoMacros.hpp:6,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/AH/Math/MinMaxFix.hpp:3,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/AH/Arduino-Wrapper.h:3,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src\AH\Math\Quaternion.hpp:24,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src\AH\Math\Quaternion.cpp:1:
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/usb_midi.h: In member function 'void usb_midi_class::setHandleSysEx(void (*)(const uint8_t*, uint16_t, bool))':
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/usb_midi.h:347:47: warning: cast between incompatible function types from 'void (*)(const uint8_t*, uint16_t, bool)' {aka 'void (*)(const unsigned char*, short unsigned int, bool)'} to 'void (*)(const uint8_t*, uint16_t, uint8_t)' {aka 'void (*)(const unsigned char*, short unsigned int, unsigned char)'} [-Wcast-function-type]
  347 |                 usb_midi_handleSysExPartial = (void (*)(const uint8_t *, uint16_t, uint8_t))fptr;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/usb_midi.h: In member function 'void usb_midi_class::setHandleSystemExclusive(void (*)(const uint8_t*, uint16_t, bool))':
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/usb_midi.h:351:47: warning: cast between incompatible function types from 'void (*)(const uint8_t*, uint16_t, bool)' {aka 'void (*)(const unsigned char*, short unsigned int, bool)'} to 'void (*)(const uint8_t*, uint16_t, uint8_t)' {aka 'void (*)(const unsigned char*, short unsigned int, unsigned char)'} [-Wcast-function-type]
  351 |                 usb_midi_handleSysExPartial = (void (*)(const uint8_t *, uint16_t, uint8_t))fptr;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/WProgram.h:58,
                 from C:\Users\randy\AppData\Local\Temp\arduino\sketches\524D84EAEDA2A1D34F17FC939CBC56EE/pch/Arduino.h:6,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/AH/Math/FixArduinoMacros.hpp:6,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/AH/Math/MinMaxFix.hpp:3,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/AH/Arduino-Wrapper.h:3,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/AH/PrintStream/PrintStream.hpp:8,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/AH/Debug/Debug.hpp:5,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src\AH\Error\Error.hpp:5,
                 from c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src\AH\Error\Exit.cpp:3:
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/usb_midi.h: In member function 'void usb_midi_class::setHandleSysEx(void (*)(const uint8_t*, uint16_t, bool))':
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/usb_midi.h:347:47: warning: cast between incompatible function types from 'void (*)(const uint8_t*, uint16_t, bool)' {aka 'void (*)(const unsigned char*, short unsigned int, bool)'} to 'void (*)(const uint8_t*, uint16_t, uint8_t)' {aka 'void (*)(const unsigned char*, short unsigned int, unsigned char)'} [-Wcast-function-type]
  347 |                 usb_midi_handleSysExPartial = (void (*)(const uint8_t *, uint16_t, uint8_t))fptr;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/usb_midi.h: In member function 'void usb_midi_class::setHandleSystemExclusive(void (*)(const uint8_t*, uint16_t, bool))':
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/usb_midi.h:351:47: warning: cast between incompatible function types from 'void (*)(const uint8_t*, uint16_t, bool)' {aka 'void (*)(const unsigned char*, short unsigned int, bool)'} to 'void (*)(const uint8_t*, uint16_t, uint8_t)' {aka 'void (*)(const unsigned char*, short unsigned int, unsigned char)'} [-Wcast-function-type]
  351 |                 usb_midi_handleSysExPartial = (void (*)(const uint8_t *, uint16_t, uint8_t))fptr;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@tttapa
Copy link
Owner

tttapa commented May 29, 2024

Hi, these all appear to be warnings, not errors. Does the compilation fail elsewhere?

C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/DMAChannel.h:399:25: warning: implicitly-declared 'constexpr DMASetting& DMASetting::operator=(const DMASetting&)' is deprecated [-Wdeprecated-copy]
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/usb_midi.h: In member function 'void usb_midi_class::setHandleSysEx(void (*)(const uint8_t*, uint16_t, bool))':
C:\Users\randy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/usb_midi.h:347:47: warning: cast between incompatible function types from 'void (*)(const uint8_t*, uint16_t, bool)' {aka 'void (*)(const unsigned char*, short unsigned int, bool)'} to 'void (*)(const uint8_t*, uint16_t, uint8_t)' {aka 'void (*)(const unsigned char*, short unsigned int, unsigned char)'} [-Wcast-function-type]

These are warnings in the Teensy Core, outside of Control Surface. I opened an issue back in 2022, but it has not been addressed: PaulStoffregen/cores#660

c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/MIDI_Inputs/MCU/VU.hpp: At global scope:
c:\Users\randy\Documents\Arduino\libraries\Control_Surface\src/MIDI_Inputs/MCU/VU.hpp:188:7: warning: 'cs::MCU::VU' has a field 'cs::MCU::VU::decayTimer' whose type uses the anonymous namespace [-Wsubobject-linkage]

This is a valid warning, caused by the fact that millis in an inline function on Teensy, but it should not cause any issues.

@RandyRyanG
Copy link
Author

No, is it ok to ignore them? Or turn those warnings off in preferences?

@tttapa
Copy link
Owner

tttapa commented May 29, 2024

Yes, you can ignore them.

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

2 participants