Skip to content

Commit ff1c769

Browse files
Michael SchwarczOren Cohen
authored andcommitted
Add ARM_MUSCA_A1 as a new target platform
Musca-A1 is a Cortex-M33 based target with security extension enabled. - ARM_MUSCA_A1 is the non-secure target running mbed-os. - ARM_MUSCA_A1_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_A1 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.
1 parent 1dbb478 commit ff1c769

Some content is hidden

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

73 files changed

+16001
-2
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
"LPC55S69_S": {
2727
"internal_size": "0x8000",
2828
"internal_base_address": "0x00028000"
29+
},
30+
"ARM_MUSCA_A1_S": {
31+
"internal_size": "0x8000",
32+
"internal_base_address": "0x00420000"
2933
}
3034
}
3135
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2006-2018 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+
PORTNUM_0 = 0
30+
} PortName;
31+
32+
typedef enum {
33+
UART_0 = 0,
34+
UART_1
35+
} UARTName;
36+
37+
#define STDIO_UART_TX UART1_TX
38+
#define STDIO_UART_RX UART1_RX
39+
#define STDIO_UART UART_1
40+
41+
#define USBTX STDIO_UART_TX
42+
#define USBRX STDIO_UART_RX
43+
44+
#ifdef __cplusplus
45+
}
46+
#endif
47+
48+
#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) 2006-2018 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 = -1u,
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: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#! armclang --target=arm-arm-none-eabi -march=armv8-m.main -E -xc
2+
3+
/*
4+
* Copyright (c) 2018 ARM Limited
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+
#include "../../../partition/region_defs.h"
20+
#include "../cmsis_nvic.h"
21+
22+
#if !defined(MBED_ROM_START)
23+
#define MBED_ROM_START NS_CODE_START // 0x000a0400
24+
#endif
25+
26+
#if !defined(MBED_ROM_SIZE)
27+
#define MBED_ROM_SIZE NS_CODE_SIZE // 0x5f800
28+
#endif
29+
30+
#if !defined(MBED_RAM_START)
31+
#define MBED_RAM_START NVIC_RAM_VECTOR_LIMIT // 0x20010170
32+
#endif
33+
34+
#if !defined(MBED_RAM_SIZE)
35+
#define MBED_RAM_SIZE (NS_DATA_SIZE - NVIC_RAM_VECTOR_SIZE) // 0xfe90
36+
#endif
37+
38+
LR_CODE MBED_ROM_START NS_CODE_SIZE {
39+
ER_CODE MBED_ROM_START NS_CODE_SIZE {
40+
*.o (VECTOR +First)
41+
.ANY (+RO)
42+
}
43+
44+
RW_IRAM1 MBED_RAM_START MBED_RAM_SIZE {
45+
* (+RW) ; RW data that gets copied from Flash to SRAM
46+
* (+ZI) ; ZI data that gets initialised to zero in SRAM
47+
}
48+
49+
HEAP_STACK +0 ALIGN 8 {
50+
startup_cmsdk_musca_ns.o (HEAP, +First)
51+
startup_cmsdk_musca_ns.o (STACK, +Last)
52+
}
53+
}
54+

0 commit comments

Comments
 (0)