Modus Toolbox Build Warning:ignoring #pragma arm section [-Wunknown-pragmas]

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JCD
Level 3
Level 3
50 sign-ins 25 sign-ins 10 replies posted

Hello to all,

I have build a project but there are some warnings .

I want to revise the following warnings:

1,ignoring #pragma arm section [-Wunknown-pragmas]:

JCD_0-1636090634330.png

JCD_1-1636090674898.png

How to use  "__attribute__((section("name")))" instead of "#pragma arm section" ?

2,always_inline function might not be inlinable [-Wattributes]:

JCD_2-1636092684545.png

How to solve this warning?

 

Can you please help me to get rid of the warnings?

JCD_4-1636093319331.png

 

Best Wishes,

JCD

0 Likes
1 Solution

Hi LinglingG_46,

Thanks for your suggestions, but  the content of the second question is a bit uncomprehending.Whether the deletion mentioned is "__asm volatile( "mrs %0, ipsr" : "=r"( ulCurrentInterrupt ) :: "memory" );"

The first question has been solved.

For the second question, I tried to delete the"__attribute__((always_inline))", and the warning does not appear after deleteing.

Best wishes,

JCD

View solution in original post

0 Likes
3 Replies
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

Please refer:

The first question please refer to the linker: 1: https://www.keil.com/support/man/docs/armcc/armcc_chr1359124985290.htm

The second question:

2: If you delete the __asm sentence, what happened?

Could you please add your test code here?

 

0 Likes

Hi LinglingG_46,

Thanks for your suggestions, but  the content of the second question is a bit uncomprehending.Whether the deletion mentioned is "__asm volatile( "mrs %0, ipsr" : "=r"( ulCurrentInterrupt ) :: "memory" );"

The first question has been solved.

For the second question, I tried to delete the"__attribute__((always_inline))", and the warning does not appear after deleteing.

Best wishes,

JCD

0 Likes
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

Please make sure that the IDE can support the "__attribute__((always_inline))".

0 Likes