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 target CYSBSYSKIT_01 #12603

Merged
merged 14 commits into from
Apr 2, 2020
Merged

Conversation

dustin-crossman
Copy link
Contributor

Summary of changes

Adds target CYSBSYSKIT_01. The CYSBSYSKIT_01 is a Arduino Feather compatible PSoC6 kit. The software flow for this board deviates somewhat from other Cypress boards because the CYSBSYSKIT_01 intends to support FOTA. To support this the boards will come pre-flashed with a CM0 image that perform the bootloading and FOTA functionalities (we don't intend to provide this CM0 image publicly). Flashing with mbed will just update the CM4 image.

Impact of changes

Migration actions required

Documentation

None


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Greentea test results:
GT_CYSBSYSKIT_01-3-9-20.log

Failure explanations:

  • kvstore failures are not unique to this Cypress board. Issue is tracked here: KVStore greentea tests broken on some Cypress targets after #12385 #12565
  • hal/drivers-reset_reason timeouts are caused by the CM0 image taking too long to disable the watchdog timer on startup. Since PSoC6 watchdog timers are persistent over watchdog resets this causes the board to enter an infinite watchdog-reset-watchdog loop. This may be fixed in the future.
  • All the rest of the failures are because both the CM0 and CM4 image lock deep sleep and these tests expect deep sleep to be unlocked. This will be fixed in the future.

Reviewers


@ciarmcom ciarmcom requested review from maclobdell and a team March 9, 2020 20:00
@ciarmcom
Copy link
Member

ciarmcom commented Mar 9, 2020

@dustin-crossman, thank you for your changes.
@maclobdell @ARMmbed/mbed-os-test @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-hal please review.

@dustin-crossman
Copy link
Contributor Author

dustin-crossman commented Mar 9, 2020

On a somewhat related note: I'd like a little clarification regarding what #define signifies deep sleep availability and how MBED_TICKLESS relates to that. Initially we thought removing MBED_TICKLESS would clear up some of the deep sleep related failures for this board but clearly it did not. Looking a little closer there doesn't seem to be any deep sleep specific defines with the closest being DEVICE_LPTICKER if DEVICE_SLEEP is also defined.
Is it valid to have LPTICKER and SLEEP defined without MBED_TICKLESS? Also this page: https://os.mbed.com/docs/mbed-os/v6.0-preview/porting/tickless.html claims that a target must have support for Sleep and LPTicker but there is a MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER #define which implies to me that LPTicker does not need to be supported to use MBED_TICKLESS. Does the documentation just need an update or am I missing something?

Edit: I've duplicated and reworded a bit this question on the forums: https://forums.mbed.com/t/clarification-regarding-mbed-tickless/7602

@adbridge
Copy link
Contributor

@kjbracey-arm / @bulislaw Could either of you answer the above questions ?

@ifyall
Copy link

ifyall commented Mar 12, 2020

Regarding Dustin's question from above, a question has been filed on the forum: https://forums.mbed.com/t/clarification-regarding-mbed-tickless/7602.

Thank you,

Ian

@bulislaw
Copy link
Member

On a somewhat related note: I'd like a little clarification regarding what #define signifies deep sleep availability and how MBED_TICKLESS relates to that. Initially we thought removing MBED_TICKLESS would clear up some of the deep sleep related failures for this board but clearly it did not. Looking a little closer there doesn't seem to be any deep sleep specific defines with the closest being DEVICE_LPTICKER if DEVICE_SLEEP is also defined.
Is it valid to have LPTICKER and SLEEP defined without MBED_TICKLESS?

Yeah it makes perfect sense. Tickless is an optimisation not a requirement. If you have working tickless and deep sleep then in theory it should be possible to enable tickless though.

Also this page: https://os.mbed.com/docs/mbed-os/v6.0-preview/porting/tickless.html claims that a target must have support for Sleep and LPTicker but there is a MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER #define which implies to me that LPTicker does not need to be supported to use MBED_TICKLESS. Does the documentation just need an update or am I missing something?

We do support tickless from us ticker, but it's sort of a work around for cases when lpticker is not available or the way hardware behaves is not working well with Mbed tickless infrastructure (we need to use LPTicker as a new systick to avoid drifts associated with changing time sources systick<>lpticker which may introduce delays and latency in the system depending on HW). The difference is that by using high frequency timer we can't go into deep sleep so it only does a shallow sleep. I'm not sure whats the difference in terms of power consumption between shallow sleeping with 1ms wakeups for SysTick and shallow sleeping between events with high freq timer.
In any case I'd rather have boards using proper tickless if possible. We should probably add a note to the porting that this possibility exists.

@dustin-crossman
Copy link
Contributor Author

@bulislaw Thanks for the explanation! Looking through the mbed rtos code that all makes more sense.

We were pondering enabling TICKLESS_FROM_US_TICKER on this board but since that's more of a workaround and we plan on enabling deep sleep for this board in the future anyway I think this PR is good to get reviewed.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 16, 2020

Please review license check: travis-ci/licence_check — Needs review, 39 license issues found

@ifyall
Copy link

ifyall commented Mar 16, 2020

@dustin-crossman,

Missing licenses are reported in the following locations:
Found files with missing license details, please review and fix
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/default_wifi_interface.cpp reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/default_wifi_interface.cpp reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/default_wifi_interface.cpp reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/scl_emac.cpp reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/scl_emac.cpp reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/scl_emac.cpp reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/scl_emac.h reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/scl_emac.h reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/scl_emac.h reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/SclSTAInterface.cpp reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/SclSTAInterface.cpp reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/SclSTAInterface.cpp reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/SclSTAInterface.h reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/SclSTAInterface.h reason: Missing SPDX license identifier
File: /features/netsocket/emac-drivers/TARGET_Cypress/COMPONENT_SCL/interface/SclSTAInterface.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_common.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_common.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_common.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_ipc.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_ipc.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_ipc.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_types.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_types.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_types.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_wifi_api.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_wifi_api.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/inc/scl_wifi_api.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/scl_buffer_api.c reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/scl_buffer_api.c reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/scl_buffer_api.c reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/scl_wifi_api.c reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/scl_wifi_api.c reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/scl_wifi_api.c reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/include/scl_buffer_api.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/include/scl_buffer_api.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/include/scl_buffer_api.h reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/IPC/scl_ipc.c reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/IPC/scl_ipc.c reason: Missing SPDX license identifier
File: /targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_SCL/src/IPC/scl_ipc.c reason: Missing SPDX license identifier

Ian

@dustin-crossman
Copy link
Contributor Author

@0xc0170 Fixed up license issues!

@dustin-crossman
Copy link
Contributor Author

@0xc0170 Hey any update on this?

@adbridge
Copy link
Contributor

I'll start the CI in the interim

@mbed-ci
Copy link

mbed-ci commented Mar 27, 2020

Test run: FAILED

Summary: 1 of 6 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 31, 2020

Test restarted

@adbridge
Copy link
Contributor

adbridge commented Apr 2, 2020

@Mergifyio backport mbed-os-5.15

@mergify
Copy link

mergify bot commented Apr 2, 2020

Command backport mbed-os-5.15: failure

No backport have been created

  • Backport to branch mbed-os-5.15 failed

kyle-cypress pushed a commit to kyle-cypress/mbed-os that referenced this pull request Apr 2, 2020
kyle-cypress pushed a commit to kyle-cypress/mbed-os that referenced this pull request Apr 9, 2020
This reverts commit 4e6692b.
There are issues with wifi connectivity on this target that mean
it is not ready to ship with 5.15.2.
artokin pushed a commit to artokin/mbed-os that referenced this pull request Apr 16, 2020
* upstream/mbed-os-5.15: (45 commits)
  Revert "Backport ARMmbed#12603: Add CYSBSYSKIT_01"
  Update STM32 EMAC driver based on review
  Update STM32 EMAC driver - limit RX frame length
  WHD: Remove an assert from get_rssi()
  crypto: Use updated ECC curve macros
  crypto: Update the service for Mbed Crypto 3.x
  crypto: Upgrade to Mbed Crypto 3.1.0
  tls: Upgrade to Mbed TLS 2.20.0
  Backport ARMmbed#12701: Custom BT Firmware for CYW9P62S1_43012EVB_01
  Backport ARMmbed#12603: Add CYSBSYSKIT_01
  Backport ARMmbed#12492: Update psoc6cm0p to version 1.1.1.
  Backport ARMmbed#12422: Cypress Asset Update
  Backport ARMmbed#12421: Cypress target reorganization
  Backport ARMmbed#12394: Fix Cypress 1M SDIO + other minor bugs
  Backport ARMmbed#12097: Cypress: Fix IAR Warnings
  Backport ARMmbed#12052: Fix for ARM issue 11859.
  Backport ARMmbed#12038: Remove qspi_frequency() call.
  Backport ARMmbed#12019: rework cypress lptimer hal
  Cellular: ALT1250 PPP cellular driver for mbed-os 5.15
  RZ_A1H and GR_LYCHEE: Enable bootloader support (Mbed OS 5.15)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants