Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Cypress devices #601

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ module:
hic_m48ssidae: &module_hic_m48ssidae
- records/rtos/rtos-cm4.yaml
- records/hic_hal/m48ssidae.yaml
hic_psoc5lp: &module_hic_psoc5lp
- records/rtos/rtos-cm3.yaml
- records/hic_hal/psoc5lp.yaml
- records/usb/usb-bulk.yaml

projects:
# HIC bootloaders and all target interfaces
Expand Down Expand Up @@ -641,6 +645,10 @@ projects:
- *module_if
- *module_hic_max32625
- records/board/max32665hsp.yaml
psoc5lp_cy8ckit_if:
- *module_if
- *module_hic_psoc5lp
- records/board/cy8ckit.yaml
sam3u2c_mkit_dk_dongle_nrf5x_if:
- *module_if
- *module_hic_sam3u2c
Expand Down
14 changes: 14 additions & 0 deletions records/board/cy8ckit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
common:
macros:
- TARGET_MCU_PSOC6
includes:
- source/family/infineon/PSoC6xxx
sources:
board:
- source/board/cy8ckit.c
target:
- source/family/infineon/target.c
- source/family/infineon/target_reset.c
- source/family/infineon/PSoC6xxx/PSOC6xxx.c


27 changes: 27 additions & 0 deletions records/hic_hal/psoc5lp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
common:
target:
- CY8C5868LTI-LP039
core:
- Cortex-M3
macros:
- INTERFACE_PSOC5LP
- OS_CLOCK=64000000
- DAPLINK_HIC_ID=0x2E127069 # DAPLINK_HIC_ID_PSOC5LP
includes:
- source/hic_hal/infineon/psoc5lp
- source/hic_hal/infineon/psoc5lp/PSoC5
sources:
hic_hal:
- source/hic_hal/infineon/psoc5lp
- source/hic_hal/infineon/psoc5lp/PSoC5
- source/hic_hal/infineon/psoc5lp/armcc

tool_specific:
uvision:
misc:
ld_flags:
- --predefine="-I..\..\..\source\hic_hal\infineon\psoc5lp"
make_armcc:
misc:
ld_flags:
- --predefine="-Isource\hic_hal\infineon\psoc5lp"
49 changes: 49 additions & 0 deletions source/board/cy8ckit.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*******************************************************************************
* @file cy8ckit.c
* @brief Board ID definitions for KitProg3 devices.
*
********************************************************************************
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/

#include "target_board.h"
#include "target_family.h"
#include "kit_utils.h"

// Called in main_task() to init before USB and files are configured
static void prerun_board_config(void)
{
// Define board ID
define_board_id();

//Reset target
(void)target_set_state(RESET_RUN);
}


// Default Daplink board_info
// The g_board_info also defined in target_board.c but with __attribute__((weak))
// coverity[misra_c_2012_rule_8_6_violation]
const board_info_t g_board_info =
{
.info_version = (uint16_t)kBoardInfoVersion,
.board_id = "19FF",
.family_id = (uint16_t)kCypress_psoc6_FamilyID,
.target_cfg = &target_device,
.prerun_board_config = prerun_board_config,
.flags = (uint32_t)kEnablePageErase
};

4 changes: 2 additions & 2 deletions source/daplink/cmsis-dap/DAP.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2013-2020 ARM Limited. All rights reserved.
* Copyright 2019, Cypress Semiconductor Corporation
* or a subsidiary of Cypress Semiconductor Corporation.
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
11 changes: 6 additions & 5 deletions source/daplink/cmsis-dap/DAP.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2013-2020 ARM Limited. All rights reserved.
* Copyright 2019, Cypress Semiconductor Corporation
* or a subsidiary of Cypress Semiconductor Corporation.
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -283,9 +283,10 @@ extern uint32_t Manchester_SWO_Control (uint32_t active);
extern void Manchester_SWO_Capture (uint8_t *buf, uint32_t num);
extern uint32_t Manchester_SWO_GetCount (void);

extern uint32_t DAP_ProcessVendorCommand (const uint8_t *request, uint8_t *response);
extern uint32_t DAP_ProcessCommand (const uint8_t *request, uint8_t *response);
extern uint32_t DAP_ExecuteCommand (const uint8_t *request, uint8_t *response);
extern uint32_t DAP_ProcessVendorCommand (const uint8_t *request, uint8_t *response);
extern uint32_t DAP_ProcessVendorCommandEx(const uint8_t *request, uint8_t *response);
extern uint32_t DAP_ProcessCommand (const uint8_t *request, uint8_t *response);
extern uint32_t DAP_ExecuteCommand (const uint8_t *request, uint8_t *response);

extern void DAP_Setup (void);

Expand Down
4 changes: 2 additions & 2 deletions source/daplink/cmsis-dap/DAP_vendor.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2013-2016 ARM Limited. All rights reserved.
* Copyright 2019, Cypress Semiconductor Corporation
* or a subsidiary of Cypress Semiconductor Corporation.
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
2 changes: 1 addition & 1 deletion source/daplink/daplink.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ COMPILER_ASSERT(DAPLINK_RAM_SHARED_START + DAPLINK_RAM_SHARED_SIZE == DAPLINK_RA
#define DAPLINK_HIC_ID_STM32F723IE 0x9796990D // reserving for future use
#define DAPLINK_HIC_ID_LPC55S69 0x97969920 // reserving for future use
#define DAPLINK_HIC_ID_M48SSIDAE 0x97969921
#define DAPLINK_HIC_ID_PSOC5 0x2E127069
#define DAPLINK_HIC_ID_PSOC5LP 0x2E127069
//@}

#define DAPLINK_INFO_OFFSET 0x20
Expand Down
4 changes: 2 additions & 2 deletions source/daplink/drag-n-drop/flash_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2019, ARM Limited, All Rights Reserved
* Copyright 2019, Cypress Semiconductor Corporation
* or a subsidiary of Cypress Semiconductor Corporation.
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand Down
4 changes: 2 additions & 2 deletions source/daplink/drag-n-drop/vfs_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2020, ARM Limited, All Rights Reserved
* Copyright 2019, Cypress Semiconductor Corporation
* or a subsidiary of Cypress Semiconductor Corporation.
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand Down
4 changes: 2 additions & 2 deletions source/daplink/interface/swd_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2019, ARM Limited, All Rights Reserved
* Copyright 2019, Cypress Semiconductor Corporation
* or a subsidiary of Cypress Semiconductor Corporation.
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand Down
4 changes: 2 additions & 2 deletions source/daplink/interface/swd_host_ca.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2019, ARM Limited, All Rights Reserved
* Copyright 2019, Cypress Semiconductor Corporation
* or a subsidiary of Cypress Semiconductor Corporation.
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand Down
4 changes: 2 additions & 2 deletions source/daplink/interface/target_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2019, ARM Limited, All Rights Reserved
* Copyright 2019, Cypress Semiconductor Corporation
* or a subsidiary of Cypress Semiconductor Corporation.
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand Down
4 changes: 2 additions & 2 deletions source/daplink/settings/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
* Copyright 2019, Cypress Semiconductor Corporation
* or a subsidiary of Cypress Semiconductor Corporation.
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand Down
4 changes: 2 additions & 2 deletions source/daplink/settings/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
* Copyright 2019, Cypress Semiconductor Corporation
* or a subsidiary of Cypress Semiconductor Corporation.
* Copyright (2019-2021) Cypress Semiconductor Corporation (an Infineon company)
* or an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand Down
Loading