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.

CCS/SIMPLELINK-CC3220-SDK-HOMEKIT-PLUGIN: FreeRTOS Installation

Part Number: SIMPLELINK-CC3220-SDK-HOMEKIT-PLUGIN

Tool/software: Code Composer Studio

Hi, I downloaded and installed CCS and SimpleLink-CC3220-SDK to C:\ti.  I also downloaded FreeRTOS to C:\ti\C:\ti\FreeRTOSv10.1.1.  I then created project key for FREERTOS_INSTALL_DIR that points to C:\to\C:\ti\FreeRTOSv10.1.1 per the sdk user manual.  I then imported freertos_builds_CC3220SF_LAUNCHXL_release_ccs into my workspace.

(i first tried to include homekit project, but quickly was stuck on the freertos project not compiling)

The first error was that it couldn't find stdint.h.  I then added the include directory for the posix/freertos directory.  it then complained it couldn't find time.h.  I think I then included the posix/ccs directory. it then complained about stddef.h, stdbool.h, etc.,  I then found the ti-compiler include director in ccs8 directory and pointed the compiler to that directory.  

now, it's telling me that it can't find the FreeRTOSconfig.h file, although it's *in the project*.  I'm somewhat new to eclipse and new to CCS.  oh for the love of bacon why is freertos integration broken right out of the box?  what am i doing wrong? 

I just downloaded *everything* on 11.7.18, so it's all the latest version.

thanks.

Chris

  • Ok, so I forced it to look in the project directory as an include path (it doesn't do this by default?). Then it complained about not finding the portmacro.h file. no problem, point it to the portable/ccs/arm-4f. now, it's giving me this:

    "C:\temp\{52FBB00E-3C4D-478C-A516-B7063E61A90F}", ERROR! at line 187: [E0002] Instruction only available in V7 and V6M0
    dsb

    "C:\temp\{52FBB00E-3C4D-478C-A516-B7063E61A90F}", ERROR! at line 188: [E0002] Instruction only available in V7 and V6M0
    isb

    this feels so, so broken right out of the box. is it a simple thing i'm missing?

    Chris
  • Hello Chris, 

    Christopher Deckard74 said:
    Then it complained about not finding the portmacro.h file. no problem, point it to the portable/ccs/arm-4f.

    1. Where the portable/ccs/arm-4f is located? Please, provide a full path. 
    2. CC3200x is on ARM M4, not M4F architecture. 

  • Hi Tom, thanks for the reply.

    I just found this from the CC3220 FreeRTOS page:

    "Note: Even though the CC3220 has an ARM Cortex-M4 core, it does not have a floating point unit (FPU), and therefore uses the FreeRTOS Cortex-M3 port."

    I then pointed the include path to:
    C:\ti\FreeRTOSv10.1.1\FreeRTOS\Source\portable\CCS\ARM_CM3

    but it has the same results.

    Additionally, I see:
    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/source/ti/posix/freertos/clock.c", line 46: fatal error #1965: cannot open source file "ti/drivers/dpl/HwiP.h"

    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/source/ti/posix/freertos/memory.c", line 129: error #20: identifier "EOVERFLOW" is undefined

    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/source/ti/posix/freertos/pthread_mutex.c", line 334: error #20: identifier "EFREERTOS" is undefined


    So the SDK files have relative paths hardcoded, which is fine. The files are there. But the compiler can't find them. It seems that I don't have the project properly configured. Am I wrong to assume that an "out-of-the-box" project would be properly configured? I'm not too familiar with eclipse (other than vague painful memories) -- did I fubar the installation? Or is the installation just fubared?

    Are others able to download->install->build without issues?

    Chris
  • a screenshot of my current config after copying some paths from the freeRTOS demo (see screenshot below).  Now, it's only complaining about the isb and dsb instructions.  

    here's a screenshot of the freeRTOS CC3220 demo config (which builds just fine):

  • Ok, so the freertos_builds_CC3220SF_LAUNCHXL_release project is completely unconfigured. The processor was set to v4. I changed it to v7M, and it got rid of the isb and dsb errors (although I didn't have the option to specify vflib as the floating point support, but we'll burn that bridge later).

    but now it can't find various types. this is clearly a never-ending battle.

    why isn't the freertos_builds_CC3220SF_LAUNCHXL_release configured properly? can anyone answer this? I'll keep digging. . .

    Chris
  • ok, so i did realize that the freertos project is "release" only (no debug configuration). sw33t! i just need to change my build config to release!

    oh wait, that configuration is completely blank as well. . .

    will keep digging . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  • ok. so out of desperation, I tried ccs under os x, and viola, it actually compiled the freertos example. great. maybe it's as simple as eschewing windows (so many problems are solved this way). and I can install the homekit SDK. and then the AWS SDK -- oh wait, there's not an OS X installer. this is going to lead to trouble.

    so let's try reinstalling the windows setup again. reinstallation seems to fix a lot of windows issues. nope. now i get 92 missing type errors with the new install. as an example:

    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/kernel/freertos/dpl/DebugP_freertos.c", line 61: error #20: identifier "uintptr_t" is undefined
    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/kernel/freertos/dpl/DebugP_freertos.c", line 69: error #20: identifier "uintptr_t" is undefined
    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/kernel/freertos/dpl/DebugP_freertos.c", line 69: error #20: identifier "uintptr_t" is undefined
    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/kernel/freertos/dpl/DebugP_freertos.c", line 76: error #20: identifier "uintptr_t" is undefined
    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/kernel/freertos/dpl/DebugP_freertos.c", line 76: error #20: identifier "uintptr_t" is undefined
    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/kernel/freertos/dpl/DebugP_freertos.c", line 76: error #20: identifier "uintptr_t" is undefined
    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/kernel/freertos/dpl/DebugP_freertos.c", line 83: error #20: identifier "uintptr_t" is undefined
    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/kernel/freertos/dpl/DebugP_freertos.c", line 83: error #20: identifier "uintptr_t" is undefined
    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/kernel/freertos/dpl/DebugP_freertos.c", line 83: error #20: identifier "uintptr_t" is undefined
    "C:/ti/simplelink_cc32xx_sdk_2_30_00_05/kernel/freertos/dpl/DebugP_freertos.c", line 83: error #20: identifier "uintptr_t" is undefined

    oh, where unto will it end? oh simplelink, you were going to be so . . . simple.

    Chris
  • joy of joys, the freertos_builds . . . project actually built. turns out there's an include file from 1990 in the compiler include directory as well as the one in the posix directory. I had to move the search path for the posix directory above the compiler directory. of course! duh!

    now, we'll see if we can get the network_terminal example to build.



    chris
  • Ok, for the main network-terminal project, I had to move the compiler include path to the top, and it compiles.  whew!  only 20 hours to get to this point. I could've shipped, like, 3 products in that time.

    The clean install seemed to help.

    In all seriousness, why are the build settings non-determinate for CCS (I'm assuming this is the case)?  Will I have to futz around with the include settings for every project I import into CCS?  

    I expect it's an eclipse issue.  only software written by coders for coders could be so wonky!

    Cheers,

    Chris

  • Christopher Deckard74 said:
    I then imported freertos_builds_CC3220SF_LAUNCHXL_release_ccs into my workspace.

    Where is this project located?
    I cannot find it. 
    Could you provide a full path?

  • Hi Tom, here's some background:

    Running win10 on MBP (under bootcamp)

    I downloaded and installed (all latet versions as of 11.10.2018) the following into C:\ti

    CCS8 (windows installer, online installer)

    CC3220 SDK

    FreeRTOS v10.1.1 here:

    FreeRTOS was installed under C:\FreeRTOSv10.1.1

    I also downloaded the AWS SDK from here:

    Homekit SDK was downloaded from the secret location on TI's site.

    You can see my directory in the attached image.

    -----

    when you import any of the freertos projects, they should pull the freertos_build project in along with them.  if not, it is here:

    C:\ti\simplelink_cc32xx_sdk_2_30_00_05\kernel\freertos\builds\CC3220SF_LAUNCHXL\release\ccs

    be sure to pay attention to your eval board type and IDE type.

    -----

    I now have the freertos_build and network_terminal projects building.  emboldened, I thought I'd try the AWS SDK project.  nope.  First thing, I moved the compiler include up to the top of the list in the include search settings.  Now I'm onto this error:

    >> Compilation failure

    subdir_rules.mk:9: recipe for target 'timer.obj' failed

    "../timer.c", line 22: error #71: incomplete type is not allowed

    "../timer.c", line 27: warning #225-D: function "clock_gettime" declared implicitly

    "../timer.c", line 27: error #20: identifier "CLOCK_MONOTONIC" is undefined

    "../timer.c", line 53: error #71: incomplete type is not allowed

    "../timer.c", line 60: warning #225-D: function "clock_gettime" declared implicitly

    "../timer.c", line 60: error #20: identifier "CLOCK_MONOTONIC" is undefined

    4 errors detected in the compilation of "../timer.c".

    some of these are familiar, but the "incomplete type" error is a new one for me.  so, I will dig into this and sort through the "dependency hell".

    Tom, do you have access to the team that puts these SDK releases together?  why are they so broken when I install them?  it's somewhat trivial -- just include path configuration -- but it costs me hours and hours to sort through this.  Am I the only one experiencing this?

    I do appreciate your help.

    Chris

  • Chris,

    Just to cover all bases, when you installed FreeRTOS, did you follow the instructions in our getting started guide to properly link FreeRTOS?

    www.ti.com/.../swru461b.pdf
    Section 1.8.2

    Regards,
    VR
  • Ok, so it was the same issue related to time.h -- there are two time.h files -- one in the compiler include directory, and one in the posix directory. in this case (for AWS SDK), the posix was the one required, so the posix include needs to be ahead of the compiler include.

    perhaps the TI release team could look into gerrit, or something similar?
  • Chris,
    CLOCK_MONOTONIC is defined here: C:\ti\simplelink_cc32xx_sdk_2_30_00_05\source\ti\posix\gcc\time.h
  • Chris,
    clock_gettime implementation here: C:\ti\simplelink_cc32xx_sdk_2_30_00_05\source\ti\posix\freertos\clock.c
  • Chris,
    which example do you try to compile?
    Please, provide a full path.
  • Hi Vincent, I was using the instructions found at this page:
    www.ti.com/.../launchcc3220modasf

    specifically:
    www.ti.com/.../swru473a.pdf

    and
    www.ti.com/.../swru512.pdf

    (I have the LAUNCHPAD with the CC3220MOD on it, since I plan on using the FCC-certified module in my design)

    It appears that the instructions in the file you linked to are slight different. Specifically, the instructions mention FreeRTOS9. I'm using FreeRTOS 10. I don't think this is the problem, however. I find that I consistently get undef type errors. To fix this, I have to go to the build settings, and move the compiler include from the bottom of the list to the top.

    Now, however, I'm hitting a configASSERT in the pthread.c line 393:
    status = xTaskCreate((TaskFunction_t)_pthread_runStub, NULL /* name */,
    ((uint16_t)pAttr->stacksize) / sizeof(portSTACK_TYPE),
    (void *)thread, pAttr->priority, &(thread->freeRTOSTask));

    the taskCreate function (actually a sub function) has a configASSERT on the task name, where pthread is setting it to NULL as you can see above. Are you aware of this?

    Chris
  • Hi Tom, is essentially the same for all of them. I found the solution is to rearrange the include search order under build settings. I don't know why it's incorrect out-of-the-box. At any rate, I'm now just trying to successfully debug the out-of-the-box demo. It can be found here:

    C:\ti\simplelink_cc32xx_sdk_2_30_00_05\examples\rtos\CC3220SF_LAUNCHXL\demos\out_of_box\freertos\ccs

    I'm able to program it using uniflash. I have the image set to "development" so I can connect via jtag. The odd thing is that it runs (or at least I get the blinky LED), but if I try to debug, it hangs on the configASSERT (see my comment above). I assume there's a switch so that it ignores ASSERTs unless it's being debugged, but I don't clearly understand this mechanism, yet.

    Chris
  • BTW, I replace NULL with "foo" and it seems to debug and run ok.

    I'm new enough to this platform (~4 days) that I'm still developing an intuition for how much hacking it requires . . .

    Chris
  • Glad you did.
    TI-RTOS examples perform very well.
    Mark this issue as solved.