JelmerT / cc2538-bsl

Python cross-platform script to upload firmware via the serial boot loader onto the CC13xx, CC2538 and CC26xx SoC.
BSD 3-Clause "New" or "Revised" License
506 stars 176 forks source link

[REQUEST] Backport improvements from "CC1352 Flasher" fork by the BeagleConnect project #154

Open Hedda opened 7 months ago

Hedda commented 7 months ago

BeagleConnect project has a fork of cc2538-bsl called "cc1352-flasher" written by @jadonk and they added a few improvements:

https://openbeagle.org/beagleconnect/cc1352-flasher

https://git.beagleboard.org/beagleconnect/cc1352-flasher

https://pypi.org/project/cc1352-flasher/

@JelmerT suggest you consider backporting their improvements if they do not themself submit pull requests to upstream repo.

Note! While the cc1352-flasher code is also available on GitHub it looks to be lagging behind the code in openbeagle.org repo:

https://github.com/beagleboard/cc1352-flasher

Hedda commented 7 months ago

FYI, there are also these additional downstream forks of that "cc1352-flasher" code which have added further improvements, ex:

https://github.com/mercenaruss/cc1352-flasher by @mercenaruss

as well as in turn forks of it, like:

https://github.com/tube0013/tubeszb_addons/tree/main/tzb-cc2652-flasher by @tube0013

jadonk commented 7 months ago

I'm happy to put together properly formatted pull requests for specific features. I'd rebased several times in hopes of getting things cleaned up to submit here, but I got the impression there wasn't interest in continuing to maintain it. I am only interested in cc1352 (p1/p7) flashing on Beagle platforms and making it easier to use for Beagle users, specifically with Zephyr.

Ayush1325 commented 7 months ago

I will also be happy to help with the effort and improve the flasher.

I have created a argparse PR for a start.

Hedda commented 7 months ago

FYI, tip if using Home Assistant is to check out these addons that are also reply on / are based on cc2538-bsl (or cc1352-flasher):

JelmerT commented 5 months ago

@Hedda @jadonk @Ayush1325 I'm more than happy to backport all these changes back into this script! feel free to submit a PR. Could take a little time for me to check them, but will get merged eventually!

jadonk commented 5 months ago

Nice. What order should we stage updates? We recently updated to put it on pypi.

jadonk commented 5 months ago

I've been thinking I want to set some defaults based on the name or symlink of the executable script.

Hedda commented 3 weeks ago

@jadonk @Ayush1325 @git-developer Did you see Texas Instruments forked cc2538-bsl and are including it in SimpleLink SDK?

Originally posted by @Hedda in https://github.com/JelmerT/cc2538-bsl/issues/160#issuecomment-2268689860

The SIMPLELINK-CC13XX-CC26XX-SDK 7.41.00.17 contains a modified version of cc2538-bsl with support for newer TI chips

Do you have link to the source code?

Here is the link for 7.40.00.77 update (from 5 months ago) but I could not find links to new 7.41.00.17 update on GitHub:

https://github.com/TexasInstruments/simplelink-lowpower-f2-sdk/tree/main/source/third_party/cc2538-bsl

Maybe the 7.41.00.17 update does not contain any updates to the third-party cc2538-bsl code?

https://github.com/TexasInstruments/simplelink-lowpower-f2-sdk/blob/main/source/third_party/cc2538-bsl/ti-python-sbl.py

@JelmerT Any chance you could have a look and create a patch to this upstream repo if those changes are of interest?

PS: Cool that Texas Instruments is using cc2538-bsl, even if it is a modified fork instead of submitting patches to upstream :)

jadonk commented 3 weeks ago

Didn't see that. Thanks for the news. This is also a ping for me to work on the PRs.

Ayush1325 commented 3 weeks ago

So, just for reference there are now 2 more independent flashing implementations now (mostly for cc1352p7 but can be easily extended):

  1. Linux kernel: https://lore.kernel.org/r/20240801-beagleplay_fw_upgrade-v2-0-e36928b792db@beagleboard.org
  2. bb-imager-rs: https://openbeagle.org/ayush1325/bb-imager-rs
Hedda commented 2 weeks ago

FYI, @tl-sl has worked on a cc2538-bsl based web flasher with support for CC2674P P10 (CC2674P10) for @smlight-tech now:

That webflasher depends on their "smlight_cc_flasher" project which in turn is another fork of JelmerT's cc2538-bsl project:

@darkxst wrote smlight-cc-flasher is based on a heavily modified + improved fork of JelmerT's cc2538-bsl project, tTested with the new experimental SMLIGHT SLZB-07p10 Zigbee Coordinator USB adapter based in CC2674P P10 (CC2674P10) they released:

PS: Please also see related issue tracker requesting support for CC2674 (CC2674P/CC2674R) and CC1354 (CC1354P) compatibility: