5 Replies Latest reply on Aug 22, 2018 1:20 PM by CodyCook

    Missing Step in FreeRTOS Lesson 4

    cnt_3130841

      Hello -

       

      I am clearly missing a step in following the PSoC 6 101: Lesson 4 FreeRTOS.

      I am using the PSoC 6 BLE Pioneerkit  CY8CKIT-062-BLE   with device CY8C6347BZI-BLD53

      The project will not build.

      PSoC Creator 4.2 is complaining that The RTOS functions are undeclared.  (Please see attached image.)

      Note that FreeRTOSConfig.h does appear in the project file after the Application is Generated.

       

      I am also curious as to the line 15 in the attached program:

      void LED_TASK(void *arg)

       

      the " *arg " appeared magically (like an auto-fill action)  in the Lesson video after originally being typed  and accepted as void LED_TASK(void)

      It raises a warning complaint from my editor  (and apparently in the video, too)  - it makes no difference in failure of the build results

      I also note the the Lesson video has warnings on xTaskCreate (line 31) but seems to build OK in the video.

      Can you point me to some hints as to what is going on here?

       

      Many thanks,

      Chris

        • 1. Re: Missing Step in FreeRTOS Lesson 4
          nidh

          Hi Chris,

           

          All FreeRTOS task functions should accept a void pointer as parameter. See Writing RTOS tasks in FreeRTOS - implementing tasks as forever loops for details.

          The variable that gets passed into the task is the "pvParameters" input to xTaskCreate API. This is a rarely used feature, as you can see from passing a NULL for this parameter in your code. You can remove the warning for unused parameter by using this code in the task function:

          /* Remove warning for unused parameter */

              (void)arg;

           

          That being said, the build failure is due to a different issue. In order to use FreeRTOS and Task related APIs, you have to include the following header files:

           

          #include "FreeRTOS.h"

          #include "task.h"

           

          Additional header files are required if you're using queues, semaphores, RTOS timers etc:

          #include "queue.h"

          #include "semphr.h"

          #include "timers.h"

           

          You can find a list of FreeRTOS APIs, their details, header files required for them to work, etc here :FreeRTOS API categories

           

          Please let me know if you have any additional questions.

           

          Regards

          Nidhin

          1 of 1 people found this helpful
          • 2. Re: Missing Step in FreeRTOS Lesson 4
            cnt_3130841

            Hi Nidhin-

             

            Many thanks for the help.

            That seems to have fixed the build problem for the Free RTOS.

            Now, however, PSoC Creator 4.2 cant find any target

            (Presents no targets on "Select Debug Target")

            I have rebooted PSoC Creator program and board, to no avail-

            ( I got a similar result when trying the PSoC 4 Pioneer Kit.

             

            Windows System shows the Cypress KitProg2 but complains of no driver - see below:

             

            Should I re-install Creator 4.2?

             

             

            - Chris

             

             

            1 of 1 people found this helpful
            • 3. Re: Missing Step in FreeRTOS Lesson 4
              srds

              Hi Chris,

               

              KitProg2 driver issue could be due to broken PSoC Programmer installation. To recover, try following steps.

              1. Click on Remove device button (from the your above image)

              2. Disconnect the kit from the PC and uninstall PSoC Programmer.

              3. Download and install latest version of PSoC Programmer (3.27.1) from Cypress website.

              4. Connect the kit back to your PC and wait for the KitProg2 driver installation. Now the PSoC Creator should be able to detect and program the CY8CKIT-062-BLE.

               

              BTW, you said you had similar issue with PSoC 4 Pioneer Kit. So, could that a PC problem? How did your recover that? Probably that solution would help you here as well.

               

              Cheers!

              1 of 1 people found this helpful
              • 4. Re: Missing Step in FreeRTOS Lesson 4
                cnt_3130841

                HI srds,

                Thanks for the suggestion.  It does not seem to have changed the problem.

                I can believe this might be a  PC or windows issue as both kits were working and then both stopped together.

                I did not recover with PSoC 4 Pioneer either (I had tried it after the PSoC 6 target could not be found.)

                I am thinking my best bet is to reinstall the entire PSoC Creator package from scratch.  It was working.

                I am open to exploring other PC issues if anyone has ideas.

                Thanks.

                • 5. Re: Missing Step in FreeRTOS Lesson 4
                  CodyCook

                  Any idea why Bill left that step out of the video "PSoC 6 101 Lesson 1-4: FreeRTOS"? Did he use another way of declaring the required header files?