Open ast opened 8 years ago
So after quite a bit of work I managed to beat arm_math.h
into submission and also compile the code in this repo and also compile an example where I use it to do some DSP on the Teensy LC!
In particular I had to revert some of the changes in arm_math.h
around line 260. There are also some .h
files missing, core_cmFunc.h
in particular. I had to include ARMCM0plus.h
to get IRQn_Type
but I have a feeling this is a bit of an ugly hack and I can see this type is also used in core_cm4.h
and there're also some suspiciously similar looking enums in kinetis.h
but I for my life I couldn't figure out how it all stayed together :-)
I feel I lack the last pieces of the puzzle to put together a a patch but I'd be more than happy to help!
The big mystery for me now is IRQn_Type
...
# arm_math.h
// Teensy LC
#include <stdint.h>
#define __ASM __asm
#define __INLINE inline
#define __STATIC_INLINE static inline
# start ugly hack
#define __IM volatile const /*! Defines 'read only' structure member permissions */
#define __OM volatile /*! Defines 'write only' structure member permissions */
#define __IOM volatile /*! Defines 'read / write' structure member permissions */
#include "ARMCM0plus.h" // Has IRQn_Type;
# end ugly hack
#include "core_cm0plus.h"
Any reason why arm_math.h is hard coded for CORTEX_M4?
It was an ugly hack done long before Teensy LC existed.
If you can give me some insight into IRQn_Type
and how you solved that in core_cm4.h
I think I will be able to put together a patch... And also if you could commit core_cmFunc.h
from the right source.
Thanks for the great work! Have been a big Teensy fan for many years!
As referenced from
core_cm0plus.h
.I'm trying to learn some DSP on the Teensy LC so it would be super nice if this could be fixed somehow.
Any reason why arm_math.h is hard coded for CORTEX_M4?
Thank you for your work on Teensy. Very much appreciated!