nrf51-pure-gcc-setup icon indicating copy to clipboard operation
nrf51-pure-gcc-setup copied to clipboard

Cusomizing Stacksize and Heapsize

Open JoeMerten opened this issue 10 years ago • 2 comments

As also described here, there might currently no appropriate way to project specific customize stacksize and heapsize.

Ok, I cound just copy the startup_nrf51.s to each project and edit the values there; but I don't like to do it in this way.

I'd rather want to have the possibility to specify that values as a optional variable (for each stack and heap) in my project's makefile.

I see 2 approaches to solve that:

  • Within startup_nrf51.s changing #ifdef etc. to .ifdef and provide something like a AFLAGS makefile variable. Or one step more comfortable, provinding STACK_SIZE and HEAP_SIZE as makefile variables and apply the required --defsym __STACK_SIZE=… when arm-none-eabi-as is called for startup_nrf51.s.
  • Or providing a way to compile the file with arm-none-eabi-gcc -x assembler-with-cpp.

I tend to favor the 1st approach (#ifdef etc. to .ifdef).

What did you think about that?

JoeMerten avatar Aug 29 '14 21:08 JoeMerten

I agree that this would be very nice, and have previously been thinking about how this could be done. I've wanted something that gives STACK_SIZE as makefile variables, but hadn't quite spent the time to find out how to do it. Your --defsym method sounds like it would be the way to go, but I haven't gotten around to it yet... If you already have done this, I'd be very happy to accept a pull request!

Edit: I just had to get back here, since I just found the devzone-post that I had opened in a background tab, and that was really excellent work! I'll try to see if I can get this working some day (hopefully) soon!

hlnd avatar Aug 31 '14 20:08 hlnd

Hey Ole Morten,I will
    see that I
    can take some time to me in the next days to make that changes.
But currently, I stuck a bit. My nrf51-pure-gcc-setup
  fork is out of sync because of the open
  pull request #7.Unfortunately,
    I have far too little experience with
git / github for to know how to handle this correctly.
Maybe, I'll create a 2nd github account to fork nrf51-pure-gcc-setup
again …
Cheers,
    JoeAm 31.08.2014 um 22:20 schrieb hlnd:

  I agree that this would be very nice, and have previously been
    thinking about how this could be done. I've wanted something
    that gives STACK_SIZE as makefile variables, but hadn't quite
    spent the time to find out how to do it. Your --defsym
    method sounds like it would be the way to go, but I haven't
    gotten around to it yet... If you already have done this, I'd be
    very happy to accept a pull request! 
  —
    Reply to this email directly or view
      it on GitHub.

JoeMerten avatar Sep 01 '14 10:09 JoeMerten