Skip to content

Commit b0a0783

Browse files
Marian SavchukMarianSavchuk
Marian Savchuk
authored andcommitted
Add support for Cypress devices
1 parent 8509fea commit b0a0783

File tree

128 files changed

+85878
-26
lines changed

Some content is hidden

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

128 files changed

+85878
-26
lines changed

projects.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ module:
7676
hic_m48ssidae: &module_hic_m48ssidae
7777
- records/rtos/rtos-cm4.yaml
7878
- records/hic_hal/m48ssidae.yaml
79+
hic_psoc5lp: &module_hic_psoc5lp
80+
- records/rtos/rtos-cm3.yaml
81+
- records/hic_hal/psoc5lp.yaml
82+
- records/usb/usb-bulk.yaml
7983

8084
projects:
8185
kl26z_bl:
@@ -686,3 +690,7 @@ projects:
686690
- *module_if
687691
- *module_hic_lpc4322
688692
- records/board/hani_iot.yaml
693+
psoc5lp_cy8ckit_if:
694+
- *module_if
695+
- *module_hic_psoc5lp
696+
- records/board/cy8ckit.yaml

records/board/cy8ckit.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
common:
2+
macros:
3+
- TARGET_MCU_PSOC6
4+
includes:
5+
- source/family/infineon/PSoC6xxx
6+
sources:
7+
board:
8+
- source/board/cy8ckit.c
9+
target:
10+
- source/family/infineon/target.c
11+
- source/family/infineon/target_reset.c
12+
- source/family/infineon/PSoC6xxx/PSOC6xxx.c
13+
14+

records/hic_hal/psoc5lp.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
common:
2+
target:
3+
- CY8C5868LTI-LP039
4+
core:
5+
- Cortex-M3
6+
macros:
7+
- INTERFACE_PSOC5LP
8+
- OS_CLOCK=64000000
9+
- DAPLINK_HIC_ID=0x2E127069 # DAPLINK_HIC_ID_PSOC5LP
10+
includes:
11+
- source/hic_hal/infineon/psoc5lp
12+
- source/hic_hal/infineon/psoc5lp/PSoC5
13+
sources:
14+
hic_hal:
15+
- source/hic_hal/infineon/psoc5lp
16+
- source/hic_hal/infineon/psoc5lp/PSoC5
17+
- source/hic_hal/infineon/psoc5lp/armcc
18+
19+
tool_specific:
20+
uvision:
21+
misc:
22+
ld_flags:
23+
- --predefine="-I..\..\..\source\hic_hal\infineon\psoc5lp"
24+
make_armcc:
25+
misc:
26+
ld_flags:
27+
- --predefine="-Isource\hic_hal\infineon\psoc5lp"

source/board/cy8ckit.c

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*******************************************************************************
2+
* @file cy8ckit.c
3+
* @brief Board ID definitions for KitProg3 devices.
4+
*
5+
********************************************************************************
6+
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
7+
* or an affiliate of Cypress Semiconductor Corporation.
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
10+
* not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*****************************************************************************/
21+
22+
#include "target_board.h"
23+
#include "target_family.h"
24+
#include "kit_utils.h"
25+
26+
// Called in main_task() to init before USB and files are configured
27+
static void prerun_board_config(void)
28+
{
29+
// Define board ID
30+
define_board_id();
31+
32+
//Reset target
33+
(void)target_set_state(RESET_RUN);
34+
}
35+
36+
37+
// Default Daplink board_info
38+
// The g_board_info also defined in target_board.c but with __attribute__((weak))
39+
// coverity[misra_c_2012_rule_8_6_violation]
40+
const board_info_t g_board_info =
41+
{
42+
.info_version = (uint16_t)kBoardInfoVersion,
43+
.board_id = "19FF",
44+
.family_id = (uint16_t)kCypress_psoc6_FamilyID,
45+
.target_cfg = &target_device,
46+
.prerun_board_config = prerun_board_config,
47+
.flags = (uint32_t)kEnablePageErase
48+
};
49+

source/daplink/cmsis-dap/DAP.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Copyright (c) 2013-2020 ARM Limited. All rights reserved.
3-
* Copyright 2019, Cypress Semiconductor Corporation
4-
* or a subsidiary of Cypress Semiconductor Corporation.
3+
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
4+
* or an affiliate of Cypress Semiconductor Corporation.
55
*
66
* SPDX-License-Identifier: Apache-2.0
77
*

source/daplink/cmsis-dap/DAP.h

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Copyright (c) 2013-2020 ARM Limited. All rights reserved.
3-
* Copyright 2019, Cypress Semiconductor Corporation
4-
* or a subsidiary of Cypress Semiconductor Corporation.
3+
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
4+
* or an affiliate of Cypress Semiconductor Corporation.
55
*
66
* SPDX-License-Identifier: Apache-2.0
77
*
@@ -283,9 +283,10 @@ extern uint32_t Manchester_SWO_Control (uint32_t active);
283283
extern void Manchester_SWO_Capture (uint8_t *buf, uint32_t num);
284284
extern uint32_t Manchester_SWO_GetCount (void);
285285

286-
extern uint32_t DAP_ProcessVendorCommand (const uint8_t *request, uint8_t *response);
287-
extern uint32_t DAP_ProcessCommand (const uint8_t *request, uint8_t *response);
288-
extern uint32_t DAP_ExecuteCommand (const uint8_t *request, uint8_t *response);
286+
extern uint32_t DAP_ProcessVendorCommand (const uint8_t *request, uint8_t *response);
287+
extern uint32_t DAP_ProcessVendorCommandEx(const uint8_t *request, uint8_t *response);
288+
extern uint32_t DAP_ProcessCommand (const uint8_t *request, uint8_t *response);
289+
extern uint32_t DAP_ExecuteCommand (const uint8_t *request, uint8_t *response);
289290

290291
extern void DAP_Setup (void);
291292

source/daplink/cmsis-dap/DAP_vendor.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Copyright (c) 2013-2016 ARM Limited. All rights reserved.
3-
* Copyright 2019, Cypress Semiconductor Corporation
4-
* or a subsidiary of Cypress Semiconductor Corporation.
3+
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
4+
* or an affiliate of Cypress Semiconductor Corporation.
55
*
66
* SPDX-License-Identifier: Apache-2.0
77
*

source/daplink/daplink.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ COMPILER_ASSERT(DAPLINK_RAM_SHARED_START + DAPLINK_RAM_SHARED_SIZE == DAPLINK_RA
6868
#define DAPLINK_HIC_ID_STM32F723IE 0x9796990D // reserving for future use
6969
#define DAPLINK_HIC_ID_LPC55S69 0x97969920 // reserving for future use
7070
#define DAPLINK_HIC_ID_M48SSIDAE 0x97969921
71-
#define DAPLINK_HIC_ID_PSOC5 0x2E127069
71+
#define DAPLINK_HIC_ID_PSOC5LP 0x2E127069
7272
//@}
7373

7474
#define DAPLINK_INFO_OFFSET 0x20

source/daplink/drag-n-drop/flash_manager.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* DAPLink Interface Firmware
66
* Copyright (c) 2009-2019, ARM Limited, All Rights Reserved
7-
* Copyright 2019, Cypress Semiconductor Corporation
8-
* or a subsidiary of Cypress Semiconductor Corporation.
7+
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
8+
* or an affiliate of Cypress Semiconductor Corporation.
99
* SPDX-License-Identifier: Apache-2.0
1010
*
1111
* Licensed under the Apache License, Version 2.0 (the "License"); you may

source/daplink/drag-n-drop/vfs_user.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* DAPLink Interface Firmware
66
* Copyright (c) 2009-2020, ARM Limited, All Rights Reserved
7-
* Copyright 2019, Cypress Semiconductor Corporation
8-
* or a subsidiary of Cypress Semiconductor Corporation.
7+
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
8+
* or an affiliate of Cypress Semiconductor Corporation.
99
* SPDX-License-Identifier: Apache-2.0
1010
*
1111
* Licensed under the Apache License, Version 2.0 (the "License"); you may

source/daplink/interface/swd_host.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* DAPLink Interface Firmware
66
* Copyright (c) 2009-2019, ARM Limited, All Rights Reserved
7-
* Copyright 2019, Cypress Semiconductor Corporation
8-
* or a subsidiary of Cypress Semiconductor Corporation.
7+
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
8+
* or an affiliate of Cypress Semiconductor Corporation.
99
* SPDX-License-Identifier: Apache-2.0
1010
*
1111
* Licensed under the Apache License, Version 2.0 (the "License"); you may

source/daplink/interface/swd_host_ca.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* DAPLink Interface Firmware
66
* Copyright (c) 2009-2019, ARM Limited, All Rights Reserved
7-
* Copyright 2019, Cypress Semiconductor Corporation
8-
* or a subsidiary of Cypress Semiconductor Corporation.
7+
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
8+
* or an affiliate of Cypress Semiconductor Corporation.
99
* SPDX-License-Identifier: Apache-2.0
1010
*
1111
* Licensed under the Apache License, Version 2.0 (the "License"); you may

source/daplink/interface/target_flash.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* DAPLink Interface Firmware
66
* Copyright (c) 2009-2019, ARM Limited, All Rights Reserved
7-
* Copyright 2019, Cypress Semiconductor Corporation
8-
* or a subsidiary of Cypress Semiconductor Corporation.
7+
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
8+
* or an affiliate of Cypress Semiconductor Corporation.
99
* SPDX-License-Identifier: Apache-2.0
1010
*
1111
* Licensed under the Apache License, Version 2.0 (the "License"); you may

source/daplink/settings/settings.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* DAPLink Interface Firmware
66
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
7-
* Copyright 2019, Cypress Semiconductor Corporation
8-
* or a subsidiary of Cypress Semiconductor Corporation.
7+
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
8+
* or an affiliate of Cypress Semiconductor Corporation.
99
* SPDX-License-Identifier: Apache-2.0
1010
*
1111
* Licensed under the Apache License, Version 2.0 (the "License"); you may

source/daplink/settings/settings.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* DAPLink Interface Firmware
66
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
7-
* Copyright 2019, Cypress Semiconductor Corporation
8-
* or a subsidiary of Cypress Semiconductor Corporation.
7+
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
8+
* or an affiliate of Cypress Semiconductor Corporation.
99
* SPDX-License-Identifier: Apache-2.0
1010
*
1111
* Licensed under the Apache License, Version 2.0 (the "License"); you may

0 commit comments

Comments
 (0)