I wish mikroC support specificity of inline function!

Post your requests and ideas on the future development of mikroC PRO for dsPIC30/33 and PIC24.
Author
Message
freewheel
Posts: 17
Joined: 01 Oct 2008 10:36

I wish mikroC support specificity of inline function!

#1 Post by freewheel » 24 Feb 2010 08:55

Dear MikroE's Deverlopers!

I think that I think you have one of the best IDE for PIC/dsPIC processors! But I wish your compiler support specificity of inline function, for example:

Code: Select all

inline void func(int x) {
      //Do something
}

void main()
{
      //Initializations is placed here

      func(x);
      //Do the next tasks
}
Ability of inline function was supported by C30 of Microchip and it's so good if mikroC also have it too!

Thanks in advance!

User avatar
anikolic
mikroElektronika team
Posts: 1775
Joined: 17 Aug 2009 16:51
Location: Belgrade
Contact:

Re: I wish mikroC support specificity of inline function!

#2 Post by anikolic » 07 Apr 2010 13:09

Hello,
This will be introduced at certain point in all of our compilers. We are considering this option a while, but it was not in our top priorities, and this is why it is still unimplemented. However, we are very ready and willing to introduce it as soon as possible.

Best regards,
Aleksandar
Web Department Manager

Bernie_nor
Posts: 2
Joined: 22 Nov 2011 09:23

Re: I wish mikroC support specificity of inline function!

#3 Post by Bernie_nor » 07 Dec 2011 14:21

anikolic wrote:Hello,
This will be introduced at certain point in all of our compilers. We are considering this option a while, but it was not in our top priorities, and this is why it is still unimplemented. However, we are very ready and willing to introduce it as soon as possible.

Best regards,
Aleksandar

Has this been implemented yet?

My code does not compile if I use the inline statement. And the help/manual gives me no hint on how to use it "correctly".

I have a few small functions I like to have inline. I'm using them in my inerrupt routines and do not want to make a function call. Since the funtions are accessing local variables in other modules I can't set them in main. Well not unless I'd like to violate the structured design I'm used to.


I'm using MikroC PRO for PIC V5.01.


Best Regards
Bernt Hustad Hembre

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: I wish mikroC support specificity of inline function!

#4 Post by filip » 08 Dec 2011 09:32

Hi,

Unfortunately, this hasn't been implemented yet, but it is present on our wish list.
Thank you for the understanding.

Regards.
Filip.

Bernie_nor
Posts: 2
Joined: 22 Nov 2011 09:23

Re: I wish mikroC support specificity of inline function!

#5 Post by Bernie_nor » 08 Dec 2011 09:56

filip wrote: Unfortunately, this hasn't been implemented yet, but it is present on our wish list.
What's the time frame? Next release, within half a year, a year or mayby sometime in the far future?
Wish list or Todo list?

This is a very usefull feature that has bee implemented in all other embedded C and C++ compilers I've used the last 10-12 years.

Typical you have a timer module (with it's own local variables). And on every interrupt you want something special to happen. I.e. to set a status or a flag. The status is local to the module. But because the PIC has only one (or sometimes two) interrupt service routines you have to put the service routine in one common source file.

The way I do it is by making a small ISR function and declare it as inline. This way the access to the local varables is still only within the module, whereas the function is put directly into the main ISR without the additional function call (and the time it takes to process the call).

For people who don't understand why I'd like to keep varables private: You might want to consider reading up on the subject. And you will be supprised to see how the bug-rate drops when structuring your code onto modules. This applies to hobby projects as well.

Best Regards
Bernt

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: I wish mikroC support specificity of inline function!

#6 Post by filip » 09 Dec 2011 09:12

Hi,

We should do a major revision of our compilers next year, which will include the wish list reports.

Regards,
Filip.

Sy
Posts: 708
Joined: 10 Dec 2009 13:41
Location: UK

Re: I wish mikroC support specificity of inline function!

#7 Post by Sy » 08 Apr 2012 10:05

Sorry to dig-up this old post, but I was wondering if the inline keyword is now supported as it appears in the help, however when I attempted to use it, I get errors.
Kind Regards,
Sy

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: I wish mikroC support specificity of inline function!

#8 Post by zristic » 08 Apr 2012 18:38

It's still on the wish list, waiting to be implemented.

Sy
Posts: 708
Joined: 10 Dec 2009 13:41
Location: UK

Re: I wish mikroC support specificity of inline function!

#9 Post by Sy » 08 Apr 2012 21:15

Any update on when it will be included?
Kind Regards,
Sy

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: I wish mikroC support specificity of inline function!

#10 Post by zristic » 09 Apr 2012 22:33

There are lot of libraries waiting for the free time slot.
The inlining has a workaround and as such it always has the lowest priority.

Arnulf
Posts: 2
Joined: 16 Jul 2013 16:49

Re: I wish mikroC support specificity of inline function!

#11 Post by Arnulf » 28 Sep 2014 16:47

Any ETA on this ? It's 2014 now and it would be wonderful to be able to inline function calls manually because optimizer is doing less than stellar job in many cases (call and return take more cycles and program words than inlining of that same small function would, nevermind the context saving overhead).

What is the workaround you mentioned and does it work for other languages (Pascal) too ?

RobinD
Posts: 10
Joined: 17 Sep 2014 07:56

Re: I wish mikroC support specificity of inline function!

#12 Post by RobinD » 29 Sep 2014 05:47

Hi,

over 2 years (4 years from the first post here) went past now.
Do you have any news on the 'inline' feature in mikroc?

With this post I want to emphasize the importance of this feature for me and other users of your product!


Best regards,
Robin

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: I wish mikroC support specificity of inline function!

#13 Post by filip » 29 Sep 2014 12:33

Hi,

We are aware that this is an important feature, but unfortunately I am unable to tell you when this option is going to be implemented.
The priorities have been changed during the past years and the inline directive is still on the wish list.

Thank you for the understanding.

Regards,
Filip.

HiEveryone
Posts: 43
Joined: 30 Nov 2012 22:01

Re: I wish mikroC support specificity of inline function!

#14 Post by HiEveryone » 04 Oct 2015 14:18

Any news about inline in 2015? (2016 in 3 months)

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: I wish mikroC support specificity of inline function!

#15 Post by filip » 06 Oct 2015 09:18

Hi,

Unfortunately, not at this moment.

Regards,
Filip.

Post Reply

Return to “mikroC PRO for dsPIC30/33 and PIC24 Wish List”