Skip to content

Commit 9745eff

Browse files
committed
Merge commit 'ce830296d0297a8da543c24134bf859710fd7698' into epr_integration
Merge the EPR tag and the nordic branch together.
2 parents eaa9d3b + ce83029 commit 9745eff

File tree

687 files changed

+266208
-109624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

687 files changed

+266208
-109624
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
python:
22
- "2.7"
33

4-
script: "python tools/build_travis.py"
4+
script:
5+
- PYTHONPATH=. python tools/test/config_test/config_test.py
6+
- python tools/build_travis.py
57
before_install:
68
- sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded
79
- sudo apt-get update -qq

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ STMicroelectronics:
6767
* [Nucleo-F302R8](https://developer.mbed.org/platforms/ST-Nucleo-F302R8/) (Cortex-M4F)
6868
* [Nucleo-F334R8](https://developer.mbed.org/platforms/ST-Nucleo-F334R8/) (Cortex-M4F)
6969
* [Nucleo-F401RE](https://developer.mbed.org/platforms/ST-Nucleo-F401RE/) (Cortex-M4F)
70-
* Nucleo-F410RB (Cortex-M4F)
70+
* [Nucleo-F410RB](https://developper.mbed.org/platforms/ST-Nucleo-F410RB/) (Cortex-M4F)
7171
* [Nucleo-F411RE](https://developer.mbed.org/platforms/ST-Nucleo-F411RE/) (Cortex-M4F)
7272
* [Nucleo-L476RG](https://developer.mbed.org/platforms/ST-Nucleo-L476RG/) (Cortex-M4F)
7373
* STM32F4XX (Cortex-M4F)

docs/config_system.md

Lines changed: 270 additions & 0 deletions
Large diffs are not rendered by default.

docs/memap.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# memap - Static Memory Map Analysis
2+
3+
## Introduction
4+
5+
*memap* is a simple utility that displays static memory information required by [mbed](https://github.com/mbedmicro/mbed) applications. This information is produced by analysing the memory map file previously generated by your toolchain.
6+
7+
**Note**: this tool shows static RAM usage and the total size of allocated heap and stack space defined at compile time, not the actual heap and stack usage (which may be different depending on your application).
8+
9+
## Table of contents
10+
11+
1. [Using memap](#using-memap)
12+
1. [Information on memory sections](#info-mem-sections)
13+
1. [Current support](#current-support)
14+
1. [Known problems](#known-problems)
15+
16+
## Using memap
17+
18+
*memap* is automatically invoked after an mbed build finishes successfully. It's also possible to manually run the program with different command line options, for example:
19+
20+
```
21+
$> python memap.py
22+
usage: memap.py [-h] -t TOOLCHAIN [-o OUTPUT] [-e EXPORT] [-v] file
23+
24+
Memory Map File Analyser for ARM mbed version 0.3.11
25+
26+
positional arguments:
27+
file memory map file
28+
29+
optional arguments:
30+
-h, --help show this help message and exit
31+
-t TOOLCHAIN, --toolchain TOOLCHAIN
32+
select a toolchain used to build the memory map file
33+
(ARM, GCC_ARM, IAR)
34+
-o OUTPUT, --output OUTPUT
35+
output file name
36+
-e EXPORT, --export EXPORT
37+
export format (examples: 'json', 'csv-ci', 'table':
38+
default)
39+
-v, --version show program's version number and exit
40+
```
41+
42+
Result example:
43+
44+
```
45+
$> python memap.py GCC_ARM\myprog3.map -t GCC_ARM
46+
47+
+----------------------------+-------+-------+------+
48+
| Module | .text | .data | .bss |
49+
+----------------------------+-------+-------+------+
50+
| Fill | 170 | 0 | 2294 |
51+
| Misc | 36282 | 2220 | 2152 |
52+
| core/hal | 15396 | 16 | 568 |
53+
| core/rtos | 6751 | 24 | 2662 |
54+
| features/FEATURE_IPV4 | 96 | 0 | 48 |
55+
| frameworks/greentea-client | 912 | 28 | 44 |
56+
| frameworks/utest | 3079 | 0 | 732 |
57+
| Subtotals | 62686 | 2288 | 8500 |
58+
+----------------------------+-------+-------+------+
59+
Allocated Heap: 65540 bytes
60+
Allocated Stack: 32768 bytes
61+
Total Static RAM memory (data + bss): 10788 bytes
62+
Total RAM memory (data + bss + heap + stack): 109096 bytes
63+
Total Flash memory (text + data + misc): 66014 bytes
64+
65+
```
66+
67+
## Information on memory sections
68+
69+
The table above showed multiple memory sections.
70+
71+
- ``.text``: is where the code application and constants are located in Flash.
72+
- ``.data``: non-zero initialized variables; allocated in both RAM and Flash memory (variables are copied from Flash to RAM at run time)
73+
- ``.bss``: uninitialized data allocated in RAM, or variables initialized to zero.
74+
- ``Heap``: dynamic allocations in the Heap area in RAM (for example, used by ``malloc``). The maximum size value may be defined at build time.
75+
- ``Stack``: dynamic allocations in the Stack area in RAM (for example, used to store local data, temporary data when branching to a subroutine or context switch information). The maximum size value may be defined at build time.
76+
77+
There are other entries that require a bit of clarification:
78+
79+
- Fill: represents the bytes in multiple sections (RAM and Flash) that the toolchain has filled with zeros because it requires subsequent data or code to be aligned appropriately in memory.
80+
- Misc: usually represents helper libraries introduced by the toolchain (like ``libc``), but can also represent modules that are not part of mbed.
81+
82+
## Current support
83+
84+
*memap* has been tested on Windows 7, Linux and Mac OS X and works with memory map files are generated by the GCC_ARM, ARM (ARM Compiler 5) and IAR toochains.
85+
86+
## Known issues and new features
87+
88+
This utility is considered 'alpha' quality at the moment. The information generated by this utility may not be fully accurate and may vary from one toolchain to another.
89+
90+
If you are experiencing problems, or would like additional features, please raise a ticket on [GitHub](https://github.com/mbedmicro/mbed/issues) and use ```[memap] ``` in the title.

features/FEATURE_UVISOR/AUTHORS.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
519 Milosch Meriac
2-
420 Alessandro Angelino
3-
16 Niklas Hauser
4-
15 Jaeden Amero
1+
512 Milosch Meriac
2+
434 Alessandro Angelino
3+
28 Niklas Hauser
4+
22 Jaeden Amero
55
3 Hugo Vincent
66
3 JaredCJR
77
3 Jim Huang
88
2 tonyyanxuan
9-
1 Aksel Skauge Mellbye
10-
1 Irit Arkin
119
1 Nathan Chong
10+
1 Irit Arkin
1211
1 ccli8
12+
1 Aksel Skauge Mellbye

features/FEATURE_UVISOR/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.9.14-alpha
1+
v0.9.21-alpha

features/FEATURE_UVISOR/importer/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ TARGET_LIB_INC:=$(TARGET_PREFIX)includes/uvisor-lib
3333

3434
# uVisor source directory - hidden from mbed via TARGET_IGNORE
3535
UVISOR_GIT_URL:=https://github.com/ARMmbed/uvisor
36-
UVISOR_GIT_BRANCH:=dev
36+
UVISOR_GIT_BRANCH:=unstable
3737
UVISOR_DIR:=TARGET_IGNORE/uvisor
3838
UVISOR_API:=$(UVISOR_DIR)/api
3939
UVISOR_GIT_CFG=$(UVISOR_DIR)/.git/config
@@ -72,6 +72,7 @@ rsync:
7272
rm -rf $(TARGET_LIB_SRC)
7373
mkdir -p $(TARGET_LIB_SRC)
7474
cp $(UVISOR_DIR)/core/system/src/page_allocator.c $(TARGET_LIB_SRC)/page_allocator.c_inc
75+
cp $(UVISOR_DIR)/core/system/inc/page_allocator_config.h $(TARGET_LIB_SRC)/page_allocator_config.h
7576
rsync -a --delete $(UVISOR_API)/rtx/src/ $(TARGET_LIB_SRC)/rtx
7677
#
7778
# Copying licenses

features/FEATURE_UVISOR/includes/uvisor/api/inc/box_config.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ UVISOR_EXTERN const uint32_t __uvisor_mode;
4545
sizeof(RtxBoxIndex), \
4646
0, \
4747
0, \
48+
0, \
4849
NULL, \
4950
acl_list, \
5051
acl_list_count \
@@ -76,6 +77,7 @@ UVISOR_EXTERN const uint32_t __uvisor_mode;
7677
sizeof(RtxBoxIndex), \
7778
context_size, \
7879
__uvisor_box_heapsize, \
80+
__uvisor_box_lib_config, \
7981
__uvisor_box_namespace, \
8082
acl_list, \
8183
acl_list_count \
@@ -116,6 +118,13 @@ UVISOR_EXTERN const uint32_t __uvisor_mode;
116118
#define UVISOR_BOX_NAMESPACE(box_namespace) \
117119
static const char *const __uvisor_box_namespace = box_namespace
118120

121+
/* Use this macro before UVISOR_BOX_CONFIG to define the function the main
122+
* thread of your box will use for its body. If you don't want a main thread,
123+
* too bad: you have to have one. */
124+
#define UVISOR_BOX_MAIN(function, priority, stack_size) \
125+
static osThreadDef(function, priority, stack_size); \
126+
static const void * const __uvisor_box_lib_config = osThread(function);
127+
119128
#define UVISOR_BOX_HEAPSIZE(heap_size) \
120129
static const uint32_t __uvisor_box_heapsize = heap_size;
121130

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (c) 2016, ARM Limited, All Rights Reserved
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
6+
* not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
#ifndef __UVISOR_API_NVIC_VIRTUAL_H__
18+
#define __UVISOR_API_NVIC_VIRTUAL_H__
19+
20+
#include "api/inc/interrupts.h"
21+
22+
#define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping
23+
#define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping
24+
#define NVIC_EnableIRQ vIRQ_EnableIRQ
25+
#define NVIC_DisableIRQ vIRQ_DisableIRQ
26+
#define NVIC_GetPendingIRQ vIRQ_GetPendingIRQ
27+
#define NVIC_SetPendingIRQ vIRQ_SetPendingIRQ
28+
#define NVIC_ClearPendingIRQ vIRQ_ClearPendingIRQ
29+
#define NVIC_GetActive __NVIC_GetActive
30+
#define NVIC_SetPriority vIRQ_SetPriority
31+
#define NVIC_GetPriority vIRQ_GetPriority
32+
33+
#endif /* __UVISOR_API_NVIC_VIRTUAL_H__ */
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2016, ARM Limited, All Rights Reserved
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
6+
* not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
#ifndef __UVISOR_API_VECTAB_VIRTUAL_H__
18+
#define __UVISOR_API_VECTAB_VIRTUAL_H__
19+
20+
#include "api/inc/interrupts.h"
21+
22+
#define NVIC_SetVector vIRQ_SetVector
23+
#define NVIC_GetVector vIRQ_GetVector
24+
25+
#endif /* __UVISOR_API_VECTAB_VIRTUAL_H__ */

0 commit comments

Comments
 (0)