CMSIS and Codewarrior

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CMSIS and Codewarrior

1,469 Views
tobiashofbaur
Contributor I

Hello,

for an ARM Cortex M4 project, i want to use the CPU specific instructions for sqrt using the ARM Toolchain  with the ARM Compiler.

I can sucessfully include CMSIS into the project, however, it seems, that the necessary macros are not generated (e.g. compiler etc.)

Moreover, if I strip everything unnecessary from CMSIS and onyl include the bare VSQRT in the syntax of CMSIS

      __asm("VSQRT.F32 %0,%1" :  "=t"(*pOut) : "t"(in));   (wrapped in a function)

the compiler complains about the constraints.

Do you know what is going wrong, or what I have to change? Unfortunately i cannot find a detailed documentation on the Freescale Arm Compiler or the vsqrt.

Thanks

Tobias

Tags (2)
0 Kudos
Reply
6 Replies

1,155 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Tobias,

Which Cortex M4 MCU are you using?


Thanks in advance!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 Kudos
Reply

1,155 Views
tobiashofbaur
Contributor I

Hi Carlos,

thank you for the reply.

It is a MK70FX512VMJ15

0 Kudos
Reply

1,155 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Tobias,

I think that the following post created by our colleague Erich Styger might be helpful for you, it explains the usage of the ARM CMSIS Libraries with Kinetis in CodeWarrior:

Tutorial: Using the ARM CMSIS Library | MCU on Eclipse 


Hope it helps!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 Kudos
Reply

1,155 Views
tobiashofbaur
Contributor I

Hi Carlos,

I followed that example, and it works as far as it is applicable. However in our project we cannot use the GCC compiler, but have to use the Freescale ARM Compiler ( mwccarm )

It seem, this does not generate the necessary macros for cmsis to work/ does not recognize the cmsis syntax.

Best

Tobias

0 Kudos
Reply

1,155 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Tobias,

 

Which errors are you getting? Could you share an example project so I can replicate this on my side?


Thanks in advance for your response!

 

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 Kudos
Reply

1,155 Views
tobiashofbaur
Contributor I

Hi Carlos,

I attached a minimal "working" example. The project has the same setting as our main project.

As it is, it does not compile. If I comment the asembler line, it does compile.

If I change the compiler to ARM Ltd Windows GCC Compiler, it does compile with the asembler line.

Thank you for your help

Best

Tobias

0 Kudos
Reply