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

Missing initial firmware for new SPIKE Prime Hub (v0.5.01.0000-42a938e) #3

Open
gpdaniels opened this issue Oct 23, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed project - firmware For issues about the hub firmware

Comments

@gpdaniels
Copy link
Owner

gpdaniels commented Oct 23, 2020

If you have a brand new SPIKE Prime hub running the below script will allow you to copy the firmware from the device.
This requires a linux machine (I used ubuntu 18.04)

# Install the dfu-util program if you do no already have it.
# sudo apt-get install dfu-util

# List the connected devices, this should show the hub is connected.
sudo dfu-util --list

# Read the firmware.
sudo dfu-util --alt 0 --dfuse-address 0x08000000:1048576 --upload ~/firmware.bin

# Take ownership of the file created by the dfu-util program.
sudo chown $(whoami) ~/firmware.bin

# Remove the first 0x8000 bytes, as these are before the firmware starts.
fallocate -c -o 0 -l 32768 ~/firmware.bin

# Remove the trailing bytes that have the value 0xFF, as these are unnecessary.
sed -i '$ s/\xFF*$//' ~/firmware.bin

# Rename the firmware to the md5 hash of itself.
mv ~/firmware.bin ~/$(md5sum ~/firmware.bin | awk '{ print $1 }').bin

I foolishly updated my hub before ripping the firmware.

@gpdaniels gpdaniels added enhancement New feature or request help wanted Extra attention is needed project - firmware For issues about the hub firmware labels Oct 23, 2020
@gpdaniels gpdaniels self-assigned this Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed project - firmware For issues about the hub firmware
Projects
None yet
Development

No branches or pull requests

1 participant