gmake: *** [] error 1 building FreeRTOS project

jesseb9900 wrote on Tuesday, September 13, 2016:

Good afternoon,

While trying to get started with FreeRTOS, I’ve came across a problem. I tried building the demo project for the TI Hercules Cortex R4 boards, but came across a few unidentifiable (by me) errors. I’ve followed the exact steps given in the tutorial. The only difference is I’m running CCS v6 instead of v5?

The link to the tut: http://www.freertos.org/Free_RTOS_for_TI_RM48_and_TMS570.html#SourceCodeOrg

A bunch of these errors are in the output:

**“C:/Users/jesse/Desktop/Stage Waternet/Software/Zips/FreeRTOSv9.0.0/FreeRTOS/Demo/CORTEX_R4_RM48_TMS570_CCS5/FreeRTOSConfig.h”, line 75: fatal error #35: #error directive: Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
**

And these are a few of the errors in the ‘Problems’ tab:

**gmake: * [Common-Demo-Source/BlockQ.obj] Error 1 CORTEX-R4_TI_CCS5 C/C++ Problem
gmake: * [Common-Demo-Source/blocktim.obj] Error 1 CORTEX-R4_TI_CCS5 C/C++ Problem
gmake: * [Common-Demo-Source/comtest.obj] Error 1 CORTEX-R4_TI_CCS5 C/C++ Problem
gmake: * [Common-Demo-Source/countsem.obj] Error 1 CORTEX-R4_TI_CCS5 C/C++ Problem
gmake: * [Common-Demo-Source/death.obj] Error 1 CORTEX-R4_TI_CCS5 C/C++ Problem
**

I’ve read other users had similar problems and most of the time it was due to a compiler issue. My compiler is the default (?) TI v15.12.3.LTS included in CCSv6

Anybody an idea? Perhaps installing a different compiler like MinWG or Cygwin?

Thanks, Jesse

rtel wrote on Tuesday, September 13, 2016:

You are right in thinking that the compiler mismatch may cause an error.
You can create a FreeRTOS project from TI’s HalCOGen tool too - where
the compiler version will be correct, although I believe their FreeRTOS
version is a little different to ours.

However, in this case the first problem seems to be documented in the
out put you have posted:

line 75: fatal error #35: #error directive: Ensure
CreateProjectDirectoryStructure.bat has been executed before building.
See comment immediately above.

Here you have hit a #error that is telling you to do something (run the
batch file) after which you can delete the #error. It will not build as
long as the #error is there.

jesseb9900 wrote on Tuesday, September 13, 2016:

Ah thanks, fixed it.

I’ve ran the bat file before, so expected the message is only triggered when there is an actual error. I commented the error out and it build alright!

Actually weird right? I don’t suppose it is necessary to comment things out before able to build?

Thanks!

rtel wrote on Tuesday, September 13, 2016:

That is an old project that was created when Eclipse made it extremely
[!] difficult to reference files that were outside of the project
directory - hence a batch file is used to copy the necessary files
(which are common to and built by all FreeRTOS demos) into the project
directory. More recent versions of Eclipse only make it hard (rather
than extremely hard) to reference files outside of the project directory
so use the technique documented on the following link in place of the
batch file:

http://www.freertos.org/Project_Workspace_Relative_File_Paths_Eclipse.html