Skip to content

Conversation

@Ayush1325
Copy link
Member

There seem to be a decent number of C5 boards around. So add support for it while keeping C7 as the default version.

The main difference between C7 and C5 is that C5 uses CC1352P instead of CC1352P7

Comment on lines 12 to 18
if("${BOARD_QUALIFIERS}" MATCHES "/cc1352p7$" AND "${BOARD_REVISION}" STREQUAL "C5")
set(ACTIVE_BOARD_REVISION "C7")
message(WARNING "C5 only supports CC1352P. Using C7 instead.")
endif()

if("${BOARD_QUALIFIERS}" MATCHES "/cc1352p$" AND "${BOARD_REVISION}" STREQUAL "C7")
set(ACTIVE_BOARD_REVISION "C5")
message(WARNING "C7 only supports CC1352P7. Using C5 instead.")
endif()
Copy link
Contributor

Choose a reason for hiding this comment

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

this should check from the first character until either the end of the line or until a /, this code prevents users extending a board out of tree, and it should also not be changing the revision, if there is no revision provided then there can be a default set but do not override what the user has put, throw an error

Copy link
Member Author

@Ayush1325 Ayush1325 Nov 17, 2025

Choose a reason for hiding this comment

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

So, throwing the error breaks CI since there was no way I could find to tie an soc to a specific revision.
It was discussed here: #95065

Copy link
Contributor

@nordicjm nordicjm Nov 17, 2025

Choose a reason for hiding this comment

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

It uses the twister files you have, if there is no .yaml for a board target then twister will not try to use it, and you need to have the revisions in the .yaml files for the twister board name. You should probably not set a default revision anyway since it isn't valid for one of the SoCs, people should provide the correct revision

Copy link
Member Author

Choose a reason for hiding this comment

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

It uses the twister files you have, if there is no .yaml for a board target then twister will not try to use it, and you need to have the revisions in the .yaml files for the twister board name. You should probably not set a default revision anyway since it isn't valid for one of the SoCs, people should provide the correct revision

Do you mean this file boards/beagle/beagleconnect_freedom/beagleconnect_freedom_cc1352p7.yaml? It can have a revisions field?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

@nordicjm I think I might be missing something. I cannot seem to use the names with the revision in platform_allow or exclude lists.

Copy link
Contributor

Choose a reason for hiding this comment

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

you need to have the twister .yaml files, it uses the names exactly as they are from those

Copy link
Member Author

Choose a reason for hiding this comment

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

@nordicjm Can you check the PR now. It seems like I can add variants to board.yml.
Also, you also mentioned the following:

this code prevents users extending a board out of tree

Do you mean I should remove the check that the provided revision is either C5 or C7? Or is that fine?

@zephyrbot zephyrbot added area: Flash area: Tests Issues related to a particular existing or missing test labels Nov 18, 2025
@Ayush1325 Ayush1325 force-pushed the bcf-c5 branch 2 times, most recently from 05ff41d to 788135b Compare November 18, 2025 15:55
Comment on lines 15 to 19
variants:
- name: beagleconnect_freedom@C5
qualifier: "cc1352p"
- name: beagleconnect_freedom@C7
qualifier: "cc1352p7"
Copy link
Contributor

Choose a reason for hiding this comment

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

err this is not what variants are used for no

Suggested change
variants:
- name: beagleconnect_freedom@C5
qualifier: "cc1352p"
- name: beagleconnect_freedom@C7
qualifier: "cc1352p7"

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, I have tried adding a twister.yaml file. However, twister does still try building for wrong variants. So not sure what I am doing incorrectly.

Copy link
Contributor

Choose a reason for hiding this comment

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

No not a twister.yaml file, twister yaml files, so beagleconnect_freedom_cc1352p_C5.yaml with the specifiers and details for that then beagleconnect_freedom_cc1352p7_C7 with the specifiers and details for that one

Copy link
Member Author

Choose a reason for hiding this comment

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

According to twister internals, *.yaml other than twister.yaml are categorized as legecy files:

file for file in board_dir.glob("*.yaml") if file.name != "twister.yaml"

I am pretty sure I tried what you are mentioning here, and it did not work, but let me push that again.

Copy link
Contributor

Choose a reason for hiding this comment

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

@PerMac if you cannot fit the behaviour here into twister.yaml files then please remove the comment about multiple twister files being legacy and work towards that because twister.yaml files would then absolutely not fit what is required.
@Ayush1325 use multiple twister files

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I stand corrected. It works. Will create a PR to do the same with PocketBeagle 2 revisions.

revision:
format: custom
exact: true
default: "C7"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
default: "C7"

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Comment on lines 3 to 7
# If BOARD_REVISION not set, use the default revision
if(NOT DEFINED BOARD_REVISION)
set(BOARD_REVISION ${LIST_BOARD_REVISION_DEFAULT})
endif()

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# If BOARD_REVISION not set, use the default revision
if(NOT DEFINED BOARD_REVISION)
set(BOARD_REVISION ${LIST_BOARD_REVISION_DEFAULT})
endif()

Copy link
Member Author

@Ayush1325 Ayush1325 Nov 20, 2025

Choose a reason for hiding this comment

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

Done.

endif()

if("${BOARD_QUALIFIERS}" MATCHES "^/cc1352p7$" AND "${BOARD_REVISION}" STREQUAL "C5")
message(FATAL_ERROR "C5 only supports CC1352P. Using C7 instead.")
Copy link
Contributor

Choose a reason for hiding this comment

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

*use, as for below

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@zephyrbot zephyrbot requested a review from nordicjm November 19, 2025 12:37
@Ayush1325 Ayush1325 force-pushed the bcf-c5 branch 5 times, most recently from 4c5c8d2 to 385bb6b Compare November 20, 2025 08:47
nordicjm
nordicjm previously approved these changes Nov 20, 2025
@jadonk
Copy link
Member

jadonk commented Nov 27, 2025

I don't see any updates to the documentation.

Is there any change in building? Can I still do west build -b beagleconnect_freedom . and get a C7 build?

Are you sure the terminology is "CC1352P" and not "CC1352P1"? I know ti.com seems to have it under "cc1352p", but that seems to be before they introduced the others.

Looking around for a family overview largely comes up empty, but I did find a hardware architecture section in the SDK docs:

  • For CC13x1 and CC26x1 devices the system core is ARM Cortex M4
  • For CC13x2 and CC26x2 devices the system core is ARM Cortex M4F
  • For CC13x4 and CC26x4 devices the system core is ARM Cortex M33

...

Device Flash (kB) SRAM (kB)
CC13x1x3 or CC26x1x3 352 40
CC13x2x1 or CC26x2x1 352 80
CC13x2x7 or CC26x2x7 704 144
CC13x4x10 or CC26x4x10 1024 256

I don't see in either of those sections any use of the CC1352P without the CC1352P1.

@Ayush1325
Copy link
Member Author

Ayush1325 commented Nov 27, 2025

Are you sure the terminology is "CC1352P" and not "CC1352P1"? I know ti.com seems to have it under "cc1352p", but that seems to be before they introduced the others.

Well, TI certainly seems to be only using CC1352P and CC1352P7 in most of the public docs. Additionally, zephyr already has the soc added as CC1352P (and CC1352R): https://github.com/zephyrproject-rtos/zephyr/tree/main/soc/ti/simplelink. So any name change now would involve tree-wide changes to drivers launchxl board.

Looking around for a family overview largely comes up empty, but I did find a hardware architecture section in the SDK docs:

* For CC13x1 and CC26x1 devices the system core is ARM Cortex M4

* For CC13x2 and CC26x2 devices the system core is ARM Cortex M4F

* For CC13x4 and CC26x4 devices the system core is ARM Cortex M33

...
Device Flash (kB) SRAM (kB)
CC13x1x3 or CC26x1x3 352 40
CC13x2x1 or CC26x2x1 352 80
CC13x2x7 or CC26x2x7 704 144
CC13x4x10 or CC26x4x10 1024 256

I don't see in either of those sections any use of the CC1352P without the CC1352P1.

The product page listss only CC1352P: https://www.ti.com/product/CC1352P. Also in alternatives, it lists CC1352P7, CC1352R (not R1) and CC1312R.

@Ayush1325
Copy link
Member Author

I don't see any updates to the documentation.

Is there any change in building? Can I still do west build -b beagleconnect_freedom . and get a C7 build?

No, you cannot do west build -b beagleconnect_freedom .. The full board name is required now. So beagleconnect_freedom@C7/cc1352p7.
With that said, the docs currently do not have any build instructions: https://docs.zephyrproject.org/latest/boards/beagle/beagleconnect_freedom/doc/index.html
I can add some details regarding the C1 rev in the docs in this PR if required. However, I think it would be better to do a major PR to update and improve docs separately, since currently the docs are pretty much empty.

@kartben
Copy link
Contributor

kartben commented Nov 27, 2025

I don't see any updates to the documentation.
Is there any change in building? Can I still do west build -b beagleconnect_freedom . and get a C7 build?

No, you cannot do west build -b beagleconnect_freedom .. The full board name is required now.

don't you want to set a default revision though?

@Ayush1325
Copy link
Member Author

I don't see any updates to the documentation.
Is there any change in building? Can I still do west build -b beagleconnect_freedom . and get a C7 build?

No, you cannot do west build -b beagleconnect_freedom .. The full board name is required now.

don't you want to set a default revision though?

Well, @nordicjm suggested to not have a default revision since the SoCs are different here: #99489 (comment)

It would be nice to have C7 as the default, since C5 only existed as prototypes from what I understand.

There seem to be a decent number of C5 boards around. So add support for
it while keeping C7 as the default version.

The main difference between C7 and C5 is that C5 uses CC1352P instead
of CC1352P7

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
@sonarqubecloud
Copy link

@jukkar jukkar removed their request for review December 1, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: Flash area: mcumgr area: Networking area: PWM Pulse Width Modulation area: Samples Samples area: Sockets Networking sockets area: Tests Issues related to a particular existing or missing test platform: BeagleBoard BeagleBoard.org Foundation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants