{"id":15907975,"url":"https://github.com/seanmlyons22/ti-lprf-pacs","last_synced_at":"2025-03-21T21:31:55.787Z","repository":{"id":177689459,"uuid":"597787036","full_name":"seanmlyons22/ti-lprf-pacs","owner":"seanmlyons22","description":"Rust Peripheral Access Crates (PACs) for Texas Instruments Low Power RF (LPRF) Microcontrollers","archived":false,"fork":false,"pushed_at":"2025-02-23T16:46:13.000Z","size":8687,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T05:34:31.483Z","etag":null,"topics":["ble","bluetooth","embedded","microcontroller","rust","texas-instruments","zigbee"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seanmlyons22.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-05T16:34:20.000Z","updated_at":"2025-03-13T12:45:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"226b5102-6426-4f6a-8fc4-d5162814afe9","html_url":"https://github.com/seanmlyons22/ti-lprf-pacs","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"c0fd9684ae36c2bbe85b9d90ca47bf621eea57c9"},"previous_names":["seanmlyons22/ti-lprf-pacs"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmlyons22%2Fti-lprf-pacs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmlyons22%2Fti-lprf-pacs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmlyons22%2Fti-lprf-pacs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanmlyons22%2Fti-lprf-pacs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seanmlyons22","download_url":"https://codeload.github.com/seanmlyons22/ti-lprf-pacs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244874383,"owners_count":20524577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ble","bluetooth","embedded","microcontroller","rust","texas-instruments","zigbee"],"created_at":"2024-10-06T14:08:15.402Z","updated_at":"2025-03-21T21:31:50.762Z","avatar_url":"https://github.com/seanmlyons22.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PACs for Texas Instruments Low Power RF microcontrollers\n\n![CI](https://github.com/seanmlyons22/ti-lprf-pacs/actions/workflows/ci.yml/badge.svg)\n\nThis repository contains Peripheral Access Crates (PACs) for TI's Low Power RF\n(LPRF) series of Cortex-M microcontrollers.\n\nAll these crates are automatically generated using [svd2rust] and [tixml2svd].\n\n## Crates\n\nEvery device family within the LPRF chip series has its own PAC.\nA device family is how TI groups similar devices that share the same peripherals.\nIn this naming scheme `x` is a wildcard. i.e. a CC2652 and CC1312 both belong\nto the cc13x2_26x2 family.\n\nTo prevent lots of repetition in the crates, there is one PAC per device family,\nnot per device.\n\nThe PACs are listed below:\n\n| PAC                 | Supported Devices                                                                      | TI SDK Link                                                                        | target                       |\n|---------------------|----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|------------------------------|\n| `cc13x0`            | CC1310, CC1350                                                                         | https://www.ti.com/tool/download/SIMPLELINK-CC13X0-SDK                             | `thumbv7m-none-eabi`         |\n| `cc13x1_cc26x1`     | CC1311P3, CC1311R3, CC2651P3, CC2651R3, CC2651R3SIPA                                   | https://github.com/TexasInstruments/cc13xx_cc26xx_sdk                              | `thumbv7em-none-eabi`        |\n| `cc13x2_26x2`       | CC2642R, CC2652R, CC2652RB, CC1312R, CC1352R, CC1352P, CC2652P, CC2652PSIP, CC2652RSIP | https://github.com/TexasInstruments/cc13xx_cc26xx_sdk                              | `thumbv7em-none-eabihf`      |\n| `cc13x2x7_cc26x2x7` | CC1312R7, CC1352P7, CC2652P7, CC2652R7                                                 | https://github.com/TexasInstruments/cc13xx_cc26xx_sdk                              | `thumbv7em-none-eabihf`      |\n| `cc13x4_cc26x4`     | CC1314R, CC1354R, CC1354P, CC2674R, CC2674P                                            | https://github.com/TexasInstruments/cc13xx_cc26xx_sdk                              | `thumbv8m.main-none-eabihf`  |\n| `cc2640r2`          | CC2640R2                                                                               | https://www.ti.com/tool/download/SIMPLELINK-CC2640R2-SDK                           | `thumbv7m-none-eabi`         |\n\n**Warning**: The `cc13x2_26x2` PAC crate is named differently (note the missing cc before 26x2) due to the fact that\nother (non maintained) cc13x2_cc26x2 crates exist.\n\n## How it works\n\nThis repo tries to automate as much as possible using [tixml2svd] and [svd2rust].\nThis section seeks to describe how this repo is built.\n\nTo see how the code is organized, try running the command below\n\n```\n$ tree -L 2\n```\nThis should give an output similar to below:\n\n```\n.\n├── Cargo.lock\n├── Cargo.toml\n├── CONTRIBUTING.md\n├── input\n│   ├── devices\n│   └── Modules\n├── LICENSE.txt\n├── pacs\n│   ├── cc13x0\n│   ├── cc13x1_cc26x1\n│   ├── cc13x2_26x2\n│   ├── cc13x2x7_cc26x2x7\n│   ├── cc13x4_cc26x4\n│   └── cc2640r2\n├── README.md\n├── svds\n│   ├── cc13x0.svd\n│   ├── cc13x1_cc26x1.svd\n│   ├── cc13x2_26x2.svd\n│   ├── cc13x2x7_cc26x2x7.svd\n│   ├── cc13x4_cc26x4.svd\n│   └── cc2640r2.svd\n├── tests\n│   ├── cc13x0\n│   ├── cc13x2-cc26x2\n│   ├── cc13x4-cc26x4\n│   └── cc2640r2\n├── tools\n│   └── generate_pacs.py\n└── xtask\n    ├── Cargo.toml\n    └── src\n\n27 directories, 15 files\n```\n\nThe creation of pacs from the input XML files is automated using\n`tools/generate_pacs.py`.\n\n### Input files\n\nThe `input` directory contains the device definition files from TI. They can be\ncopied from a\n[Code Composer Studio](https://www.ti.com/tool/CCSTUDIO#downloads) (CCS)\ninstallation.\n\nThe files within the `Modules` folder define the peripheral set of the devices\nin a TI XML format.\n\nThese files are used to generate `svd` files using [tixml2svd].\n\nThe XML files within `input/devices` are hand maintained. They are based upon\ndevice families.  One XML file within `input/devices` will produce one PAC.\n\n### Patches\n\nThe TI XML source doesn't contain interrupt defintions. So there are also hand\nmaintained rust files that contain the needed code to define the interrupt\nvector table in Rust. These files are used to patch the generated\n`lib.rs` file. Ideally the SVD files would also be patched, but this is a bit\nmore complex, so we use a simpler solution, for now.\n\n### Adding or Updating Devices\n\nTo update the source files, copy the `Modules` folder from\n`\u003cINSTALL_LOC\u003e/ti/ccs\u003cCCS_VER\u003e/ccs/ccs_base/common/targetdb/`\ninto `input/Modules` folder within this repository. `\u003cINSTALL_LOC\u003e` is the\nlocation you installed CCS. `\u003cCCS_VER\u003e` is the version of CCS you installed\nwithout any `.` or other delimiter so 12.2.0 becomes 1220.\n\n1. Copy the files from CCS as described above\n1. If adding a new device family, create a device family XML descriptor in\n   `input/devices/`.\n    - Tip: These can be copied from CCS\n      `\u003cINSTALL_LOC\u003e/ti/ccs\u003cCCS_VER\u003e/ccs/ccs_base/common/targetdb/devices`.\n    - Pick one device from your wanted family and copy it into the tree and\n      rename it\n1. If adding a new device family, create `device_family_ints.rs` where swapping\n   `device_family` with the device family name.\n   - For a hint, use the C file created by TI. It can be found in\n     `\u003cTI_SDK\u003e/source/ti/devices/\u003cdevice_family\u003e/inc/hw_ints.h`.\n1. Run `cargo xtask generate`\n1. Update `device.x` based on the vector table you created in the last step\n\n[svd2rust]: https://github.com/rust-embedded/svd2rust\n[tixml2svd]: https://github.com/dhoove/tixml2svd\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanmlyons22%2Fti-lprf-pacs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanmlyons22%2Fti-lprf-pacs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanmlyons22%2Fti-lprf-pacs/lists"}