Skip to content

Commit aedec74

Browse files
Oleg Kapshiicy-opm
authored andcommitted
Added support for PSA target to WIFI_BT board
Added WiFi_Bt CM4 PSA target in mbedos json Added SPE-NSPE mailbox initialization for CM4 SystemInit Made similar to FUTURE_SEQUANA configurations Copied FUTURE_SEQUANA CM0 SPM part for WiFi_Bt smoke test Added CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets Sorted files for new CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets Copied files for CY8CKIT_062_WIFI_BT_M0_PSA from FUTURE_SEQUANA Copied and updated cm0p start files Corrected according to FUTURE_SEQUANA Changes to M0 startup files to have SPM started Fixed implicit declaration warning Commented interrupts enabling according to FUTURE_SEQUANA flow Updated prebuild spm_smore CM0 hex for CM4 target Turned on greentea environment Used special memory region for common CM0/CM4 data Updated prebuild CM0 SPM hex Placed shared memory region for flash operations into SPM shared memory region Updated cyprotection code and configuration Start address of protected regions is set by a defined number from target.json Added masters pcMask configuration Added support for PSA target to WIFI_BT board Enabled resources protection for SPM Aligned RAM usage according to Cypress FlashBoot and CyBootloader alligned protection config Added CYW943012P6EVB_01_M0 target Enlarged heap size, remobed nv_seed Added heap reservation in linker script from mbed-os Removed heap size definition turned on nv_seed config Removed nv_seed macros Enabled protection for PSoC6 CM0 Added PSoC6 CM0 PSA readme Enabled mbed_hal-spm test Enabled nv_seed and removed unneeded ipc config define Added SPDX string to feature_ble cypress target files Removed unneeded supported_toolchains lines for Cypress targets Disabled protection settings Corrected flash initialization for PSoC6 CM0 PSA Changed PSoC6 IPC6 protection for flash Enabled special flash initialization and enabled protection settings Updated and added new prebuild PSoC6 CM0 PSA hex files Disabled HW TRNG and CRC for PSoC6 CM4 PSA target Added missing const to allow types to match Updated PSoC6 WIFI_BT_PSA prebuilt directory Moved PSoC6 shared section usage area definition to begin of ld Added initial ARM_STD linker and startup files for PSoC6 CM0 Added initial IAR linker and startup files for PSoC6 CM0 Added defines to disable some SPM protection settings for PSoC64 Moved Flash function variables into separate memory region Added defines for new Public area definition Updated PSoC6 CM0_PSA hex-files
1 parent 277c91f commit aedec74

File tree

63 files changed

+66349
-4004
lines changed

Some content is hidden

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

63 files changed

+66349
-4004
lines changed

TESTS/mbedmicro-rtos-mbed/mail/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ using namespace utest::v1;
3333
#define THREAD_STACK_SIZE 512
3434
#elif defined(__ARM_FM)
3535
#define THREAD_STACK_SIZE 512
36-
#elif defined(TARGET_FUTURE_SEQUANA_PSA)
36+
#elif defined(TARGET_FUTURE_SEQUANA_PSA) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
3737
#define THREAD_STACK_SIZE 512
3838
#else
3939
#define THREAD_STACK_SIZE 320 /* larger stack cause out of heap memory on some 16kB RAM boards in multi thread test*/

TESTS/mbedmicro-rtos-mbed/malloc/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ volatile bool thread_should_continue = true;
4141
#define THREAD_STACK_SIZE 512
4242
#elif defined(__ARM_FM)
4343
#define THREAD_STACK_SIZE 512
44-
#elif defined(TARGET_FUTURE_SEQUANA_PSA)
44+
#elif defined(TARGET_FUTURE_SEQUANA_PSA) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
4545
#define THREAD_STACK_SIZE 512
4646
#else
4747
#define THREAD_STACK_SIZE 256

TESTS/mbedmicro-rtos-mbed/threads/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define PARALLEL_THREAD_STACK_SIZE 512
3737
#elif defined(__ARM_FM)
3838
#define PARALLEL_THREAD_STACK_SIZE 512
39-
#elif defined(TARGET_FUTURE_SEQUANA_PSA)
39+
#elif defined(TARGET_FUTURE_SEQUANA_PSA) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
4040
#define PARALLEL_THREAD_STACK_SIZE 512
4141
#else
4242
#define PARALLEL_THREAD_STACK_SIZE 384

features/FEATURE_BLE/targets/TARGET_Cypress/TARGET_CY8C63XX/Psoc6BLE.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* mbed Microcontroller Library
33
* Copyright (c) 2017-2017 ARM Limited
44
* Copyright (c) 2017-2018 Future Electronics
5+
* SPDX-License-Identifier: Apache-2.0
56
*
67
* Licensed under the Apache License, Version 2.0 (the "License");
78
* you may not use this file except in compliance with the License.

features/FEATURE_BLE/targets/TARGET_Cypress/TARGET_CY8C63XX/drivers/IPCPipeTransportDriver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* mbed Microcontroller Library
33
* Copyright (c) 2017-2017 ARM Limited
44
* Copyright (c) 2017-2018 Future Electronics
5+
* SPDX-License-Identifier: Apache-2.0
56
*
67
* Licensed under the Apache License, Version 2.0 (the "License");
78
* you may not use this file except in compliance with the License.

features/FEATURE_BLE/targets/TARGET_Cypress/TARGET_CY8C63XX/drivers/IPCPipeTransportDriver.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* mbed Microcontroller Library
33
* Copyright (c) 2017-2017 ARM Limited
44
* Copyright (c) 2017-2018 Future Electronics
5+
* SPDX-License-Identifier: Apache-2.0
56
*
67
* Licensed under the Apache License, Version 2.0 (the "License");
78
* you may not use this file except in compliance with the License.

features/FEATURE_BLE/targets/TARGET_Cypress/TARGET_CYW43XXX/HCIDriver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2018 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"FUTURE_SEQUANA_M0_PSA": {
1515
"storage_type": "TDB_INTERNAL"
1616
},
17+
"CY8CKIT_062_WIFI_BT_M0_PSA": {
18+
"storage_type": "TDB_INTERNAL"
19+
},
1720
"K66F": {
1821
"storage_type": "TDB_INTERNAL"
1922
},

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"FUTURE_SEQUANA_M0_PSA": {
1515
"internal_size": "0x8000",
1616
"internal_base_address": "0x10078000"
17+
},
18+
"CY8CKIT_062_WIFI_BT_M0_PSA": {
19+
"internal_size": "0x8000",
20+
"internal_base_address": "0x10078000"
1721
}
1822
}
1923
}

features/storage/nvstore/mbed_lib.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@
4949
},
5050
"FUTURE_SEQUANA_M0_PSA": {
5151
"enabled" : false
52+
},
53+
"CY8CKIT_062_WIFI_BT": {
54+
"area_1_address": "0x100F8000",
55+
"area_1_size": 16384,
56+
"area_2_address": "0x100FC000",
57+
"area_2_size": 16384
58+
},
59+
"CY8CKIT_062_WIFI_BT_M0": {
60+
"area_1_address": "0x10078000",
61+
"area_1_size": 16384,
62+
"area_2_address": "0x1007C000",
63+
"area_2_size": 16384
64+
},
65+
"CY8CKIT_062_WIFI_BT_PSA": {
66+
"enabled" : false
67+
},
68+
"CY8CKIT_062_WIFI_BT_M0_PSA": {
69+
"enabled" : false
5270
}
5371
}
5472
}

targets/TARGET_Cypress/TARGET_PSOC6/PinNamesTypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* mbed Microcontroller Library
33
* Copyright (c) 2017-2018 Future Electronics
4+
* SPDX-License-Identifier: Apache-2.0
45
*
56
* Licensed under the Apache License, Version 2.0 (the "License");
67
* you may not use this file except in compliance with the License.

targets/TARGET_Cypress/TARGET_PSOC6/PortNames.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* mbed Microcontroller Library
33
* Copyright (c) 2017-2018 Future Electronics
4+
* SPDX-License-Identifier: Apache-2.0
45
*
56
* Licensed under the Apache License, Version 2.0 (the "License");
67
* you may not use this file except in compliance with the License.

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW943012P6EVB_01/device/TOOLCHAIN_ARM_STD/cy8c6xx7_cm4_dual.sct renamed to targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8C62XX/TARGET_MCU_PSOC6_M0/device/TOOLCHAIN_ARM_STD/cy8c6xx7_cm0plus.sct

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
; to pass a scatter file through a C preprocessor.
44

55
;*******************************************************************************
6-
;* \file cy8c6xx7_cm4_dual.scat
7-
;* \version `$CY_MAJOR_VERSION`.`$CY_MINOR_VERSION`
6+
;* \file cy8c6xx7_cm0plus.scat
7+
;* \version 2.30
88
;*
99
;* Linker file for the ARMCC.
1010
;*
@@ -43,19 +43,27 @@
4343
;******************************************************************************/
4444

4545
#if !defined(MBED_ROM_START)
46-
#define MBED_ROM_START 0x10002000
46+
#define MBED_ROM_START 0x10000000
4747
#endif
4848

4949
#if !defined(MBED_ROM_SIZE)
50-
#define MBED_ROM_SIZE 0x000FE000
50+
#define MBED_ROM_SIZE 0x80000
5151
#endif
5252

5353
#if !defined(MBED_RAM_START)
54-
#define MBED_RAM_START 0x08002000
54+
#define MBED_RAM_START 0x08000000
5555
#endif
5656

5757
#if !defined(MBED_RAM_SIZE)
58-
#define MBED_RAM_SIZE 0x00045800
58+
#define MBED_RAM_SIZE 0x10000
59+
#endif
60+
61+
#if !defined(MBED_PUBLIC_RAM_START)
62+
#define MBED_PUBLIC_RAM_START 0x08047600
63+
#endif
64+
65+
#if !defined(MBED_PUBLIC_RAM_SIZE)
66+
#define MBED_PUBLIC_RAM_SIZE 0x200
5967
#endif
6068

6169
#if !defined(MBED_BOOT_STACK_SIZE)
@@ -67,20 +75,23 @@
6775
; The defines below describe the location and size of blocks of memory in the target.
6876
; Use these defines to specify the memory regions available for allocation.
6977

70-
; The following defines control RAM and flash memory allocation for the CM4 core.
71-
; You can change the memory allocation by editing RAM and Flash defines.
72-
; Note that 2 KB of RAM (at the end of the RAM section) are reserved for system use.
73-
; Using this memory region for other purposes will lead to unexpected behavior.
74-
; Your changes must be aligned with the corresponding defines for CM0+ core in 'xx_cm0plus.scat',
75-
; where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.scat'.
78+
; The following defines control RAM and flash memory allocation for the CM0+ core.
79+
; You can change the memory allocation by editing the RAM and Flash defines.
80+
; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat',
81+
; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'.
82+
; RAM
7683
; RAM
7784
#define RAM_START MBED_RAM_START
7885
#define RAM_SIZE MBED_RAM_SIZE
86+
; Public RAM
87+
#define PUBLIC_RAM_START MBED_PUBLIC_RAM_START
88+
#define PUBLIC_RAM_SIZE MBED_PUBLIC_RAM_SIZE
89+
; Flash
7990
; Flash
8091
#define FLASH_START MBED_ROM_START
8192
#define FLASH_SIZE MBED_ROM_SIZE
8293

83-
; The following defines describe a 32K flash region used for EEPROM emulation.
94+
; The following defines describe a 32K flash region used for EEPROM emulation.
8495
; This region can also be used as the general purpose flash.
8596
; You can assign sections to this memory region for only one of the cores.
8697
; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region.
@@ -118,8 +129,13 @@
118129
#define EFUSE_SIZE 0x100000
119130

120131

121-
LR_IROM1 FLASH_START FLASH_SIZE
132+
LR_IROM1 FLASH_START (FLASH_SIZE - 0x8000)
122133
{
134+
.cy_app_header +0
135+
{
136+
* (.cy_app_header)
137+
}
138+
123139
ER_FLASH_VECTORS +0
124140
{
125141
* (RESET, +FIRST)
@@ -148,29 +164,17 @@ LR_IROM1 FLASH_START FLASH_SIZE
148164
{
149165
* (.noinit)
150166
}
151-
152-
; Application heap area (HEAP)
153-
ARM_LIB_HEAP +0
154-
{
155-
* (HEAP)
156-
}
157167

158-
; Stack region growing down
159-
ARM_LIB_STACK RAM_START+RAM_SIZE -Stack_Size
160-
{
161-
* (STACK)
168+
ARM_LIB_STACK RAM_START+RAM_SIZE EMPTY -Stack_Size
169+
{ ; Stack region growing down
162170
}
163171

164-
; Used for the digital signature of the secure application and the
165-
; Bootloader SDK application. The size of the section depends on the required
166-
; data size.
167-
.cy_app_signature (FLASH_START + FLASH_SIZE - 256) 256
172+
RW_IRAM2 PUBLIC_RAM_START UNINIT
168173
{
169-
* (.cy_app_signature)
174+
* (.cy_pub_ram)
170175
}
171176
}
172177

173-
174178
; Emulated EEPROM Flash area
175179
LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE
176180
{

0 commit comments

Comments
 (0)