"This routine is inlined" : Where is this done?

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

"This routine is inlined" : Where is this done?

577 Views
asfarley
Contributor IV

I see a note in PE-generated code for a UART interrupt handler (InterruptTX). A comment indicates "This routine is inlined" but I can't see how this is done. What makes the function InterruptTX inlined?

I'm asking because I would like to temporarily disable inlining so I can set a breakpoint. 

0 Kudos
6 Replies

410 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Alexander,

Please tell me which version of IDE, and which chip, you'd better

share the code you mentioned , thanks.

BR

Alice

0 Kudos

410 Views
asfarley
Contributor IV

This is using:

KDS 3.2.0

MCU: K22F

Here are the exact lines of code I was referring to, which are contained in the function ASerialLdd_Interrupt():

if (StatReg & UART_S1_TDRE_MASK) { /* Is the transmitter empty? */
InterruptTx(DeviceDataPrv); /* If yes, then invoke the internal service routine. This routine is inlined. */
}

0 Kudos

410 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Alexander,

- The function of " InterruptTx(DeviceDataPrv)" is in the file "AS1.c":

pastedImage_1.png

- You can find the "DeviceDataPrv" refer to the below path:

pastedImage_2.png

INT_LPUART0__DEFAULT_RTOS_ISRPARAM is a global variable , it is initialize in the function of "AS1_Init()" :

pastedImage_3.png

Hope it helps


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

410 Views
asfarley
Contributor IV

Thanks Alice. I think I might have been unclear with my question: I do understand where the InterruptTX code is located in my project. My question is specifically regarding inlining.

My understanding is that inlining should require a special annotation for the compiler to pick up, but I can't see anything to indicate inlining for InterruptTX other than the comment. 

Based on my experience debugging the code, it does seem that InterruptTX actually is inlined. So it seems a bit magical, like something is causing this one function to be inlined without any compiler directive. See what I mean?

0 Kudos

410 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Alexander,

PE team expert said :

"

The note "This routine is inlined" means that the routine is defined as inline (it is inlined by the compiler). But it may not be a valid comment for all compilers and settings. The functional can be inlined in some use cases and configurations only (for better performance of the code).

"

Hope it helps


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

410 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Alexander,

I think there maybe some other meaning about the "inlined" annotation .

While I will ask the PE team to confirm it .

Thanks for your sharing .

BR

Alice

0 Kudos