Here is what chatGPT said: The errors you're seeing suggest that the selected processor doesn't support certain ARM-specific instructions. These errors are usually associated with the settings you've chosen for the compiler flags (CFLAGS and CXXFLAGS).
Syntax Issue: It looks like the list of...
This exact thing happens to me and the Teensy 4 when I compiled my code and it produced code that (I think) was too big for the teensy. When not uploading and just building, the compiler says space free for local variables is a negative value.
If I tried to upload that it compiles just fine...
Well I know what the parameters do and I see what works with the signals I have. I have an intuitive understanding of what happens when I adjust the values and I’ve done that by experimenting a lot.
However I don’t know how to actually calculate the values, I use the app.
Thank you for the...
Virtual methods were mostly for convenience to use less code. I’ve removed the virtual methods and I’m using the curiously recurring template pattern in stead. Works the same but at compile time (according to chatGPT).
Also removed the .at() and use [] for accessing arrays.
I’ve put everything...
My filter class does not have this problem.
I know using a .h file is not the problem. I'm allocating statically and it works as long as the constructor and the AddValue method in this class are either in a .cpp file or the compiler is told not to inline.
I can try dynamic allocation but...
I wrote this class that keeps track of the maximum value in a sliding window of incoming samples in realtime and I've been using it without issue.
However I recently decided to use header files only because the compiler can optimise the code more by inlining etc. and the OPTIMISE_FASTEST_LTO...
I didn’t measure that precisely, I seem to have saved a microsecond or so for a bunch of these filters after moving it into .h file and removing the virtual functions. I think the compiler inlines it anyway as long as it’s inside the class.
Are you saying you kept it in the .cpp file and...
I've done some experimenting and consulted with chatGPT about possible performance gains. Polymorphism is bad so I changed to compiletime polymorphism by using templates. Also some other stuff like using [] in stead of .at() which does bounds checking. Another thing is I've removed all .cpp...
Thanks for the suggestion Paul.
It depends, I have 10 sensors and this way I can do the calculation on two sensors at a time while waiting for the next two sensors to be read by the ADC so I think this is faster, much faster. The sensors need to be read in a sequence.
I have 5 microseconds of...
I'm running out of processing power on my Teensy 4 with my electronic drum project and need to implement some more stuff.
I'm wondering if a particular part of the code can be improved to be faster as it is run inside the loop many times. It's my filter class which has a bunch of filters inside...