Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cusomizing Stacksize and Heapsize #19

Open
JoeMerten opened this issue Aug 29, 2014 · 2 comments
Open

Cusomizing Stacksize and Heapsize #19

JoeMerten opened this issue Aug 29, 2014 · 2 comments

Comments

@JoeMerten
Copy link
Contributor

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?

@hlnd
Copy link
Owner

hlnd commented Aug 31, 2014

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!

@JoeMerten
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants