Giter Club home page Giter Club logo

cc-tool's People

Contributors

alexmekkering avatar alteholz avatar andrei-golubov avatar berkovskyy avatar bnutz avatar dashesy avatar ffontaine avatar joaofl avatar maciejsszmigiero avatar misham avatar tiagoshibata avatar tpetazzoni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cc-tool's Issues

Fail to compile on Ubuntu Ubuntu 20.04.2 LTS

I have run the required packet installation
sudo apt install libusb-1.0-0-dev libboost-all-dev autoconf libtool

Bootstrap runs ok
./bootstrap

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:8: installing './compile'
configure.ac:5: installing './missing'
autoreconf: Leaving directory `.'

However configure fails

./configure

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for Boost headers version >= 1.39.0... yes
checking for Boost's header version... 1_71
checking for the toolset name used by Boost for g++... configure: WARNING: could not figure out which toolset name to use for g++

checking boost/program_options.hpp usability... yes
checking boost/program_options.hpp presence... yes
checking for boost/program_options.hpp... yes
checking for the Boost program_options library... yes
checking boost/system/error_code.hpp usability... yes
checking boost/system/error_code.hpp presence... yes
checking for boost/system/error_code.hpp... yes
checking for the Boost system library... (cached) yes
checking boost/regex.hpp usability... yes
checking boost/regex.hpp presence... yes
checking for boost/regex.hpp... yes
checking for the Boost regex library... (cached) yes
checking for boost/system/error_code.hpp... (cached) yes
checking for the Boost system library... (cached) yes
checking boost/filesystem/path.hpp usability... yes
checking boost/filesystem/path.hpp presence... yes
checking for boost/filesystem/path.hpp... yes
checking for the Boost filesystem library... (cached) yes
checking boost/foreach.hpp usability... yes
checking boost/foreach.hpp presence... yes
checking for boost/foreach.hpp... yes
checking boost/scoped_ptr.hpp usability... yes
checking boost/scoped_ptr.hpp presence... yes
checking for boost/scoped_ptr.hpp... yes
checking boost/shared_ptr.hpp usability... yes
checking boost/shared_ptr.hpp presence... yes
checking for boost/shared_ptr.hpp... yes
checking boost/algorithm/string.hpp usability... yes
checking boost/algorithm/string.hpp presence... yes
checking for boost/algorithm/string.hpp... yes
checking boost/signals2.hpp usability... yes
checking boost/signals2.hpp presence... yes
checking for boost/signals2.hpp... yes
checking boost/crc.hpp usability... yes
checking boost/crc.hpp presence... yes
checking for boost/crc.hpp... yes
./configure: line 13102: syntax error near unexpected token `LIBUSB,'
./configure: line 13102: `PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0)'

Any idea what causes this issue?
Can it be related to the warning
checking for the toolset name used by Boost for g++... configure: WARNING: could not figure out which toolset name to use for g++

Static configuration / compilation not working?

Configuring with ./configure --enable-static --enable-static-boost --disable-shared and building on the Pi still seems to result in the following:

$ ldd cc-tool
        linux-vdso.so.1 (0xbef9c000)
        /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6f1a000)
        libusb-1.0.so.0 => /lib/arm-linux-gnueabihf/libusb-1.0.so.0 (0xb6ef5000)
        libboost_filesystem.so.1.67.0 => /usr/lib/arm-linux-gnueabihf/libboost_filesystem.so.1.67.0 (0xb6ece000)
        libboost_regex.so.1.67.0 => /usr/lib/arm-linux-gnueabihf/libboost_regex.so.1.67.0 (0xb6dd7000)
        libboost_system.so.1.67.0 => /usr/lib/arm-linux-gnueabihf/libboost_system.so.1.67.0 (0xb6dc3000)
        libboost_program_options.so.1.67.0 => /usr/lib/arm-linux-gnueabihf/libboost_program_options.so.1.67.0 (0xb6d42000)
        libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6bfb000)
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6b79000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6b4c000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb69fe000)
        libudev.so.1 => /lib/arm-linux-gnueabihf/libudev.so.1 (0xb69ce000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb69a4000)
        /lib/ld-linux-armhf.so.3 (0xb6f2f000)
        librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb698d000)
        libicudata.so.63 => /usr/lib/arm-linux-gnueabihf/libicudata.so.63 (0xb4f8f000)
        libicui18n.so.63 => /usr/lib/arm-linux-gnueabihf/libicui18n.so.63 (0xb4d41000)
        libicuuc.so.63 => /usr/lib/arm-linux-gnueabihf/libicuuc.so.63 (0xb4bbb000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb4ba8000)

Is a fully static build possible?

First byte of the data passed to libusb

Hi, I am adding functions to be able to send other debug commands with cc_tool. I am trying to figure out what is the first byte of the data sent to the debugger.
For example, in cc_unit_driver.cpp, write_sfr() uint8_t header[] = { 0x40, 0x55, 0x00, }; the 0x55 0x00 are for DEBUG_INSTR NOP, but what is 0x40?
Similarly, in read_debug_config, uint8_t command[] = { 0x1F, DEBUG_COMMAND_RD_CONFIG };, what is 0x1F?
These bytes are not a part of debug protocol and I could not find anything special about the first byte in any of the libusb examples.

Thank you

Cannot build with Boost 1.76 on macOs Catalina

I was following this zigbee2mqtt tutorial https://www.zigbee2mqtt.io/information/flashing_the_cc2531.html

brew info boost
boost: stable 1.76.0 (bottled), HEAD
Collection of portable C++ source libraries
https://www.boost.org/

./configure
checking for Boost's header version... 1_76
checking for the toolset name used by Boost for g++... xgcc42 -xgcc
checking for boost/program_options.hpp... yes
checking for the Boost program_options library... yes
checking for boost/system/error_code.hpp... yes
checking for the Boost system library... (cached) yes
checking for boost/regex.hpp... yes
checking for the Boost regex library... no
configure: error: cannot find the flags to link with Boost regex

After removing boost and installing [email protected], ./configure worked

Suddenly cc-tool stoped working!

This is what i did and ever-since then my CC2541mini DK is not getting recognised by the ccdebugger.
Please guide.

MacBook-Air Application code % cc-tool --test
Programmer: CC Debugger
Target: CC2541
Device info:
Name: CC Debugger
Debugger ID: 8662
Version: 0x05CC
Revision: 0x0044

Target info:
Name: CC2541
Revision: 0x13
Internal ID: 0x41
ID: 0x2541
Flash size: 256 KB
Flash page size: 2
RAM size: 8 KB
Lock data size: 16 B
MacBook-Air Application code % sdcc -mmcs51 --code-loc 0x0000 --data-loc 0x0000 --iram-size 256 -I /usr/local/share/sdcc/include -I . -o ledblink.hex main.c
main.c:24: warning 88: cast of LITERAL value to 'generic' pointer
from type 'long-int literal'
to type 'volatile-unsigned-long-int generic* fixed'
main.c:28: warning 88: cast of LITERAL value to 'generic' pointer
from type 'long-int literal'
to type 'volatile-unsigned-long-int generic* fixed'
main.c:34: warning 88: cast of LITERAL value to 'generic' pointer
from type 'long-int literal'
to type 'volatile-unsigned-long-int generic* fixed'
main.c:40: warning 126: unreachable code
MacBook-Air Application code % cc-tool --erase -w ledblink.hex
Programmer: CC Debugger
Target: CC2541
Erasing flash...
Completed
Writing flash (339 B)...
Completed (0.12 s.)
MacBook-Air Application code % cc-tool -t
Programmer: CC Debugger
No target detected

Failes to compile on arch

make gives:

$  make
  CXXLD    cc-tool
/usr/bin/ld: /usr/bin/ld: DWARF error: could not find variable specification at offset 68b2
/usr/bin/ld: DWARF error: could not find variable specification at offset 692d
/usr/bin/ld: DWARF error: could not find variable specification at offset 69b4
/usr/bin/ld: DWARF error: could not find variable specification at offset 20800
/usr/bin/ld: DWARF error: could not find variable specification at offset 2080c
/usr/bin/ld: DWARF error: could not find variable specification at offset 20e29
/usr/bin/ld: DWARF error: could not find variable specification at offset 20e70
/usr/bin/ld: DWARF error: could not find variable specification at offset 20eb7
/usr/bin/ld: DWARF error: could not find variable specification at offset 214ae
/usr/bin/ld: DWARF error: could not find variable specification at offset 214dd
/usr/bin/ld: DWARF error: could not find variable specification at offset 21518
/usr/bin/ld: DWARF error: could not find variable specification at offset 21524
/usr/bin/ld: DWARF error: could not find variable specification at offset 2155f
/usr/bin/ld: DWARF error: could not find variable specification at offset 2156b
/usr/bin/ld: DWARF error: could not find variable specification at offset 2b9c7
/usr/bin/ld: DWARF error: could not find variable specification at offset 2ba33
/usr/bin/ld: DWARF error: could not find variable specification at offset 29c87
/usr/bin/ld: DWARF error: could not find variable specification at offset 29c94
/usr/bin/ld: DWARF error: could not find variable specification at offset 29ce6
/usr/bin/ld: DWARF error: could not find variable specification at offset 29d29
/usr/bin/ld: DWARF error: could not find variable specification at offset 29d36
/usr/bin/ld: DWARF error: could not find variable specification at offset 29d8b
/usr/bin/ld: DWARF error: could not find variable specification at offset 29dd0
/usr/bin/ld: DWARF error: could not find variable specification at offset 29ddd
/usr/bin/ld: DWARF error: could not find variable specification at offset 29e36
/usr/bin/ld: DWARF error: could not find variable specification at offset 29e7d
/usr/bin/ld: DWARF error: could not find variable specification at offset 29e8a
/usr/bin/ld: DWARF error: could not find variable specification at offset 29eec
/usr/bin/ld: DWARF error: could not find variable specification at offset 29f37
/usr/bin/ld: DWARF error: could not find variable specification at offset 29f44
/usr/bin/ld: DWARF error: could not find variable specification at offset 29fa6
/usr/bin/ld: DWARF error: could not find variable specification at offset 38020
/usr/bin/ld: DWARF error: could not find variable specification at offset 37fce
/usr/bin/ld: DWARF error: could not find variable specification at offset 38093
/usr/bin/ld: DWARF error: could not find variable specification at offset 38165
/usr/bin/ld: DWARF error: could not find variable specification at offset 381f3
/usr/bin/ld: DWARF error: could not find variable specification at offset 3827f
/usr/bin/ld: DWARF error: could not find variable specification at offset 2be89
/usr/bin/ld: DWARF error: could not find variable specification at offset 2be98
/usr/bin/ld: DWARF error: could not find variable specification at offset 2bea7
/usr/bin/ld: DWARF error: could not find variable specification at offset 2beb6
/usr/bin/ld: DWARF error: could not find variable specification at offset 2bec5
/usr/bin/ld: DWARF error: could not find variable specification at offset 3811f
/usr/bin/ld: DWARF error: could not find variable specification at offset 380d9
/usr/bin/ld: DWARF error: could not find variable specification at offset 38239
/usr/bin/ld: DWARF error: could not find variable specification at offset 382c5
/usr/bin/ld: DWARF error: could not find variable specification at offset 3830b
/usr/bin/ld: DWARF error: could not find variable specification at offset 38351
/usr/bin/ld: DWARF error: could not find variable specification at offset 38397
/usr/bin/ld: DWARF error: could not find variable specification at offset 383dd
/usr/bin/ld: DWARF error: could not find variable specification at offset 38423
/usr/bin/ld: DWARF error: could not find variable specification at offset 32b23
/usr/bin/ld: DWARF error: could not find variable specification at offset 3317c
/usr/bin/ld: DWARF error: could not find variable specification at offset 331e8
/usr/bin/ld: DWARF error: could not find variable specification at offset 33254
/usr/bin/ld: DWARF error: could not find variable specification at offset 332c0
/usr/bin/ld: DWARF error: could not find variable specification at offset 381ad
/usr/bin/ld: DWARF error: could not find variable specification at offset 38469
/usr/bin/ld: DWARF error: could not find variable specification at offset 38653
/usr/bin/ld: DWARF error: could not find variable specification at offset 3860d
/usr/bin/ld: DWARF error: could not find variable specification at offset 386df
/usr/bin/ld: DWARF error: could not find variable specification at offset 38725
/usr/bin/ld: DWARF error: could not find variable specification at offset 3876b
/usr/bin/ld: DWARF error: could not find variable specification at offset 387b1
/usr/bin/ld: DWARF error: could not find variable specification at offset 34a59
/usr/bin/ld: DWARF error: could not find variable specification at offset 34a84
/usr/bin/ld: DWARF error: could not find variable specification at offset 38699
/usr/bin/ld: DWARF error: could not find variable specification at offset 379a5
src/programmer/cc_253x_254x.o: in function `boost::re_detail_106800::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::unwind_extra_block(bool)':
/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:1368: undefined reference to `boost::re_detail_106800::put_mem_block(void*)'
/usr/bin/ld: src/programmer/cc_253x_254x.o: in function `boost::re_detail_106800::cpp_regex_traits_implementation<char>::error_string[abi:cxx11](boost::regex_constants::error_type) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:449: undefined reference to `boost::re_detail_106800::get_default_error_string(boost::regex_constants::error_type)'
/usr/bin/ld: src/programmer/cc_253x_254x.o: in function `void boost::re_detail_106800::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)':
/usr/include/boost/regex/pattern_except.hpp:75: undefined reference to `boost::re_detail_106800::raise_runtime_error(std::runtime_error const&)'
/usr/bin/ld: src/programmer/cc_253x_254x.o: in function `boost::re_detail_106800::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::extend_stack()':
/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:233: undefined reference to `boost::re_detail_106800::get_mem_block()'
/usr/bin/ld: src/programmer/cc_253x_254x.o: in function `boost::cpp_regex_traits<char>::transform_primary[abi:cxx11](char const*, char const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:966: undefined reference to `boost::re_detail_106800::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const'
/usr/bin/ld: src/programmer/cc_253x_254x.o: in function `boost::cpp_regex_traits<char>::transform[abi:cxx11](char const*, char const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:962: undefined reference to `boost::re_detail_106800::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const'
/usr/bin/ld: src/programmer/cc_253x_254x.o: in function `boost::re_detail_106800::save_state_init::save_state_init(boost::re_detail_106800::saved_state**, boost::re_detail_106800::saved_state**)':
/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:107: undefined reference to `boost::re_detail_106800::get_mem_block()'
/usr/bin/ld: src/programmer/cc_253x_254x.o: in function `boost::re_detail_106800::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp()':
/usr/include/boost/regex/v4/perl_matcher_common.hpp:219: undefined reference to `boost::re_detail_106800::verify_options(unsigned int, boost::regex_constants::_match_flags)'
/usr/bin/ld: src/programmer/cc_253x_254x.o: in function `boost::re_detail_106800::save_state_init::~save_state_init()':
/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:115: undefined reference to `boost::re_detail_106800::put_mem_block(void*)'
/usr/bin/ld: /usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:115: undefined reference to `boost::re_detail_106800::put_mem_block(void*)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:542: cc-tool] Error 1

This is on:

$ uname -a
Linux serenity 5.8.5-arch1-1 #1 SMP PREEMPT Thu, 27 Aug 2020 18:53:02 +0000 x86_64 GNU/Linux

Bootstrap and configure seem to run correctly (??)

./bootstrap gives:

$ ./bootstrap
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:8: installing './compile'
configure.ac:5: installing './missing'
autoreconf: Leaving directory `.'

and ./configure:

$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for Boost headers version >= 1.39.0... yes
checking for Boost's header version... 1_72
checking for the toolset name used by Boost for g++... configure: WARNING: could not figure out which toolset name to use for g++

checking boost/program_options.hpp usability... yes
checking boost/program_options.hpp presence... yes
checking for boost/program_options.hpp... yes
checking for the Boost program_options library... yes
checking boost/system/error_code.hpp usability... yes
checking boost/system/error_code.hpp presence... yes
checking for boost/system/error_code.hpp... yes
checking for the Boost system library... (cached) yes
checking boost/regex.hpp usability... yes
checking boost/regex.hpp presence... yes
checking for boost/regex.hpp... yes
checking for the Boost regex library... (cached) yes
checking for boost/system/error_code.hpp... (cached) yes
checking for the Boost system library... (cached) yes
checking boost/filesystem/path.hpp usability... yes
checking boost/filesystem/path.hpp presence... yes
checking for boost/filesystem/path.hpp... yes
checking for the Boost filesystem library... (cached) yes
checking boost/foreach.hpp usability... yes
checking boost/foreach.hpp presence... yes
checking for boost/foreach.hpp... yes
checking boost/scoped_ptr.hpp usability... yes
checking boost/scoped_ptr.hpp presence... yes
checking for boost/scoped_ptr.hpp... yes
checking boost/shared_ptr.hpp usability... yes
checking boost/shared_ptr.hpp presence... yes
checking for boost/shared_ptr.hpp... yes
checking boost/algorithm/string.hpp usability... yes
checking boost/algorithm/string.hpp presence... yes
checking for boost/algorithm/string.hpp... yes
checking boost/signals2.hpp usability... yes
checking boost/signals2.hpp presence... yes
checking for boost/signals2.hpp... yes
checking boost/crc.hpp usability... yes
checking boost/crc.hpp presence... yes
checking for boost/crc.hpp... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBUSB... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing libtool commands

How can I debug this?

Thanks!

Error compiling on MacOS

While compiling on MacOS Catalina 10.15.1, I'm getting error:

CXX      src/application/cc_flasher.o
  CXX      src/application/cc_base.o
  CXX      src/usb/usb_device.o
  CXX      src/data/read_target.o
  CXXLD    cc-tool
ld: warning: option -s is obsolete and being ignored
Undefined symbols for architecture x86_64:
  "boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)", referenced from:
      boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::perl_matcher(char const*, char const*, boost::match_results<char const*, std::__1::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*) in cc_253x_254x.o
  "boost::re_detail_106800::get_mem_block()", referenced from:
      boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp() in cc_253x_254x.o
      boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_all_states() in cc_253x_254x.o
      boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_startmark() in cc_253x_254x.o
      boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_alt() in cc_253x_254x.o
      boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_rep() in cc_253x_254x.o
      boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_char_repeat() in cc_253x_254x.o
      boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_set_repeat() in cc_253x_254x.o
      ...
  "boost::re_detail_106800::put_mem_block(void*)", referenced from:
      boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp() in cc_253x_254x.o
      boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::unwind_extra_block(bool) in cc_253x_254x.o
  "boost::re_detail_106800::verify_options(unsigned int, boost::regex_constants::_match_flags)", referenced from:
      boost::re_detail_106800::perl_matcher<char const*, std::__1::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp() in cc_253x_254x.o
  "boost::re_detail_106800::raise_runtime_error(std::runtime_error const&)", referenced from:
      void boost::re_detail_106800::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type) in cc_253x_254x.o
  "boost::re_detail_106800::get_default_error_string(boost::regex_constants::error_type)", referenced from:
      boost::re_detail_106800::cpp_regex_traits_implementation<char>::error_string(boost::regex_constants::error_type) const in cc_253x_254x.o
  "boost::re_detail_106800::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const", referenced from:
      char const* boost::re_detail_106800::re_is_set_member<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char const*, char const*, boost::re_detail_106800::re_set_long<unsigned int> const*, boost::re_detail_106800::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in cc_253x_254x.o
  "boost::re_detail_106800::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const", referenced from:
      char const* boost::re_detail_106800::re_is_set_member<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char const*, char const*, boost::re_detail_106800::re_set_long<unsigned int> const*, boost::re_detail_106800::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in cc_253x_254x.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [cc-tool] Error 1

All brew packages are installed (brew install autoconf automake libusb boost pkgconfig libtool)

problems during ./configure

I'm trying to build this lib on Ubuntu 19.04 but facing with failure during ./configure execution:
checking boost/crc.hpp presence... yes checking for boost/crc.hpp... yes ./configure: line 13102: syntax error near unexpected token LIBUSB,'
./configure: line 13102: PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0)'
dh-autoreconf, libusb-1.0.0, libboost-all-dev packages were installed.
make file is not generated.

please help me to understand where is the problem

Unable to compile on Linux Mint 19.1 Cinnamon

I am having problems in running ./configure. The last few lines of output look like this:

checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking for Boost headers version >= 1.39.0... no
configure: error: cannot find Boost headers version >= 1.39.0

I have a lot of boost stuff installed:
$ apt list --installed | grep libboost-all-dev
libboost-all-dev/bionic,now 1.65.1.0ubuntu1 amd64 [installed]

I cannot figure out what I am doing wrong.

Windows port

Is it possible to get a Windows 10 port (exe or an visual studio solution)?

Unable to install

I followed instructions on https://www.zigbee2mqtt.io/getting_started/flashing_the_cc2531.html. I get this error:

./bootstrap: line 3: autoreconf: command not found

And then after I install all the dependencies, I get this stacktrace:

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf --force
configure.ac:8: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1

New release/tag?

Latest cc-tool has been released more than 7 years ago. Would it possible to tag a 0.27 or a 0.26+?

CC2531+antenna

I have USB stick CC2531 with PCB antenna, there is not problem.
Bus 001 Device 020: ID 0451:16a8 Texas Instruments, Inc.

But I bought today the same USB stick with external antenna, it is third "color" version labeled CC2531+antenna, because I have bad signal range
https://www.aliexpress.com/item/4001049257611.html?spm=a2g0s.9042311.0.0.3d994c4dmw9lFe

It has another Device ID:
Bus 001 Device 019: ID 0451:16ae Texas Instruments, Inc.

And when I tried to flash it
sudo ./cc-tool/cc-tool -e -w CC2531ZNP-Prod.hex
then appeared to me:
CC Debugger device not found

I think, because Device ID, PCB antenna stick has 0451:16a8, but external antenna 0451:16ae

I am not good at cpp programming, is any patch for 0451:16ae to get working?

Thank you very much!!!

Support Newer Chip?

This isn't an issue. I like to receive some advices on current software modification.

First of all, thanks for putting the code in GitHub.

We have the Texas Instrument chip model CC2652. I noticed that the CC-Tool version 0.26 supported up to the CC2545.

Is there way to support newer chips like the CC2652 by modifying the existing code? If yes, which sections of code need to be changed?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.