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

boards: infineon: add cy8ckit_062s2_ai support #82435

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SandraArrow
Copy link
Contributor

This PR adds support for the cy8ckit_062s2_ai board which is based on CY8C624ABZI-S2D44 SoC.

Infineon's customized OpenOCD version and pyOCD are supported as runner.

The following samples were tested:

  • samples/hello_world
  • samples/basic/blinky
  • samples/basic/button

@zephyrbot zephyrbot added the platform: Infineon Infineon Technologies AG label Dec 2, 2024

# General configuration
CONFIG_CORTEX_M_SYSTICK=y
CONFIG_BUILD_OUTPUT_HEX=y
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these do not seem board specific configs but soc level preferences. Systick may not even be needed if enabled in DT.

Copy link
Contributor Author

@SandraArrow SandraArrow Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied it from another PSoC board. I deleted CONFIG_CORTEX_M_SYSTICK=y, but CONFIG_BUILD_OUTPUT_HEX=y is required to flash an application with (Infineon's version of) openOCD.

Without this Kconfig option, you will get the following error:

-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner openocd
FATAL ERROR: hex file location is unknown. Try enabling CONFIG_BUILD_OUTPUT_HEX.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONFIG_BUILD_OUTPUT_HEX=y is required to flash an application with (Infineon's version of) openOCD.

This means other boards are actually wrong, this soc cannot be easily flashed if there's no hex in the build folder. Add this option in the soc defconfig.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a more generic issue in the PSoC SoC configurations.
I checked the other supported PSoC boards. Almost all supported PSoC boards (cyw920829m2evk_02, cy8cproto_063_ble, cy8cproto_062_4343w) cannot be flashed with Infineon's openOCD version, if you comment out this Kconfig option in the board defconfig file. For cy8ckit_062s4 only pyOCD is supported as runner and this is able to flash bin files.
I am not sure if this issue should be fixed in this pull request since this Kconfig option is missing in all PSoC SoC configurations. I think, it makes more sense to fix it in a separate pull request and then also delete it in all board defconfig files.
I have also done a code search and found this Kconfig option in around 50 board defconfig files. So, it seems that there are several SoC configurations that do not enable this option.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONFIG_OUTPUT_BUILD_HEX=y is in all Cypress and Infineon PSoC6 board defconfigs; this is a requirement with our version of openOCD -- and as you've noted with many other boards as well. Is the suggestion that this should move from the board defconfig to an SOC file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was the suggestion from gmarull to move this Kconfig option from the board defconfig to the SoC defconfig file. However, I think, it makes no sense to change it just for one PSoC SoC (family). If we change it, we should change it for all PSoC families and then delete it in all PSoC board configurations.
On the other side, you find this Kconfig option in a lot of board configurations. So, I am not sure if it needs be changed.
@gmarull What do you think about it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok to ask to do this right for the board you're adding, other boards can be fixed later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have now deleted this Kconfig option in the board defconfig file and added it to the soc/infineon/cat1a/psoc6_02/Kconfig.defconfig file, as there is no separate defconfig file for each SoC. This Kconfig option is now set for all PSOC 6_02 based MCUs.

boards/infineon/cy8ckit_062s2_ai/doc/index.rst Outdated Show resolved Hide resolved
@SandraArrow SandraArrow force-pushed the add_cy8ckit_062s2_ai_support branch from 53ea8ea to fd652e9 Compare December 3, 2024 11:08
@zephyrbot zephyrbot added the area: ARM ARM (32-bit) Architecture label Dec 3, 2024
@SandraArrow SandraArrow force-pushed the add_cy8ckit_062s2_ai_support branch from 9cf9376 to 5542212 Compare December 3, 2024 14:34
Add board support for cy8ckit_062s2_ai

Signed-off-by: Sandra Schmidt <[email protected]>
Changed interrupt priority for GPIO.
See zephyrproject-rtos#81464

Signed-off-by: Sandra Schmidt <[email protected]>
@SandraArrow SandraArrow force-pushed the add_cy8ckit_062s2_ai_support branch from 5542212 to 98f94cc Compare December 9, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM ARM (32-bit) Architecture platform: Infineon Infineon Technologies AG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants