How to describe 'naked' attribute function on IAR?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to describe 'naked' attribute function on IAR?

跳至解决方案
5,029 次查看
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.

标记 (4)
0 项奖励
回复
1 解答
3,787 次查看
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 项奖励
回复
4 回复数
3,787 次查看
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


3,787 次查看
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 项奖励
回复
3,788 次查看
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 项奖励
回复
3,787 次查看
yasuhikokoumoto
Senior Contributor I

Hi Mark,

thank you for good advice. I agree with you.

Best regards,

Yasuhiko Koumoto.

0 项奖励
回复