force inlined functions to lower stack usage?

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

cross mob
Anonymous
Not applicable

Is it possible to force functions to be inlined with the ImageCraft compiler?

   

I'm running out of stack space, and many of my functions are called from one place only.  So they are ideal for inlining.  (But they reside in different files.)

0 Likes
3 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Imagcraft does allow inline ASM, if thats what you are looking for.

   

 

   

The only compiler Cypress uses, with inline function capability, is GCC that I

   

am aware of.

   

 

   

C of course has goto label, I wonder if there is a way of executing a variable

   

return address, so that a f() could be realized. Maybe some of the better programmers

   

on forum can comment on this.

   

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

If you can post your complete project openly we could make some suggestions on reducing stack space. To do so, use Creator's function "Archive Project" and upload the resulting file here.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Bob meant to say PSOC Designers "Archive Project" item in File menu.

   

 

   

If you are using a lot of ints, floats, and doubles, and passing by value rather

   

than reference, pointer, that eats up a lot of stack.

   

 

   

This may help http://www.cypress.com/?rID=45644     AN60486

   

 

   

Regards, Dana.

0 Likes