1

It doesn't seem to be highlighted like other recognized keyword, but I'm not getting compiler errors.

Is there a way to check the assembly? I'm not in a unix environment so I can't do an objdump, but is there any other way to view the appropriate file?

Thanks!

tarabyte
  • 17,837
  • 15
  • 76
  • 117

1 Answers1

2

I'm going to assume that you are using either the C18 or C30 compiler.

The C18 compiler does not have an inline keyword, so my assumption is that there is a macro somewhere that is doing this for you.

The C30 compiler does have an inline keyword, so functions should be declared like this:

__inline__ void functionname(void) { -----code----- } 

To check the assembly, you can generate a .lst file for your source code. Under Project Options, go to the MPLAB ASM30 tab. Under Listing Options, make sure Enable Listing, Include Source Code, and Include Assembly are checked. Rebuild, and your .lst file will show the disassembly mixed with the C source, and that should show you that your function was properly inlined.

Adam Casey
  • 949
  • 2
  • 8
  • 24