Skip to content

Firmware install with CC Tool (Linux)

mikkel75 edited this page Oct 18, 2017 · 25 revisions

#Install development tools

If you never compiled software on your Pi, run the following:

    sudo apt-get update
    sudo apt-get install build-essential

or if you're on Linux, use the following command to update your build tools

    sudo apt-get update
    sudo apt-get install linux-headers-$(uname -r) build-essential

#Install needed libraries

    sudo apt-get update
    sudo apt-get install -y sdcc
    sudo apt-get install libusb-1.0-0-dev libboost-all-dev

#Install cc-tool

cd ~/
curl -L -o cc-tool-0.26-src.tgz 'http://downloads.sourceforge.net/project/cctool/cc-tool-0.26-src.tgz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fcctool%2F&ts=1452988690&use_mirror=netassist'
tar zxvf cc-tool-0.26-src.tgz
cd cc-tool
./configure

Troubleshooting: If you receive this error, it means you're running too recent a version of Boost (eg: you're on Ubuntu 14.10). Currently there's no fix for this - please consider running an older Ubuntu virtual machine for the build, or using an older Pi:

checking for Boost's header version...
configure: error: invalid value: boost_major_version=

Try out the fix for above problem from here: https://github.com/w-shackleton/droidpad-pc/issues/2

Edit src/programmer/cc_programmer.cpp and change the line

USB_SET_CHIP_INFO, 1, 1, &command[0], command.size());

to

USB_SET_CHIP_INFO, 1, 0, &command[0], command.size());

Then save the file. This line can be found under void CC_Programmer::enter_debug_mode()

make              # Can take a while on a Raspberry Pi
sudo make install

git clone https://github.com/ps2/subg_rfspy.git
cd subg_rfspy
git checkout dev
make -f Makefile.uart0_alt1 BOARD_TYPE=SRF_ERF

Writing the firmware

  1. If using ERF, head back here to finish
  2. If using TI-Stick, then * Plug your debugger into your machine running CC-Tool. * Plug your TI stick's USB into power. * Plug the other end onto your TI stick labeled DEBUG with the right stripe inwards towards the USB end of the board. * Press the reset button on your CC-Debugger. Make sure it is a green light before moving on.
    • Debug if red light: Test flipping the connection between the TI-Stick and the debugger. Also, make sure that you have power to TI-stick via USB connection. * Flash it with sudo cc-tool --log install.log -ew PATH-TO-YOUR-HEX-FILE.hex