Nanostack Border Router is a generic mbed border router implementation that provides the 6LoWPAN ND or Thread border router initialization logic.
source/nanostack_heap_region.c@108:0c14bd1d3334, 2019-11-27 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Nov 27 10:02:22 2019 +0000
- Revision:
- 108:0c14bd1d3334
- Parent:
- 105:d9f83743ed4f
Fix conflicting declarations of main() (#197)
Update the main() to be compatible with the declaration from
platform/mbed_toolchain.h that adds the MBED_USED attribute.
Without the attribute the main() symbol is not emitted with the
GCC toolchain using "-Wl,--wrap,main" and "-flto" flags.
.
Commit copied from https://github.com/ARMmbed/nanostack-border-router
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 105:d9f83743ed4f | 1 | /* |
mbed_official | 105:d9f83743ed4f | 2 | * Copyright (c) 2019 ARM Limited. All rights reserved. |
mbed_official | 105:d9f83743ed4f | 3 | */ |
mbed_official | 105:d9f83743ed4f | 4 | |
mbed_official | 105:d9f83743ed4f | 5 | #include "nsdynmemLIB.h" |
mbed_official | 105:d9f83743ed4f | 6 | |
mbed_official | 105:d9f83743ed4f | 7 | /* Enable nanostack extended heap only for specific targets and toolchains */ |
mbed_official | 105:d9f83743ed4f | 8 | #if (MBED_CONF_APP_NANOSTACK_EXTENDED_HEAP == true) |
mbed_official | 105:d9f83743ed4f | 9 | |
mbed_official | 105:d9f83743ed4f | 10 | #if defined(TARGET_K64F) |
mbed_official | 105:d9f83743ed4f | 11 | #define NANOSTACK_EXTENDED_HEAP_REGION_SIZE (60*1024) |
mbed_official | 105:d9f83743ed4f | 12 | #endif |
mbed_official | 105:d9f83743ed4f | 13 | |
mbed_official | 105:d9f83743ed4f | 14 | #if defined(TARGET_NUCLEO_F429ZI) |
mbed_official | 105:d9f83743ed4f | 15 | #define NANOSTACK_EXTENDED_HEAP_REGION_SIZE (60*1024) |
mbed_official | 105:d9f83743ed4f | 16 | #endif |
mbed_official | 105:d9f83743ed4f | 17 | |
mbed_official | 105:d9f83743ed4f | 18 | #if defined(TARGET_DISCO_F769NI) |
mbed_official | 105:d9f83743ed4f | 19 | #define NANOSTACK_EXTENDED_HEAP_REGION_SIZE (250*1024) |
mbed_official | 105:d9f83743ed4f | 20 | #endif |
mbed_official | 105:d9f83743ed4f | 21 | |
mbed_official | 105:d9f83743ed4f | 22 | #if defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ASM__) || defined(__ICCARM__) |
mbed_official | 105:d9f83743ed4f | 23 | // currently - no IAR suport |
mbed_official | 105:d9f83743ed4f | 24 | #undef NANOSTACK_EXTENDED_HEAP_REGION_SIZE |
mbed_official | 105:d9f83743ed4f | 25 | #endif |
mbed_official | 105:d9f83743ed4f | 26 | |
mbed_official | 105:d9f83743ed4f | 27 | #endif // MBED_CONF_APP_NANOSTACK_EXTENDED_HEAP |
mbed_official | 105:d9f83743ed4f | 28 | |
mbed_official | 105:d9f83743ed4f | 29 | |
mbed_official | 105:d9f83743ed4f | 30 | #ifdef NANOSTACK_EXTENDED_HEAP_REGION_SIZE |
mbed_official | 105:d9f83743ed4f | 31 | |
mbed_official | 105:d9f83743ed4f | 32 | // Heap region for GCC_ARM, ARMCC and ARMCLANG |
mbed_official | 105:d9f83743ed4f | 33 | static uint8_t nanostack_extended_heap_region[NANOSTACK_EXTENDED_HEAP_REGION_SIZE]; |
mbed_official | 105:d9f83743ed4f | 34 | |
mbed_official | 105:d9f83743ed4f | 35 | void nanostack_heap_region_add(void) |
mbed_official | 105:d9f83743ed4f | 36 | { |
mbed_official | 105:d9f83743ed4f | 37 | ns_dyn_mem_region_add(nanostack_extended_heap_region, NANOSTACK_EXTENDED_HEAP_REGION_SIZE); |
mbed_official | 105:d9f83743ed4f | 38 | } |
mbed_official | 105:d9f83743ed4f | 39 | |
mbed_official | 105:d9f83743ed4f | 40 | #else // NANOSTACK_EXTENDED_HEAP_REGION_SIZE |
mbed_official | 105:d9f83743ed4f | 41 | |
mbed_official | 105:d9f83743ed4f | 42 | void nanostack_heap_region_add(void) |
mbed_official | 105:d9f83743ed4f | 43 | { |
mbed_official | 105:d9f83743ed4f | 44 | } |
mbed_official | 105:d9f83743ed4f | 45 | |
mbed_official | 105:d9f83743ed4f | 46 | #endif // NANOSTACK_EXTENDED_HEAP_REGION_SIZE |