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.

How can I get the cc2538-demo.c example to compile in the Thingsquare demo.sq.io Develop section

Other Parts Discussed in Thread: CC2538

I am following along on this TI wiki: http://processors.wiki.ti.com/index.php/Contiki-6LOWPAN and I found the source firmware for the cc2538 on Thingsquare's site: 

http://www.thingsquare.com/download/thingsquare-mist-1.1.0.zip.

Inside the source there is a file cc2538-demo.c in the examples/cc2538dk folder. I copied the source into the Develop pane of the thingsquare demo site as documented on the wiki and there are no highlighted errors. But when I select a TI device and try to Run the program on that device, I get an error: 

Failed to compile the application for the target device.

I see no other messages or explanations. Most of the simple demos I have tried including the Hello World and Blink examples work just fine, copied from the same source folder. But this more extensive one does not.

Can anyone explain what I am doing wrong and perhaps offer a suggestion?

  • Hi James.

    The cc2538-demo.c you specify is in the thingsquare-mist-1.1.0/contiki/examples/ and the Thingsquare compiler is only guaranteed to work with the ones in the thingsquare-mist-1.1.0/examples/

    The cc2538-demo.c is built to work with the cc2538dk platform in  thingsquare-mist-1.1.0/contiki/platform/ and the Thingsquare compiler targets the mist-cc2538dk in thingsquare-mist-1.1.0/platform/ when it builds.

    Best Regards,
    // Niklas

     

  • Thanks for the reply. I did wind up having a few email exchanges with Adam Dunkels of Thingsquare and I learned about the different targets. I actually have a newer firmware source release than the mist release and there, the proper target is thsq-cc2538dk. I am just getting familiar with using the toolchain in the Contiki VM to make new firmware and I have been able to get a couple of examples built.

  • Good that you solved your issue, I provide this information as reference for other having the same issue.

    The way the Thingsquare cloud server and online IDE are working is that the actual target (in your case a cc2538dk) need to be defined on the cloud server as well. I.e. they need to run the exact same version of the thingsquare embedded firmware. This is to ensure that you do not brick your device (making it impossible to update it wirelessly, which is not good if you have 1000's of devices) of course the device is not bricked you can always reprogram it using a flash tool, but you get the idea...

    The Thingsquare team manages the firmwares on their cloud server. also keep in mind that the server as of today is a demo server.

    -Jonas