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

samples: Introduce "simple_txrx" #42

Merged
merged 6 commits into from
Oct 14, 2024

Conversation

jerome-pouiller
Copy link
Contributor

@jerome-pouiller jerome-pouiller commented Sep 19, 2024

This introduce an example of use of Rail library in Zephyr.

This is a reboot of this PR. Compared to the original PR, this version:

  • remove some files imported from Simplicity Studio. Only radio_config.[ch] are kept.
  • drop the useless Finite State Machine

For now only two boards (based xg22 and xg24) are supported. I hope to add support for all the Series-2 boards in the future.

Note Zephyr does not allow to host samples application in HALs. Samples specific to one board and using non-standard APIs are not very welcomed in the main repo. So, the Silabs downstream is probably the best (the only) place to provide publish it.

@jerome-pouiller
Copy link
Contributor Author

v2:

  • rebase
  • fix long lines
  • fix C89 comments

@jerome-pouiller
Copy link
Contributor Author

v3:

  • rebase

@jerome-pouiller jerome-pouiller force-pushed the simple_txrx branch 2 times, most recently from 2b2051a to 96468d3 Compare October 10, 2024 15:00
@jerome-pouiller jerome-pouiller marked this pull request as draft October 10, 2024 15:47
@jerome-pouiller jerome-pouiller force-pushed the simple_txrx branch 2 times, most recently from 509ce1f to dd70fcf Compare October 14, 2024 11:12
<phy name="PHY_Datasheet_2450M_2GFSK_1Mbps_500K"/>
</base_channel_configuration>
</base_channel_configurations>
</multi_phy_configuration>
Copy link
Collaborator

Choose a reason for hiding this comment

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

GitHub seems to complain of a missing newline character at the end of the 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.

I believe GitHub does not complain, it just notifies.

Since this file is generated by a tool, I hesitate to edit it. That's I have already applied (too) many changes to rail-config.[ch].

@@ -46,3 +46,4 @@ jobs:
west twister --test sample.basic.helloworld -p siwx917_rb4338a -v --inline-logs $EXTRA_TWISTER_FLAGS
west twister --test sample.net.wifi -p siwx917_rb4338a -v --inline-logs -K $EXTRA_TWISTER_FLAGS
west twister --test sample.bluetooth.peripheral_hr -p siwx917_rb4338a -v --inline-logs -K $EXTRA_TWISTER_FLAGS
west twister --test sample.rail.simple_txrx -T samples -v --inline-logs $EXTRA_TWISTER_FLAGS
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sort of unrelated to this PR, but I think we should work on cleaning up the ever growing list of west twister ... commands. It should be possible to pass multiple --test parameters to a single twister invocation. Maybe we need to declare arrays or a matrix of platforms + tests in some single place and then pass those to a single twister command. We might also benefit from the "matrix" feature of GitHub workflows, e.g. have a dedicated workflow invocation per platform, or similar: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow#using-a-matrix-strategy

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 already started a patch for that, but since this work was not related to the current PR, I have not included it.

Copy link
Collaborator

@zohavas zohavas left a comment

Choose a reason for hiding this comment

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

As for RAIL and App side, I think the application is ready.

The next patches need last changes applied on hal_silabs.

Signed-off-by: Jérôme Pouiller <[email protected]>
This introduce an example of use of Rail library in Zephyr.

This is a reboot of PR[1]. Compared to the original PR, this version:
  - remove some files imported from Simplicity Studio. Only
    radio_config.[ch] are kept.
  - drop the useless Finite State Machine

[1]: zephyrproject-rtos/hal_silabs#49

For now only two boards (based xg22 and xg24) are supported. I hope to
add support for all the Series-2 boards in the future.

Note Zephyr does not allow to host samples application in HALs. Samples
specific to one board and using non-standard APIs are not very welcomed
in the main repo. So, the Silabs downstream is probably the best (the
only) place to provide publish it.

Also note that files generated by Simplicity Studio (rail_config.*) ends
lines with \r. To pass Zephyr compliance, this patch imports these files
with \r removed:

    sed -i 's/\r//g' */rail_config.[hc]

Signed-off-by: Jérôme Pouiller <[email protected]>
While we don't want to modify generated files, C99 comments generated
hard failures in the Zephyr CI. Until the issue is fixed in upstream, we
edit generated files to remove C99 comments.

Signed-off-by: Jérôme Pouiller <[email protected]>
While we don't want to modify generated files, space indentation
generate hard failures in the Zephyr CI. Until the issue is fixed in
upstream, we reindent generated.

Signed-off-by: Jérôme Pouiller <[email protected]>
@jerome-pouiller jerome-pouiller force-pushed the simple_txrx branch 2 times, most recently from 3cce735 to 472bda9 Compare October 14, 2024 15:58
Blobs are needed for all the tests related to Rail or Bluetooth on
Series-2.

Signed-off-by: Jérôme Pouiller <[email protected]>
Ensure that nobody is going to break the CI.

Signed-off-by: Jérôme Pouiller <[email protected]>
@jerome-pouiller jerome-pouiller marked this pull request as ready for review October 14, 2024 20:17
@jerome-pouiller jerome-pouiller merged commit 6ad0ab3 into SiliconLabsSoftware:main Oct 14, 2024
4 checks passed
@jerome-pouiller
Copy link
Contributor Author

Arg... I forgot to merge hal_silabs first

@jhedberg
Copy link
Collaborator

Arg... I forgot to merge hal_silabs first

Seems like we should really take https://github.com/zephyrproject-rtos/action-manifest into use together with a DNM label and the appropriate branch protections, so that these mistakes don't happen.

@jerome-pouiller
Copy link
Contributor Author

I have to admit the current process is error prone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants