This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2650: NOROM cc26/cc13xxxware functions in Contiki

Part Number: CC2650

I have an issue which I strictly believe is related to the Contiki build setup, yet I would appreciate any additional info or confirmations before diving into the makefiles and depths of ccxxxxware:

I am trying to use the ti_lib_i2c_int_register() (i.e. I2CIntRegister() from ccxxxxware), however I get an undefined reference from the linker. Similarly, If I set DRIVERLIB_NOROM and try to build e.g. the examples/cc26xx, I get "undefined reference to `NOROM_TimerConfigure'". Are anyone able to provide additional insights on this and whats particular with these functions - and any suggested solution?

Andreas

  • Hi,

    I cannot reproduce this issue. I have taken the cc26xx-demo example, added 

    ti_lib_i2c_int_register(0, NULL);

     to PROCESS_THREAD() and compiled the example with

    make BOARD=srf06/cc13xx TARGET=srf06-cc26xx

    Are you sure that you have set up the correct ccxxxxware? I have used this one.

  • Hi,
    You are right, I did not test that combination - I see the same as you.

    I experience the problem when building (tried both my application and the demo) for my new platform (which is outside of the contiki directory). Comparing the makefiles for the srf06-cc26xx platform and mine there are very few changes (naming and directory-paths) which I believe to be correct since it builds without the ti_lib_i2c_int_register().
    I have been trying to dive into the cpu Makefile.cc26xx-cc13xx to understand if there is a dependency on the location of platform files, with no luck so far.

    However, you should be able to reproduce the "same" issue if you set CFLAGS+=-DDRIVERLIB_NOROM=1 in the demo Makefile. In this case you should see "undefined reference to `NOROM_TimerConfigure'". This would (if same root cause) mean that the platform is not to blame - which would be puzzling.

    Andreas

  • Hi,
    I tried that. I set CFLAGS = -DDRIVERLIB_NOROM=1 in the example Makefile and even changed BOARD=srf06/cc26xx and used cc26xxware. It still builds. I double-checked that CFLAGS is effective by setting an invalid option.
  • That's very strange,

    I am on bleeding-edge contiki, commit 719f712, and I added CFLAGS+=-DDRIVERLIB_NOROM=1 to the first line in the demo Makefile. Did you make clean in between? When doing "make BOARD=srf06/cc13xx TARGET=srf06-cc26xx" I get:

    LD cc26xx-demo.elf
    contiki-srf06-cc26xx.a(clock.o): In function `clock_init':
    clock.c:(.text.clock_init+0x42): undefined reference to `NOROM_TimerConfigure'



  • Hi,

    I can reproduce this now. But it is another problem, unrelated to your i2c problem. timer.c is not included into Contiki because of a name clash. This is explained in the platform README:

    Filename conflicts between Contiki and CC26xxware
    =================================================
    There is a file called `timer.c` both in Contiki as well as in CC26xxware. The
    way things are configured now, we don't use the latter. However, if you need to
    start using it at some point, you will need to rename it:
    
    From `cpu/cc26xx/lib/cc26xxware/driverlib/timer.c` to `driverlib-timer.c`

    I wonder which ti-lib header file you use. I can reproduce the i2c issue with

    #include "ti-lib-rom.h"

    This header file contains only functions that are also present in ROM. I2CIntRegister() is not in the ROM, so you need to use:

    #include "ti-lib.h"
  • Thanks Richard, that explains - it's been a while since I looked in the README.

    I can reproduce my issue by building the demo for my platform. I.e. I am not changing anything in the demo (it has include for ti-lib.h). The only change I do is in the makefile: "TARGETDIRS+=../../.."  and when building: "make BOARD=my_custom_board TARGET=my_custom_target". It builds successfully, but if adding ti_lib_i2c_int_register(0, NULL); I get the usual linker error.

    Andreas

  • I finally figured it out, and it is related to the issue you pointed out above.
    In my platform I had for various reasoned renamed the board-i2c.c/.h files to i2c.c/.h. This caused a naming conflict identical to what was happening to timer.

    Thanks for your effort! And I am sorry this turned out to be something particular for my setup with limited learning benefit for others.

    Regards,
    Andreas