Skip to content

Commit 979e1f0

Browse files
authored
Merge pull request #11018 from romanjoe/cy8c064-sb
PSOC6_SB: initial integration of Cypress Secure Boot target CY8CPROTO_064_SB
2 parents c74d67e + 9780c90 commit 979e1f0

Some content is hidden

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

60 files changed

+10589
-11
lines changed

LICENSE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ The Python modules used by Mbed tools are used under the following licenses:
5454
- [pywin32](https://pypi.org/project/pywin32/) - PSF
5555
- [wmi](https://pypi.org/project/WMI/) - MIT
5656
- [psutil](https://pypi.org/project/psutil/) - BSD
57+
- [click](https://pypi.org/project/click/) - BSD-3-Clause
58+
- [cryptography](https://pypi.org/project/cryptography/) - BSD, Apache-2.0

features/storage/nvstore/mbed_lib.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@
4949
"area_1_size": 16384,
5050
"area_2_address": "0x100FC000",
5151
"area_2_size": 16384
52+
},
53+
"CY8CPROTO_064_SB": {
54+
"area_1_address": "0x10048000",
55+
"area_1_size": 16384,
56+
"area_2_address": "0x1004C000",
57+
"area_2_size": 16384
5258
}
5359
}
5460
}

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ cmsis-pack-manager>=0.2.3,<0.3.0
2626
pywin32==224;platform_system=='Windows'
2727
wmi==1.4.9;platform_system=='Windows'
2828
psutil==5.6.2
29+
cryptography>=2.4.x,<2.5
30+
Click>=7.0,<7.1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*******************************************************************************
2+
* File Name: cycfg.c
3+
*
4+
* Description:
5+
* Wrapper function to initialize all generated code.
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#include "cycfg.h"
26+
27+
void init_cycfg_all(void)
28+
{
29+
init_cycfg_system();
30+
init_cycfg_clocks();
31+
init_cycfg_routing();
32+
init_cycfg_peripherals();
33+
init_cycfg_pins();
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*******************************************************************************
2+
* File Name: cycfg.h
3+
*
4+
* Description:
5+
* Simple wrapper header containing all generated files.
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#if !defined(CYCFG_H)
26+
#define CYCFG_H
27+
28+
#if defined(__cplusplus)
29+
extern "C" {
30+
#endif
31+
32+
#include "cycfg_notices.h"
33+
#include "cycfg_system.h"
34+
#include "cycfg_clocks.h"
35+
#include "cycfg_routing.h"
36+
#include "cycfg_peripherals.h"
37+
#include "cycfg_pins.h"
38+
39+
void init_cycfg_all(void);
40+
41+
42+
#if defined(__cplusplus)
43+
}
44+
#endif
45+
46+
47+
#endif /* CYCFG_H */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*******************************************************************************
2+
* File Name: cycfg.timestamp
3+
*
4+
* Description:
5+
* Sentinel file for determining if generated source is up to date.
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_clocks.c
3+
*
4+
* Description:
5+
* Clock configuration
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#include "cycfg_clocks.h"
26+
27+
28+
void init_cycfg_clocks(void)
29+
{
30+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_16_BIT, 0U);
31+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_16_BIT, 0U, 499U);
32+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_16_BIT, 0U);
33+
34+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 0U);
35+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 0U, 35U);
36+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 0U);
37+
38+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
39+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 1U, 3U);
40+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_clocks.h
3+
*
4+
* Description:
5+
* Clock configuration
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#if !defined(CYCFG_CLOCKS_H)
26+
#define CYCFG_CLOCKS_H
27+
28+
#include "cycfg_notices.h"
29+
#include "cy_sysclk.h"
30+
31+
#if defined(__cplusplus)
32+
extern "C" {
33+
#endif
34+
35+
#define peri_0_div_16_0_ENABLED 1U
36+
#define peri_0_div_16_0_HW CY_SYSCLK_DIV_16_BIT
37+
#define peri_0_div_16_0_NUM 0U
38+
#define CYBSP_DEBUG_UART_CLK_DIV_ENABLED 1U
39+
#define CYBSP_DEBUG_UART_CLK_DIV_HW CY_SYSCLK_DIV_8_BIT
40+
#define CYBSP_DEBUG_UART_CLK_DIV_NUM 0U
41+
#define CYBSP_I2C_CLK_DIV_ENABLED 1U
42+
#define CYBSP_I2C_CLK_DIV_HW CY_SYSCLK_DIV_8_BIT
43+
#define CYBSP_I2C_CLK_DIV_NUM 1U
44+
45+
void init_cycfg_clocks(void);
46+
47+
#if defined(__cplusplus)
48+
}
49+
#endif
50+
51+
52+
#endif /* CYCFG_CLOCKS_H */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_notices.h
3+
*
4+
* Description:
5+
* Contains warnings and errors that occurred while generating code for the
6+
* design.
7+
* This file was automatically generated and should not be modified.
8+
*
9+
********************************************************************************
10+
* Copyright 2017-2019 Cypress Semiconductor Corporation
11+
* SPDX-License-Identifier: Apache-2.0
12+
*
13+
* Licensed under the Apache License, Version 2.0 (the "License");
14+
* you may not use this file except in compliance with the License.
15+
* You may obtain a copy of the License at
16+
*
17+
* http://www.apache.org/licenses/LICENSE-2.0
18+
*
19+
* Unless required by applicable law or agreed to in writing, software
20+
* distributed under the License is distributed on an "AS IS" BASIS,
21+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22+
* See the License for the specific language governing permissions and
23+
* limitations under the License.
24+
********************************************************************************/
25+
26+
#if !defined(CYCFG_NOTICES_H)
27+
#define CYCFG_NOTICES_H
28+
29+
30+
#endif /* CYCFG_NOTICES_H */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_peripherals.c
3+
*
4+
* Description:
5+
* Peripheral Hardware Block configuration
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#include "cycfg_peripherals.h"
26+
27+
const cy_stc_scb_ezi2c_config_t CYBSP_I2C_config =
28+
{
29+
.numberOfAddresses = CY_SCB_EZI2C_ONE_ADDRESS,
30+
.slaveAddress1 = 8U,
31+
.slaveAddress2 = 0U,
32+
.subAddressSize = CY_SCB_EZI2C_SUB_ADDR8_BITS,
33+
.enableWakeFromSleep = false,
34+
};
35+
const cy_stc_scb_uart_config_t CYBSP_DEBUG_UART_config =
36+
{
37+
.uartMode = CY_SCB_UART_STANDARD,
38+
.enableMutliProcessorMode = false,
39+
.smartCardRetryOnNack = false,
40+
.irdaInvertRx = false,
41+
.irdaEnableLowPowerReceiver = false,
42+
.oversample = 12,
43+
.enableMsbFirst = false,
44+
.dataWidth = 8UL,
45+
.parity = CY_SCB_UART_PARITY_NONE,
46+
.stopBits = CY_SCB_UART_STOP_BITS_1,
47+
.enableInputFilter = false,
48+
.breakWidth = 11UL,
49+
.dropOnFrameError = false,
50+
.dropOnParityError = false,
51+
.receiverAddress = 0x0UL,
52+
.receiverAddressMask = 0x0UL,
53+
.acceptAddrInFifo = false,
54+
.enableCts = false,
55+
.ctsPolarity = CY_SCB_UART_ACTIVE_LOW,
56+
.rtsRxFifoLevel = 0UL,
57+
.rtsPolarity = CY_SCB_UART_ACTIVE_LOW,
58+
.rxFifoTriggerLevel = 63UL,
59+
.rxFifoIntEnableMask = 0UL,
60+
.txFifoTriggerLevel = 63UL,
61+
.txFifoIntEnableMask = 0UL,
62+
};
63+
const cy_stc_smif_config_t CYBSP_QSPI_config =
64+
{
65+
.mode = (uint32_t)CY_SMIF_NORMAL,
66+
.deselectDelay = CYBSP_QSPI_DESELECT_DELAY,
67+
.rxClockSel = (uint32_t)CY_SMIF_SEL_INV_INTERNAL_CLK,
68+
.blockEvent = (uint32_t)CY_SMIF_BUS_ERROR,
69+
};
70+
71+
72+
void init_cycfg_peripherals(void)
73+
{
74+
Cy_SysClk_PeriphAssignDivider(PCLK_SCB3_CLOCK, CY_SYSCLK_DIV_8_BIT, 1U);
75+
76+
Cy_SysClk_PeriphAssignDivider(PCLK_SCB5_CLOCK, CY_SYSCLK_DIV_8_BIT, 0U);
77+
}

0 commit comments

Comments
 (0)