Jump to content

Recommended Posts

I have an application framework and drivers residing in multiple .c files. In order to switch between the actual application and a test-application (that test the framework) I made a construction like this:

 

//#include "appl_test.c"

#include "appl.c"

 

void main(void)

{

// generic init code

application()

}

 

 

the files appl_test.c and appl.c each have an implementation for the application() function

This works.

 

application() never returns and in order to save a place on the call-stack I tried making the function inline. In this case the ram is overfilled. Why does this happen?

 

Thanks,

Frederic

Link to post
Share on other sites

I've been having all kinds of weird things happening with inline functions, for the moment, I'm shying away from them because of lost hours searching for problems in my code that didn't exist in my code.

 

Jacob

 

 

I have an application framework and drivers residing in multiple .c files. In order to switch between the actual application and a test-application (that test the framework) I made a construction like this:

 

//#include "appl_test.c"

#include "appl.c"

 

void main(void)

{

// generic init code

application()

}

 

 

the files appl_test.c and appl.c each have an implementation for the application() function

This works.

 

application() never returns and in order to save a place on the call-stack I tried making the function inline. In this case the ram is overfilled. Why does this happen?

 

Thanks,

Frederic

Link to post
Share on other sites

FredericG,

I have an application framework and drivers residing in multiple .c files. In order to switch between the actual application and a test-application (that test the framework) I made a construction like this:

 

//#include "appl_test.c"

#include "appl.c"

 

void main(void)

{

// generic init code

application()

}

 

 

the files appl_test.c and appl.c each have an implementation for the application() function

This works.

 

application() never returns and in order to save a place on the call-stack I tried making the function inline. In this case the ram is overfilled. Why does this happen?

This is not what I would expect, if you can supply a complete project example of this problem we can take a look. Please send to support.

 

Regards

Dave

Link to post
Share on other sites
  • 2 weeks later...
  • 2 weeks later...
I have sent you the project some time ago, did you get it?
This issue is resolved is BoostC V6.84. It was caused by variables in inline functions not having the correct scope.

 

Regards

Dave

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...