cancel
Showing results for 
Search instead for 
Did you mean: 

declaration is incompatible when intrinsics.h is included

hossein hosseini
Associate II
Posted on October 14, 2017 at 13:06

hi.

i am new in stm32 and i want to programm stm32 with spl library , but i am very

Confused because some of the Headers file include to another header file , and i dont know what is these headers setting .

https://www.google.com/search?client=firefox-b&q=because&spell=1&sa=X&ved=0ahUKEwjdmI7r9O_WAhUEfxoKHWt8A5oQvwUIIygA

i use IAR IDE - if someone has some source to learn First project in IAR with SPL , please guidance me , i am realy Confused.

however, my question is when i compile this code :

0690X000006046rQAA.jpg

i have this error:

Error[Pe147]: declaration is incompatible with ''__nounwind __interwork __softfp unsigned long __STREXH(unsigned short, unsigned short volatile *)'' (declared at line 186 of ''C:\Program Files (x86)\IAR Systems\ D:\hossein-class\2micro programming\ARM\Activity\IAR\blink3\core_cm3.h 1186

but when i clear this line : &sharpinclude <intrinsics.h>  in the core_cm3.h  , i hava not any errors.

I saw declaration  of __STREXH function in core_cm3 and intrinsics.h , the type of them was different.

in core_cm3 was uint32_t and in intrinsics.h was  __ATTRIBUTES unsigned long ;

what do i do ??

Thanks.

#intrinsics
1 REPLY 1
Posted on October 14, 2017 at 16:07

The F1 SPL hasn't been updated in some time (no bugs to speak of), so uses older versions of CMSIS and tools

Check if there is a 'Use CMSIS' option, or some other compatibility settings

https://www.iar.com/support/tech-notes/compiler/cmsis-build-problems-with-iar-embedded-workbench-for-arm-6.20/

 

The may be other IAR centric support venues, or the company itself, review available documentation and application notes.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..