-
Notifications
You must be signed in to change notification settings - Fork 190
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
Proper system condition in mozzi_pgrmspace.h #125
Comments
For the time being it's really all other platforms. ESP32 and ESP8266 are special, here, because their flash memory (aka program space) is externally connected, and rather slow. On these platforms, we don't want to put wavetables into program space, while for the other MCUs that is possible and helps save RAM. I believe on RPi there is not even any such distinction, so it probably will not matter either way. If you have an idea who to express this in a more self-explanatory way... |
So your saying the else case is currently valid for I noticed that for my ARM Mbed and for the RP2040 implementation this section is compiling w/o errors - but I was clueless for quite some days why all my boards were crashing when started with Mozzi! I think we really need to be more explicit here...after all there is this I was double checking your statement: the wavetables are e.g. defined as CONSTTABLE_STORAGE(int8_t) which is giving const on the ESP32 and from what I know this will ends up in Flash Memory! |
Hm, indeed. I must have simply assumed that by analogy wit ESP8266... As for <avr/pgmspace.h>, note that both Arduino and Mozzi originated on AVR. When arduino started supporting more platforms, most cores added (among others) avr/pgmspace.h for compatibility with existing code. By the same token, when Mozzi started adding platforms (teensy, then STM32 were the first, AFAIK), there was no need to touch this part. The arduino ESP8266 core also has avr/pgmspace.h, but it does suffer from slow flash (as I had also assumed for ESP32), which is why the #if came into being (IIRC, there wasn't even a separate mozzi_pgmspace.h, before). Now, you are probably right that at least some of the platforms in the #else portion could (and should, for clarity) be moved up into the #if section. Their pgmspace macros will simply work on const types. But of course that would need to be sorted out very carefully.
But why did they? |
It'seems that I was jumping to a conclusion which did not hold. I am happy to confirm that this is not the source of my crashes. So far I did all my audio projects on ESP32 - and this is the first time I am working on any ARM Mbed based boards. I just assumed that they are in the same ballpark like the ESP and hell was I wrong. So I started to do some measurements:
I seriously starting to doubt if this is leading to anything useful - when a old AVR Nano is more then 4 times faster then a Nano 33 BLE Sense... |
@pschatzmann I was just wondering how you were able to get mozzi to work with a nano ble sense? thanks in advance! |
Sorry for my late update, but I was working on some other projects. |
While defining a new kernel I was stumbling over the following:
There is a condition for #if IS_ESP8266() || IS_ESP32() and in the
and in the #else we have some logic where I am not sure for which processors it applies.
I would really like to have a specific list here and a proper #error in the else case so that when somebody is porting to a new environment he gets a proper error message.
Would we know what this list would be ?
The text was updated successfully, but these errors were encountered: