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.

CC3000 Driver Porting Advice

TI Team,

I am porting the CC3000 to a FPGA device.  Ideally I would like to port a simliar lwip example that is contained in the Stellaris M4 example.  I understand that I need to implement the spi.h function definitions in my embedded target.  I am noticing that the lwip example uses the CC3000 Host Driver library.  I have never used a library and I am assuming I need to create a library in my FPGA environment so that is compiled under the soft-core processor I will be using.  When attempting to do this, I recieve a lot of compilation errors.

Before I go through all these errors and try to figure it out, I was making sure that I had the correct approach in compiling the CC3000 Host Driver library?

-Jason

  • Jason,

    You can easily leverage the lwip example and functionality. Because of the parititioning of the CC3000 Driver, porting is primarily needed at the spi level to provide the same functionality using the SPI module. There are also a few GPIO routines for WLAN_ENABLE and IRQ lines, but this is quite simple.

    The possible challenge you may face is the endianess of the processor you'll be using and compiling the Host Driver. Is it big endian or small endian?

    Regards,
    Gustavo

  • It is little endian, just like the TI parts. Right now I took all of the source from the CC3000 host driver and I am compiling it for the FPGA soft-core.  Perhaps I don't need to do all that? 

    I am going to continue down that path because I am struggling to include library files into this other EDK.  Any recommendations you would have?  I understand I need to provide a spi.c and I am working on that in my current hardware.

    -Jason

  • Jason,

    You mean compiling it as a library? That is the way the Host Driver is used in the sample code TI provides. Of course you can choose to change it, but I suggest leave it.

    You need to take spi.c and look at where the MSP430 or ARM specific registers are used, then replace them with the commands needed for your soft-core uC.
    If I remember correctly from porting the driver, there are some definitions elsewhere in the file as defines. Make sure you provide the equivalent functionality.

    BTW, are you using microBlaze, NIOS II or another core?

    Regards,
    Gustavo

  • I am using microBlaze in this example.  I am struggling to understand if I can take the .lib file compiled from CCS and import that directly into the Xilinx SDK?  As you know the CC3000 HOST DRIVER library is very coupled to differentiations between CCS and IAR.  I am not that familiar with library files so any insight would help.

  • Jason,

    No, you can't do that. The library file must be generated for your specific platform (and the CCS/IAR might not be compatible with your tools anyway). The are typically used so that you don't have to constantly recompile them and they save you time (especially when it's a large amount of code). In this case it's also used to "isolate" the code and ensure that it provides consistent performance. For example, you could still optimize your own application, but the library remains at the same optimization level ensuring that it will operate the same.

    The good news is that the host driver is basically standalone and stands on top of the SPI interface, so that it should compile automatically. There might be an issue with some keywords that are specific to the IAR/CCS compiler and you'll have to find the equivalent in your compiler.

    Regards,
    Gustavo