Creating new project at free RTOS

crippler1 wrote on Monday, March 09, 2015:

Thanks for replying

Unfortuenatley that’s not help.
I just want to create new project, and I always get link errors,
when I get over one error, I get 10 more.

It’s a shame that creating new project is so complicating.

I hope that in real embedded circuits it is not the same.

rtel wrote on Monday, March 09, 2015:

There is no difference between using the Windows port and a real
embedded target.

  1. Start with a working project that builds and runs in your environment.

  2. Add in the very few FreeRTOS source files as per the instructions on
    the web, along with a minimal FreeRTOSConfig.h file. Ensure the
    FreeRTOS include path and the path to FreeRTOSConfig.h is in the
    compiler’s include path. Start with something simple, not something
    that is taken from an example that is described as “comprehensive” in
    the documentation, as you have done. Read the documentation so you know
    how to strip back FreeRTOSConfig.h.

  3. Ensure the application still builds.

  4. Start using the API you have just made available in your application.

I think most of your problems are C compiling and linking problems, not
FreeRTOS problems. For example, if I were doing this and got a linker
problem telling me vAssertCalled() was not defined I would have taken
the following steps.

  1. grep’ed the directory to see where vAssertCalled() was used, and
    noticed it was called by the configASSERT() macro.

  2. Searched the FreeRTOS website or googled configASSERT() and seen it
    was optional and defined by the user not FreeRTOS, so just removed the
    definition or commented it out for later.

  3. Re-compiled and seen that the linker error no longer happened, and
    moved on to investigate the next linker error.

I would have expected it to take me about 5 minutes to take the above
corrective steps.

Your linker errors are nothing to do with FreeRTOS per se.

Regards.

crippler1 wrote on Monday, March 09, 2015:

Hi

I really don’t know what to do anymore

I tried everything you told me, still nothing

please see the attached file

test.c is the main file

Thanks

rtel wrote on Monday, March 09, 2015:

Try

  • removing all the header file inclusions other than FreeRTOS.h and task.h

  • removing the source files that start trc

If that does not work, clean out all the intermediary files (object files and the like), zip up your project (should not be more than a few K of code) and attach the project to a post.

Regards.

crippler1 wrote on Monday, March 09, 2015:

Hi

I have attached my project

thanks

rtel wrote on Monday, March 09, 2015:

The project you attached does not include any header files.

crippler1 wrote on Monday, March 09, 2015:

Hi

I have kept to analyze, until I got link errors
of win API functions,
so after checking I have noticed that the the linker of win32 winmm was
not defined for the project, after defining the problem was solved.