shorepine / amy

AMY - A high-performance fixed-point Music synthesizer librarY for microcontrollers
https://shorepine.github.io/amy/
MIT License
184 stars 11 forks source link

PROGMEM issue on Teensy compiler #107

Closed bwhitman closed 5 months ago

bwhitman commented 5 months ago

If you're seeing ``` In file included from c:\Users\chris\Documents\Arduino\libraries\amy\src\patches.c:5: c:\Users\chris\Documents\Arduino\libraries\amy\src\patches.c: In function 'patches_load_patch': c:\Users\chris\Documents\Arduino\libraries\amy\src\patches.h:263:16: error: 'patch_oscs' causes a section type conflict with 'patch_commands' 263 | const uint16_t patch_oscs[256] PROGMEM = { | ^~~~~~ In file included from c:\Users\chris\Documents\Arduino\libraries\amy\src\patches.c:5: c:\Users\chris\Documents\Arduino\libraries\amy\src\patches.h:5:14: note: 'patch_commands' was declared here 5 | const char * patch_commands[256] PROGMEM = { | ^~~~~~



Change patches.h to `static const char * const patch_commands[256] PROGMEM = {` 

I'll try this and commit in after tests. 
bwhitman commented 5 months ago

I committed this fix after testing on Teensy. Should not impact any other builds