PaulStoffregen
Well-known member
You showed us your Arduino sketch code, which is good, but it includes 8 files and 1 of those (AMY-Arduino.h) is something unfamiliar, not anything installed by Teensyduino. Your compiler errors also how the offending lines are in "libraries\amy\src\patches.h" included by libraries\amy\src\patches.c. I hope you can understand how the best anyone can do is blind guessing and generic advice when we can't reproduce the problem and we even can't see patches.h and patches.c or anything else associated with AMY-Arduino.h.
So with generic advice, which may or may not apply to your specific problem, usually the 2 things to be done about section type conflicts are to be careful about using PROGMEM only for variables and FLASHMEM only for functions. These do basically the same thing and either can work for either usage. Two of them exist because of the section type conflict errors gcc gives. The other thing you can do is divy your code up into smaller files, where no single .c or .cpp "compile unit" has conflicting usage of section keywors like PROGMEM and FLASHMEM.
So with generic advice, which may or may not apply to your specific problem, usually the 2 things to be done about section type conflicts are to be careful about using PROGMEM only for variables and FLASHMEM only for functions. These do basically the same thing and either can work for either usage. Two of them exist because of the section type conflict errors gcc gives. The other thing you can do is divy your code up into smaller files, where no single .c or .cpp "compile unit" has conflicting usage of section keywors like PROGMEM and FLASHMEM.