Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FATFileSystem
Fork of EALib by
Revision 11:2d4d65173195, committed 2014-01-29
- Comitter:
- embeddedartists
- Date:
- Wed Jan 29 11:23:01 2014 +0000
- Parent:
- 10:f2409dc07e49
- Child:
- 12:15597e45eea0
- Commit message:
- Updated sdram.cpp to use the hook added in mbed_lib_rev76 to allow some memory to be reserved for the stack.
Changed in this revision
| sdram.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/sdram.cpp Fri Jan 10 08:24:42 2014 +0000
+++ b/sdram.cpp Wed Jan 29 11:23:01 2014 +0000
@@ -25,6 +25,9 @@
#include "mbed.h"
#include "sdram.h"
+#if defined(TOOLCHAIN_ARM) /* KEIL uVision and mbed online compiler */
+#include "sys_helper.h"
+#endif
/******************************************************************************
* Defines and typedefs
@@ -68,6 +71,15 @@
}
return 0;
}
+
+ // Overrides the WEAK function in sys_helper.cpp to allow reserving a specific
+ // amount of memory for the stack. Without this function it is possible to allocate
+ // so much of the internal RAM that there is no free memory for the stack which
+ // in turn causes the program to crash.
+ uint32_t __reserved_stack_size() {
+ return 0x3000; // Reserve 0x3000 bytes of the IRAM for the stack
+ }
+
#elif defined(TOOLCHAIN_GCC_CR) /* CodeRed's RedSuite or LPCXpresso IDE */
// NOTE: This way of overriding the implementation of malloc in NEWLIB
