Reducing number of pad / pack bytes required?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using IAR and ATMega 128.

I've been debugging my code and I founf I kept gettign stack warnign messages. I thought "that's strange - I should be nowehere near using the full CStack". I lookd at the stack and one of the structures that I'm storing is full of
bytes. So instead of taking up a small amount of space on the Stack this structure is eating up almost all of the stack?

Is there any way of reducing the number of pad bytes required?

Ben
-Using IAR (& ocasionally CodeVision)
0.7734
1101111011000000110111101101

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Doesn't IAR have an option for "structure packing" under the "other" section of optimisation settings?

But how about increasing the CStack size as an alternative?

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also, dont pass structures by value, pass a pointer instead...