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.

Why does not Thingsquare 6LoWPAN have ADC driver for CC2538DK ?

Other Parts Discussed in Thread: CC2538

I have download the source code of thingsqurare 6LoWPAN,  but I found that there is no adc-sensor.c&adc-sensor.h  at the directory /thingsquare-mist-1.1.0/platform/mist-cc2538dk and thingsquare-mist-1.1.0/contiki/platform/cc2538dk/dev,  Does anyone know why the adc drivers are removed ?

  • Hello,

    It was not removed - thingsquare-mist-1.1.0 was released before the files were actually added to main Contiki:

    https://github.com/contiki-os/contiki/commit/dbba311270c0deb94dc36f060a0991522a2768af

    There has been a lot of additions/improvements to the CC2538 port in Conitki. 

    Cheers,

    Jonas

  • Hi, Jonas,

    Thanks for your information, I have update the several files of adc drivers  as  the hyperlink content you have point out.

    But after doing make,  there are some error as follows:

    arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -nostartfiles -T obj_cc2538dk/cc2538.ld -Wl,-Map=contiki-cc2538dk.map,--cref,--no-warn-mismatch -Wl,--gc-sections obj_cc2538dk/startup-gcc.o cc2538-demo.co contiki-cc2538dk.a -o cc2538-demo.cc2538dk
    contiki-cc2538dk.a(adc-sensor.o): In function `configure':
    adc-sensor.c:(.text.configure+0xe): undefined reference to `GPIO_PORT_TO_BASE'
    adc-sensor.c:(.text.configure+0x20): undefined reference to `GPIO_PORT_TO_BASE'
    adc-sensor.c:(.text.configure+0x32): undefined reference to `GPIO_PORT_TO_BASE'
    adc-sensor.c:(.text.configure+0x38): undefined reference to `GPIO_CLR_PIN'
    contiki-cc2538dk.a(adc-sensor.o): In function `value':
    adc-sensor.c:(.text.value+0x22): undefined reference to `GPIO_PORT_TO_BASE'
    adc-sensor.c:(.text.value+0x28): undefined reference to `GPIO_SET_PIN'
    adc-sensor.c:(.text.value+0x42): undefined reference to `GPIO_PORT_TO_BASE'
    adc-sensor.c:(.text.value+0x48): undefined reference to `GPIO_CLR_PIN'
    collect2: ld returned 1 exit status
    make: *** [cc2538-demo.cc2538dk] Error 1
    rm cc2538-demo.co obj_cc2538dk/startup-gcc.o

    I have not get the reason of this error, could you give some suggestions about the reason?

    thanks for your time.

    Jason Hu

  • Hi, 

    I have update the gpio.h file, the issue have been fixed.

    Thanks

    Jason Hu