nrf51-pure-gcc-setup
nrf51-pure-gcc-setup copied to clipboard
Cusomizing Stacksize and Heapsize
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 aAFLAGS
makefile variable. Or one step more comfortable, provindingSTACK_SIZE
andHEAP_SIZE
as makefile variables and apply the required--defsym __STACK_SIZE=…
whenarm-none-eabi-as
is called forstartup_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?
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!
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.