How to describe 'naked' attribute function on IAR?

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

How to describe 'naked' attribute function on IAR?

Jump to solution
3,058 Views
yasuhikokoumoto
Senior Contributor I

Hello IAR EWARM experts,

I posted this issue to the ARM Connected Community but have not been received any responses.

Therefore I would like to post to this site.

I would like to know how to describe a naked attribute function.

The code was compiled successfully with a standalone GCC but IAR GCC could not and display the following error messages.

エラー[Pe079]: expected a type specifier D:\KL25 Sample Code\kl25_sc_rev10\klxx-sc-baremetal\src\projects\svc_demo\svc_demo.c 238

エラー[Pe141]: unnamed prototyped parameters not allowed when body is present D:\KL25 Sample Code\kl25_sc_rev10\klxx-sc-baremetal\src\projects\svc_demo\svc_demo.c 238

エラー[Pe130]: expected a "{" D:\KL25 Sample Code\kl25_sc_rev10\klxx-sc-baremetal\src\projects\svc_demo\svc_demo.c 238

C/C++コンパイラ 実行中のエラー

無題.png


Can anyone help me?

Thank you and best regards,

Yasuhiko Koumoto.

Tags (4)
0 Kudos
1 Solution
1,816 Views
mjbcswitzerland
Specialist V

Yasuhiko

These type of things are not standard and so are compiler specific.

You can use a define instead and declare the define according to the compiler used and then it is automated.

Regards

Mark

Kinetis: http://www.utasker.com/kinetis.html

For the complete "out-of-the-box" Kinetis experience and faster time to market

View solution in original post

0 Kudos
4 Replies
1,816 Views
mjbcswitzerland
Specialist V

Hi Yasuhiko

Try the non-standard extended keyword __stackless

Regards

Mark

Kinetis: http://www.utasker.com/kinetis.html

For the complete "out-of-the-box" Kinetis experience and faster time to market


1,816 Views
yasuhikokoumoto
Senior Contributor I

Hi Mark,

thank you, the compilation was done successfully with __stackless.

However, the __stackless keyword was not accepted by the standalone GCC.

Is it IAR specific keyword?

Best regards,

Yasuhiko  Koumoto.

0 Kudos
1,817 Views
mjbcswitzerland
Specialist V

Yasuhiko

These type of things are not standard and so are compiler specific.

You can use a define instead and declare the define according to the compiler used and then it is automated.

Regards

Mark

Kinetis: http://www.utasker.com/kinetis.html

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos
1,816 Views
yasuhikokoumoto
Senior Contributor I

Hi Mark,

thank you for good advice. I agree with you.

Best regards,

Yasuhiko Koumoto.

0 Kudos