Skip to content

Instantly share code, notes, and snippets.

@kolomiichenko
Forked from kidpixo/cc-tool_macosx.md
Last active December 22, 2020 22:24
Show Gist options
  • Save kolomiichenko/88b48408a6ee1bf8594c5920dda41066 to your computer and use it in GitHub Desktop.
Save kolomiichenko/88b48408a6ee1bf8594c5920dda41066 to your computer and use it in GitHub Desktop.

Revisions

  1. kolomiichenko revised this gist Dec 22, 2020. 1 changed file with 2 additions and 37 deletions.
    39 changes: 2 additions & 37 deletions cc-tool_macosx.md
    Original file line number Diff line number Diff line change
    @@ -38,43 +38,8 @@ make
    ## now test the executable
    ./cc-tool --help

    Texas Instruments 8051-based System-On-Chip device programmer
    Version: 0.26

    Command line options:
    -h [ --help ] produce help message
    --log arg create log of all operations
    -d [ --device ] arg set programmer deivce usb address 'bus:device'
    -f [ --fast ] set fast debug interface speed (by default:
    slow)
    -n [ --name ] arg specify target name e.g. CC2530 etc.
    --allow-overlapping-records allow overlapping records in hex files, the
    last one wins (by default: they are
    disallowed)
    -i [ --read-info-page ] arg read info pages
    -a [ --read-mac-address ] read mac address(es)
    -b [ --write-mac-address ] arg write (secondary) mac address
    -p [ --preserve-mac-address ] preserve (secondary) mac address across
    writing
    -r [ --read ] arg read flash memory
    -e [ --erase ] erase flash memory
    -w [ --write ] arg write flash memory.
    -v [ --verify ] arg verify flash after write, method '(r)ead' or
    '(c)cr' (used by default)
    --reset perform target reset
    -t [ --test ] search for programmer and target
    -l [ --lock ] arg specify lock data in hex numbers or by string:
    debug[;pages:xx]
    -s [ --flash-size ] arg specify target flash size in KB

    Supported targets:
    CC2530 CC2531 CC2533 CC2540 CC2541 CC2543 CC2544 CC2545 CC2510 CC2511 CC1111 CC1110 CC2430 CC2431

    Supported programmers:
    VID: 0x0451 PID: 0x16a2 Description: CC Debugger
    VID: 0x11a0 PID: 0xdb20 Description: SmartRF04 Evaluation Board
    VID: 0x11a0 PID: 0xeb20 Description: SmartRF04 Evaluation Board (Chinese)
    VID: 0x0451 PID: 0x16a0 Description: SmartRF05 Evaluation Board
    ## flash firmware.hex into device
    sudo ./cc-tool -e -w firmware.hex


    ```
  2. kolomiichenko revised this gist Dec 22, 2020. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions cc-tool_macosx.md
    Original file line number Diff line number Diff line change
    @@ -21,14 +21,14 @@ Then, be sure to use `clang++` instead `g++` from macport or wathever you have i
    Include boost (c++) library from system (homebrew automagically symlink them under `/opt/local/{bin,include}`) like:

    ```bash
    CC=/opt/local/bin/clang \
    CXX=/opt/local/bin/clang++ \
    CC=/usr/bin/clang \
    CXX=/usr/bin/clang++ \
    LDFLAGS=-I/usr/local/include \
    CPPFLAGS=-I/usr/local/include \
    ./bootstrap

    CC=/opt/local/bin/clang \
    CXX=/opt/local/bin/clang++ \
    CC=/usr/bin/clang \
    CXX=/usr/bin/clang++ \
    LDFLAGS=-I/usr/local/include \
    CPPFLAGS=-I/usr/local/include \
    ./configure
  3. @kidpixo kidpixo revised this gist Feb 25, 2019. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions cc-tool_macosx.md
    Original file line number Diff line number Diff line change
    @@ -11,9 +11,11 @@
    ## Compile cc-tool

    Following [1](https://www.zigbee2mqtt.io/getting_started/flashing_the_cc2531.html) :
    `brew install autoconf automake libusb boost pkgconfig libtool ##install needed tools to compile the tool :-D
    ```bash
    brew install autoconf automake libusb boost pkgconfig libtool ##install needed tools to compile the tool :-D
    git clone https://github.com/dashesy/cc-tool.git
    cd cc-tool\`
    cd cc-tool\
    ```

    Then, be sure to use `clang++` instead `g++` from macport or wathever you have in path.
    Include boost (c++) library from system (homebrew automagically symlink them under `/opt/local/{bin,include}`) like:
  4. @kidpixo kidpixo created this gist Feb 25, 2019.
    78 changes: 78 additions & 0 deletions cc-tool_macosx.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,78 @@
    # Use CC-tool for CC253X on my mac

    ## Links

    1. [Flashing the firmware on the CC2531 USB stick | zigbee2mqtt.io](https://www.zigbee2mqtt.io/getting_started/flashing_the_cc2531.html)
    2. [dashesy/cc-tool: Mirror of cc-tool from SourceForge](https://github.com/dashesy/cc-tool)
    3. [compiling - What is the correct syntax to add CFLAGS and LDFLAGS to "configure"? - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/149359/what-is-the-correct-syntax-to-add-cflags-and-ldflags-to-configure)
    4. [Compiling Boost with GCC or Clang on macOS | Solarian Programmer](https://solarianprogrammer.com/2018/08/07/compiling-boost-gcc-clang-macos/)


    ## Compile cc-tool

    Following [1](https://www.zigbee2mqtt.io/getting_started/flashing_the_cc2531.html) :
    `brew install autoconf automake libusb boost pkgconfig libtool ##install needed tools to compile the tool :-D
    git clone https://github.com/dashesy/cc-tool.git
    cd cc-tool\`

    Then, be sure to use `clang++` instead `g++` from macport or wathever you have in path.
    Include boost (c++) library from system (homebrew automagically symlink them under `/opt/local/{bin,include}`) like:

    ```bash
    CC=/opt/local/bin/clang \
    CXX=/opt/local/bin/clang++ \
    LDFLAGS=-I/usr/local/include \
    CPPFLAGS=-I/usr/local/include \
    ./bootstrap

    CC=/opt/local/bin/clang \
    CXX=/opt/local/bin/clang++ \
    LDFLAGS=-I/usr/local/include \
    CPPFLAGS=-I/usr/local/include \
    ./configure

    make

    ## now test the executable
    ./cc-tool --help

    Texas Instruments 8051-based System-On-Chip device programmer
    Version: 0.26

    Command line options:
    -h [ --help ] produce help message
    --log arg create log of all operations
    -d [ --device ] arg set programmer deivce usb address 'bus:device'
    -f [ --fast ] set fast debug interface speed (by default:
    slow)
    -n [ --name ] arg specify target name e.g. CC2530 etc.
    --allow-overlapping-records allow overlapping records in hex files, the
    last one wins (by default: they are
    disallowed)
    -i [ --read-info-page ] arg read info pages
    -a [ --read-mac-address ] read mac address(es)
    -b [ --write-mac-address ] arg write (secondary) mac address
    -p [ --preserve-mac-address ] preserve (secondary) mac address across
    writing
    -r [ --read ] arg read flash memory
    -e [ --erase ] erase flash memory
    -w [ --write ] arg write flash memory.
    -v [ --verify ] arg verify flash after write, method '(r)ead' or
    '(c)cr' (used by default)
    --reset perform target reset
    -t [ --test ] search for programmer and target
    -l [ --lock ] arg specify lock data in hex numbers or by string:
    debug[;pages:xx]
    -s [ --flash-size ] arg specify target flash size in KB

    Supported targets:
    CC2530 CC2531 CC2533 CC2540 CC2541 CC2543 CC2544 CC2545 CC2510 CC2511 CC1111 CC1110 CC2430 CC2431

    Supported programmers:
    VID: 0x0451 PID: 0x16a2 Description: CC Debugger
    VID: 0x11a0 PID: 0xdb20 Description: SmartRF04 Evaluation Board
    VID: 0x11a0 PID: 0xeb20 Description: SmartRF04 Evaluation Board (Chinese)
    VID: 0x0451 PID: 0x16a0 Description: SmartRF05 Evaluation Board


    ```