cmsis_version.h, missing.

Mike Maurice

Active member
TeensyDuino v 1.56, Arduino v 1.8.19
If include:
#include "core_cm7.h"

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4/core_cm7.h:63:27: fatal error: cmsis_version.h: No such file or directory

Also: core_cm4_simd.h, may be missing? Teensy3 has it.
 
The only reference to "core_cm7.h" in the Teensy cores and TeensyDuino libraries is a #include in arm_math.h, and that #include is inside a #if 0 conditional block. In other words, it is not used by Teensy. A few of the macros defined in core_cm7.h, such as __CORTEX_M and __FPU_USED, are explicitly defined in arm_math.h, just before the (disabled) #include. That means core_cm7.h is not required to use CMSIS DSP, which I think is the only part of CMSIS that is built into Teensy. Are you trying to use some other part of CMSIS? If so, you probably have to bring it in as your own library.
 
core_cm7.h and missing include

The only reference to "core_cm7.h" in the Teensy cores and TeensyDuino libraries is a #include in arm_math.h, and that #include is inside a #if 0 conditional block. In other words, it is not used by Teensy. A few of the macros defined in core_cm7.h, such as __CORTEX_M and __FPU_USED, are explicitly defined in arm_math.h, just before the (disabled) #include. That means core_cm7.h is not required to use CMSIS DSP, which I think is the only part of CMSIS that is built into Teensy. Are you trying to use some other part of CMSIS? If so, you probably have to bring it in as your own library.

I stumbled into this issue, when I tried to include core_cm7.h below <Arduino.h>
There was some code in it that I wanted to use, but it's too many days and too many compiles since to remember just what I was after. But, cm7 can't be included like I noted, core_cm4.h in teensy3 appears to be the previous version.

In case it was not clear, and I just tested the case where Arduino.h is followed by cm7, it is then missing the version .h file.
If I get time to clarify what I was testing for, I'll post it later.

Regards,
Mike
 
I stumbled into this issue, when I tried to include core_cm7.h below <Arduino.h>
There was some code in it that I wanted to use, but it's too many days and too many compiles since to remember just what I was after. But, cm7 can't be included like I noted, core_cm4.h in teensy3 appears to be the previous version.

In case it was not clear, and I just tested the case where Arduino.h is followed by cm7, it is then missing the version .h file.
If I get time to clarify what I was testing for, I'll post it later.

I'm just trying to say that you should not have #include "core_cm7.h" in your code unless you bring in more of the CMSIS library. Perhaps it shouldn't be in the Teensy4 core at all. I can only speculate that it ended up there during the import of the CMSIS DSP code. The Teensy 4.x processors have Cortex M7 cores (cm7) and Teensy 3.5/3.6 have Cortex M4 (cm4). If you remember what you wanted to use from core_cm7.h, let us know.
 
I appreciate your comment to not include the cm7 code unless bringing in more the CMSIS libary. However, the cmsis_version.h file is nowhere to be found, at all. So, where does that leave us?

Here is the dir /s listing:

C:\Program Files (x86)>dir cmsis*.h/s
Volume in drive C has no label.
Volume Serial Number is 449F-B0F9

Directory of C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy4

02/10/2022 06:03 PM 62,983 cmsis_gcc.h
1 File(s) 62,983 bytes

Total Files Listed:
1 File(s) 62,983 bytes
0 Dir(s) 789,019,475,968 bytes free
 
I appreciate your comment to not include the cm7 code unless bringing in more the CMSIS libary. However, the cmsis_version.h file is nowhere to be found, at all. So, where does that leave us?

Only CMSIS DSP is included in TeensyDuino. It requires a few macros that are defined in core_cm7.h, but #include "core_cm7.h" creates other issues (as you have found), so the necessary macros were extracted and placed directly into arm_math.h. At that point, core_cm7.h probably could have been removed from the Teensy core, but Paul left it in, probably for a good reason. If you want to be able to #include "core_cm7.h", you must figure out what it uses, go to the CMSIS repository on github, get the necessary files, etc. On the other hand, if you are just trying to use another part of CMSIS that is not already in Teensy, you can do that, too. For example, the thread linked below is about using the CMSIS NN (neural network) library on Teensy 3.x. What part of CMSIS are you trying to use?

https://forum.pjrc.com/threads/53809-CMSIS-NN-(Neural-Network)-Library-Now-Working-on-Teensy-3-6
 
core cm7.h and the unthinkable.

Your explanation is beginning to make sense. It figures that there is some sort of contorted answer that only a gaggle of geese or a squad of programmers could imagine. And that only another programmer could stumble into. An outsider might conclude that this is proof of why programmers should not be allowed to write code.
You would think that after 40 years of writing gibberish, I would have learned not to ask questions, for fear of the answers! I used to do beta testing of "MS Windows", and I would warn them not to let me get my hands on their carefully crafted code since I would always find ways to break it that were considered impossible.

My grapevine sometimes informed me of unprintable words that were uttered by a certain un-knowable, high mucky muck, on Monday mornings after InfoWorld came out, regarding some bug I had discovered the week before.

General Robert E. Lee stated that the worst mistake he ever made was becoming an Army Officer. Perhaps I should have opted for Anthropology and gone out of Africa and spent my life observing Chimpanzees with Jane Goodall.

You have my apology for being amused by this.
Regards,
Mike
 
I used to do beta testing of "MS Windows", and I would warn them not to let me get my hands on their carefully crafted code since I would always find ways to break it that were considered impossible.

This reminds me of one of my personal favorites. "Nothing is foolproof, because fools are so ingenious".
 
Back
Top