SparkFun Forums 

Where electronics enthusiasts find answers.

Hardware or product specific questions are best asked here.
By paulvha
#244093
On library V1.x.x : The stack size is fixed in the startup_gcc.c at 80K (20K * 4 bytes (32 bitwords)). It starts at address 0x0.

In V2.x it is more complex. In the file, AMA3B1KK.ld defines that the STACK is counting down. The stack size pointer starts at the top 384k - 8k and grows downwards. This is the TOTAL stack size. Now there are many different stack sizes in MBED e.g. for each thread that is running 4K. Look in mbed_config.h (in the variants/"variant"/mbed folder) Be aware however that the "heap-space" starts above the program memory .bss space. If you do a malloc() the heap will grow upwards. Potentially heap-growing-up and stack-growing-down could collide causing a hard failure. To change stack sizes in MBED, there are many articles on the web.
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum