Skip to content

Commit b735d73

Browse files
authored
Merge pull request #9221 from kfnta/tfm_musca_a1
Add ARM_MUSCA_A1 target
2 parents b3328fd + 6348753 commit b735d73

File tree

91 files changed

+17373
-3
lines changed

Some content is hidden

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

91 files changed

+17373
-3
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Folders containing files under different permissive license than Apache 2.0 are
2121
- [drivers](./drivers) - MIT
2222
- [TESTS/mbed_hal/trng/pithy](./TESTS/mbed_hal/trng/pithy) - BSD-3-Clause
2323
- [tools/data/rpc](./tools/data/rpc) - MIT
24-
- [targets](./targets) - PBL, BSD-style, MIT-style, Zlib-style, Public-domain
24+
- [targets](./targets) - PBL, BSD-style, MIT-style, Zlib-style, Public-domain, BSD-3-Clause
2525

2626
The Python modules used by Mbed tools are used under the following licenses:
2727

TESTS/psa/its_ps/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ utest::v1::status_t case_its_setup_handler(const Case *const source, const size_
178178
Case cases[] = {
179179
Case("PSA prot internal storage - Basic", case_its_setup_handler<its>, pits_ps_test<its>, case_its_teardown_handler),
180180
Case("PSA prot internal storage - Write-once", case_its_setup_handler<its>, pits_ps_write_once_test<its>, case_its_teardown_handler),
181+
#if COMPONENT_FLASHIAP
181182
Case("PSA protected storage - Basic", case_its_setup_handler<ps>, pits_ps_test<ps>),
182183
Case("PSA protected storage - Write-once", case_its_setup_handler<ps>, pits_ps_write_once_test<ps>)
184+
#endif
183185
};
184186

185187
utest::v1::status_t greentea_test_setup(const size_t number_of_cases)

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
},
3535
"LPC55S69_S": {
3636
"storage_type": "TDB_INTERNAL"
37+
},
38+
"ARM_MUSCA_A1_S": {
39+
"storage_type": "TDB_INTERNAL"
3740
}
3841
}
3942
}

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
}

platform/mbed_lib.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@
130130
}
131131
},
132132
"target_overrides": {
133+
"ARM_MUSCA_A1_NS": {
134+
"stdio-baud-rate": 115200
135+
},
136+
"ARM_MUSCA_A1_S": {
137+
"stdio-baud-rate": 115200
138+
},
133139
"EFM32": {
134140
"stdio-baud-rate": 115200
135141
},
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_A1 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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2019 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) 2019 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 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 // 0x000a0400
26+
#endif
27+
28+
#if !defined(MBED_ROM_SIZE)
29+
#define MBED_ROM_SIZE NS_CODE_SIZE // 0x5f800
30+
#endif
31+
32+
#if !defined(MBED_RAM_START)
33+
#define MBED_RAM_START NS_DATA_START
34+
#endif
35+
36+
#if !defined(MBED_RAM_SIZE)
37+
#define MBED_RAM_SIZE NS_DATA_SIZE
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)