Skip to content

Commit 551c3c5

Browse files
tkamanGaborAbonyi
authored andcommitted
Add ARM_MUSCA_B1 as a new target platform
Musca-B1 is a Cortex-M33 based target with security extension enabled. - ARM_MUSCA_B1 is the non-secure target running mbed-os. - ARM_MUSCA_B1_S is the secure target running TF-M. - TF-M sources were imported and patched in previous commits. - TF-M secure bootloader (McuBoot) for MUSCA_B1 is submitted by a pre-built binary. - A post-build hook concatenates The secure and non-secure binaries, signs it and then concatenates the bootloader with the signed binary. Change-Id: I4b36290941b5f0bb7aa7c12dda2f38b5c1e39ae2 Signed-off-by: Tamas Kaman <[email protected]> Signed-off-by: Gabor Abonyi <[email protected]>
1 parent a5b15a7 commit 551c3c5

File tree

97 files changed

+19064
-6
lines changed

Some content is hidden

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

97 files changed

+19064
-6
lines changed

features/storage/kvstore/conf/global/mbed_lib.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
},
4444
"ARM_MUSCA_A1_S": {
4545
"storage_type": "TDB_INTERNAL"
46+
},
47+
"ARM_MUSCA_B1_S": {
48+
"storage_type": "TDB_INTERNAL"
4649
}
4750
}
4851
}

features/storage/kvstore/conf/tdb_internal/mbed_lib.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"internal_size": "0x8000",
2828
"internal_base_address": "0x00420000"
2929
},
30+
"ARM_MUSCA_B1_S": {
31+
"internal_size": "0x8000",
32+
"internal_base_address": "0x10000000"
33+
},
3034
"FVP_MPS2": {
3135
"internal_size": "0x200000",
3236
"internal_base_address": "0x00200000"

platform/mbed_lib.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@
159159
"ARM_MUSCA_A1_S": {
160160
"stdio-baud-rate": 115200
161161
},
162+
"ARM_MUSCA_B1_NS": {
163+
"stdio-baud-rate": 115200
164+
},
165+
"ARM_MUSCA_B1_S": {
166+
"stdio-baud-rate": 115200
167+
},
162168
"EFM32": {
163169
"stdio-baud-rate": 115200
164170
},

targets/TARGET_ARM_SSG/TARGET_MUSCA_A1/LICENSE-BSD-3-Clause

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2019 Arm Limited and affiliates.
1+
Copyright 2020 Arm Limited and affiliates.
22
SPDX-License-Identifier: BSD-3-Clause
33

44
Redistribution and use in source and binary forms, with or without
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Unless specifically indicated otherwise in a file, MUSCA_B1 files in this directory are licensed under the BSD-3-Clause license,
2+
as can be found in: LICENSE-bsd-3-clause.txt
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright 2019 Arm Limited and affiliates.
2+
SPDX-License-Identifier: BSD-3-Clause
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
1. Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
2. Redistributions in binary form must reproduce the above copyright
10+
notice, this list of conditions and the following disclaimer in the
11+
documentation and/or other materials provided with the distribution.
12+
3. Neither the name of the copyright holder nor the
13+
names of its contributors may be used to endorse or promote products
14+
derived from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"
17+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26+
POSSIBILITY OF SUCH DAMAGE.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2019-2020 Arm Limited
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
#ifndef MBED_PERIPHERALNAMES_H
20+
#define MBED_PERIPHERALNAMES_H
21+
22+
#include "cmsis.h"
23+
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
28+
typedef enum {
29+
UART_0 = 0,
30+
UART_1
31+
} UARTName;
32+
33+
#define STDIO_UART_TX UART1_TX
34+
#define STDIO_UART_RX UART1_RX
35+
#define STDIO_UART UART_1
36+
37+
#define USBTX STDIO_UART_TX
38+
#define USBRX STDIO_UART_RX
39+
40+
#ifdef __cplusplus
41+
}
42+
#endif
43+
44+
#endif
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2020 Arm Limited
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
#ifndef MBED_PINNAMES_H
20+
#define MBED_PINNAMES_H
21+
22+
#include "cmsis.h"
23+
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
28+
typedef enum {
29+
PIN_INPUT,
30+
PIN_OUTPUT
31+
} PinDirection;
32+
33+
typedef enum {
34+
PA0 = 0,
35+
PA1 = 1,
36+
PA2 = 2,
37+
PA3 = 3,
38+
PA4 = 4,
39+
PA5 = 5,
40+
PA6 = 6,
41+
PA7 = 7,
42+
PA8 = 8,
43+
PA9 = 9,
44+
PA10 = 10,
45+
PA11 = 11,
46+
PA12 = 12,
47+
PA13 = 13,
48+
PA14 = 14,
49+
PA15 = 15,
50+
PA16 = 16,
51+
PA17 = 17,
52+
PA18 = 18,
53+
PA19 = 19,
54+
PA20 = 20,
55+
PA21 = 21,
56+
PA22 = 22,
57+
PA23 = 23,
58+
PA24 = 24,
59+
PA25 = 25,
60+
61+
/* Arduino Connector Namings */
62+
D0 = PA0,
63+
D1 = PA1,
64+
D2 = PA2,
65+
D3 = PA3,
66+
D4 = PA4,
67+
D5 = PA5,
68+
D6 = PA6,
69+
D7 = PA7,
70+
D8 = PA8,
71+
D9 = PA9,
72+
D10 = PA10,
73+
D11 = PA11,
74+
D12 = PA12,
75+
D13 = PA13,
76+
D14 = PA14,
77+
D15 = PA15,
78+
79+
/* UART pins */
80+
UART0_RX = PA0, /* Alternate Function - 1 */
81+
UART0_TX = PA1, /* Alternate Function - 1 */
82+
UART1_RX = PA16,
83+
UART1_TX = PA17,
84+
85+
LED1 = PA2,
86+
LED2 = PA3,
87+
LED3 = PA4,
88+
89+
/* Not connected */
90+
NC = (int)0xFFFFFFFF
91+
} PinName;
92+
93+
typedef enum {
94+
PRIMARY_FUNC = 0,
95+
ALTERNATE_FUNC_1 = 1,
96+
ALTERNATE_FUNC_2 = 2,
97+
ALTERNATE_FUNC_3 = 3
98+
} PinFunction;
99+
100+
typedef enum {
101+
PullNone = 0,
102+
PullUp,
103+
PullDown,
104+
PullDefault = PullNone
105+
} PinMode;
106+
107+
#ifdef __cplusplus
108+
}
109+
#endif
110+
111+
#endif
112+
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#! armclang --target=arm-arm-none-eabi -march=armv8-m.main -E -xc
2+
3+
/*
4+
* Copyright (c) 2019-2020 Arm Limited
5+
*
6+
* SPDX-License-Identifier: Apache-2.0
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*/
20+
21+
#include "../../../partition/region_defs.h"
22+
#include "../cmsis_nvic.h"
23+
24+
#if !defined(MBED_ROM_START)
25+
#define MBED_ROM_START NS_CODE_START // 0x0A060400
26+
#endif
27+
28+
#if !defined(MBED_ROM_SIZE)
29+
#define MBED_ROM_SIZE NS_CODE_SIZE // 0x7f800
30+
#endif
31+
32+
#if !defined(MBED_RAM_START)
33+
#define MBED_RAM_START NS_DATA_START // 0x20040000
34+
#endif
35+
36+
#if !defined(MBED_RAM_SIZE)
37+
#define MBED_RAM_SIZE NS_DATA_SIZE // 0x40000
38+
#endif
39+
40+
#define VECTOR_SIZE NVIC_RAM_VECTOR_SIZE
41+
42+
#if !defined(MBED_BOOT_STACK_SIZE)
43+
#define MBED_BOOT_STACK_SIZE 0x400
44+
#endif
45+
46+
#define RAM_FIXED_SIZE (MBED_BOOT_STACK_SIZE+VECTOR_SIZE)
47+
48+
LR_CODE MBED_ROM_START MBED_ROM_SIZE {
49+
ER_CODE MBED_ROM_START MBED_ROM_SIZE {
50+
*.o (VECTOR +First)
51+
.ANY (+RO)
52+
}
53+
54+
RW_IRAM1 (MBED_RAM_START+VECTOR_SIZE) (MBED_RAM_SIZE-VECTOR_SIZE) {
55+
* (+RW) ; RW data that gets copied from Flash to SRAM
56+
* (+ZI) ; ZI data that gets initialised to zero in SRAM
57+
}
58+
59+
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_SIZE-RAM_FIXED_SIZE+MBED_RAM_START-AlignExpr(ImageLimit(RW_IRAM1), 16)) {
60+
}
61+
62+
ARM_LIB_STACK (MBED_RAM_START+MBED_RAM_SIZE) EMPTY -MBED_BOOT_STACK_SIZE { ; stack
63+
}
64+
}

0 commit comments

Comments
 (0)