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.
Dependents: HelloWorld_CCA01M1 HelloWorld_CCA02M1 CI-data-logger-server HelloWorld_CCA02M1 ... more
This is a fork of the events subdirectory of https://github.com/ARMmbed/mbed-os.
Note, you must import this library with import name: events!!!
Revision 9781:7af1a1125f00, committed 2017-02-03
- Comitter:
- Jaeden Amero
- Date:
- Fri Feb 03 15:45:24 2017 +0000
- Parent:
- 9778:a21c7b9f3534
- Child:
- 9782:6d175866e5cc
- Commit message:
- uVisor: Standardize available legacy heap and stack
With the RTOS, the STACK_SIZE specified here is unrelated to the stack
size available for the main thread (that runs pre_main). Save memory by
reducing the stack size to a more reasonable amount.
On uVisor, HEAP_SIZE is both a minimum available and maximum available
heap size. The heap can't grow beyond the end of the heap into the
neighboring stack. On all uVisor-supported platforms, guarantee at least
0x6000 bytes of heap space. This increases the portability of uVisor
applications as the memory available for legacy heap allocations is
guaranteed. This helps to avoid out of memory errors on platforms that
were previously guaranteeing less memory.
Changed in this revision
--- a/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/device/TOOLCHAIN_GCC_ARM/MK64FN1M0xxx12.ld Tue Feb 07 10:39:22 2017 -0600 +++ b/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/device/TOOLCHAIN_GCC_ARM/MK64FN1M0xxx12.ld Fri Feb 03 15:45:24 2017 +0000 @@ -53,9 +53,15 @@ __ram_vector_table__ = 1; -/* Heap 1/4 of ram and stack 1/8 */ -__stack_size__ = 0x8000; -__heap_size__ = 0x10000; +/* With the RTOS in use, this does not affect the main stack size. The size of + * the stack where main runs is determined via the RTOS. */ +__stack_size__ = 0x400; + +/* This is the guaranteed minimum available heap size for an application. When + * uVisor is enabled, this is also the maximum available heap size. The + * HEAP_SIZE value is set by uVisor porters to balance the size of the legacy + * heap and the page heap in uVisor applications. */ +__heap_size__ = 0x6000; HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400; STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400;
--- a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/device/TOOLCHAIN_GCC_ARM/STM32F429xI.ld Tue Feb 07 10:39:22 2017 -0600 +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/device/TOOLCHAIN_GCC_ARM/STM32F429xI.ld Fri Feb 03 15:45:24 2017 +0000 @@ -1,8 +1,14 @@ M_VECTOR_RAM_SIZE = 0x400; -/* Heap: 1/4 of RAM. Stack: 1/8 of RAM. */ -STACK_SIZE = 0x6000; -HEAP_SIZE = 0xC000; +/* With the RTOS in use, this does not affect the main stack size. The size of + * the stack where main runs is determined via the RTOS. */ +STACK_SIZE = 0x400; + +/* This is the guaranteed minimum available heap size for an application. When + * uVisor is enabled, this is also the maximum available heap size. The + * HEAP_SIZE value is set by uVisor porters to balance the size of the legacy + * heap and the page heap in uVisor applications. */ +HEAP_SIZE = 0x6000; /* Specify the memory areas */ MEMORY
--- a/targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32GG/device/TARGET_1024K/TOOLCHAIN_GCC_ARM/efm32gg.ld Tue Feb 07 10:39:22 2017 -0600
+++ b/targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32GG/device/TARGET_1024K/TOOLCHAIN_GCC_ARM/efm32gg.ld Fri Feb 03 15:45:24 2017 +0000
@@ -9,8 +9,15 @@
/* Version 4.2.0 */
/* */
+/* With the RTOS in use, this does not affect the main stack size. The size of
+ * the stack where main runs is determined via the RTOS. */
STACK_SIZE = 0x400;
-HEAP_SIZE = 0xC00;
+
+/* This is the guaranteed minimum available heap size for an application. When
+ * uVisor is enabled, this is also the maximum available heap size. The
+ * HEAP_SIZE value is set by uVisor porters to balance the size of the legacy
+ * heap and the page heap in uVisor applications. */
+HEAP_SIZE = 0x6000;
MEMORY
{