Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

cc2538-bsl.py is broken for BeaglePlay #106

Open
Ayush1325 opened this issue Jun 5, 2023 · 2 comments
Open

cc2538-bsl.py is broken for BeaglePlay #106

Ayush1325 opened this issue Jun 5, 2023 · 2 comments

Comments

@Ayush1325
Copy link

Ayush1325 commented Jun 5, 2023

Describe the bug
The cc2538-bsl.py script shipped with BeaglePlay debian image does not work for BeaglePlay CC1352 flashing.

Describe which image you are running (example: bone-debian-10.2-iot-armhf-2020-02-03-4gb.img.xz)
am625x-emmc-flasher-debian-11.6-xfce-arm64-2023-02-04-10gb.img.xz

Describe your hardware
BeaglePlay

Describe any Capes Installed

Please run this built-in script
sudo /opt/scripts/tools/version.sh
This script is not present.

To Reproduce
Steps to reproduce the behavior:

  1. Compile a sample (samples/hello_world) for target beagleplay_cc1352.
  2. Flash the zephyr.bin file using cc2538-bsl.py.

Expected behavior
A successful flash:

❯ python cc2538-bsl.py zephyr.bin /dev/ttyS4
CC2538 BSL script customized for Laughing Coyote CC1352P target!
Setting BOOT and RESET low
Setting RESET high
Setting BOOT high
Opening port /dev/ttyS4, baud 50000
Reading data from zephyr.bin
Cannot auto-detect firmware filetype: Assuming .bin
Connecting to target...
CC1350 PG2.0 (7x7mm): 704KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x000AFFD8
Primary IEEE Address: 00:12:4B:00:29:B9:98:1A
    Performing mass erase
Erasing all main bank flash sectors
    Erase done
Writing 720896 bytes starting at address 0x00000000
Write 208 bytes at 0x000AFF300
    Write done
Verifying by comparing CRC32 calculations.
    Verified (match: 0x8da1b3cc)

Actual behavior

❯ cc2538-bsl.py zephyr.bin /dev/ttyS4
Opening port /dev/ttyS4, baud 50000
Reading data from zephyr.bin
Cannot auto-detect firmware filetype: Assuming .bin
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'

Additional context
The script present here works fine for BeaglePlay.

@RobertCNelson
Copy link
Member

i see you were on discord, for the next user, you need to load the overlay to disable auto-loading:

/overlays/k3-am625-beagleplay-bcfserial-no-firmware.dtbo

Regards,

@jadonk
Copy link
Member

jadonk commented Jun 6, 2023

I have a new utility at https://git.beagleboard.org/beagleconnect/cc1352-flasher on the from-20230521 branch that is better at supporting multiple devices and has cleaned-up commits. I'm not sure what else I need to do to make it user-friendly and where I can promote it as an alternative upstream to cc2538-bsl.py.

oh man, just realized this was on github, not git.beagleboard.org. the UI should have figured it for me.

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

No branches or pull requests

3 participants