A library with drivers for different peripherals on the LPC4088 QuickStart Board or related add-on boards.

Dependencies:   FATFileSystem

Dependents:   LPC4088test LPC4088test_ledonly LPC4088test_deleteall LPC4088_RAMtest ... more

Files at this revision

API Documentation at this revision

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