RTOSDemo Build with Atmel Studio 7

cyberrecon wrote on Saturday, August 20, 2016:


Total beginner here. I’m trying to compile the RTOSDemo provided here. I’m using Atmel Studio 7 and trying to generate the ELF file for the ATSAM4E16E. Note that at this point, I am simply trying to generate the binary file and nothing else. I have run into minor snags which required some changes but I am not stuck at this issue:

Severity	Code	Description	Project	File	Line
Error		recipe for target 'src/ASF/thirdparty/freertos/freertos-7.3.0/source/FreeRTOS_CLI.o' failed	RTOSDemo	C:\Users\...\FreeRTOS_Labs_160112\FreeRTOS-Plus\Demo\FreeRTOS_Plus_TCP_and_FAT_ATSAM4E\Debug\Makefile	912
Error		unknown type name 'portTickType'	RTOSDemo	C:\Users\...\FreeRTOS_Labs_160112\FreeRTOS-Plus\Demo\FreeRTOS_Plus_TCP_and_FAT_ATSAM4E\src\ASF\thirdparty\freertos\freertos-7.3.0\source\include\list.h	109

There are 11 additional similar errors since it doesn’t seem to find the definition for portTickType which appears to be in portmacro.h.

The only changes I made so far were in the makefile to fix the case of the ‘ftp_server.c’ file:

    <Compile Include="..\..\Source\FreeRTOS-Plus-TCP\protocols\FTP\FreeRTOS_FTP_server.c">

and modified the cycle_counter.c file to fix the ‘undeclared s attribute’ error:

	__attribute__ ((section(".ramfunc")))
		void portable_delay_cycles(unsigned long n)

However I couldn’t find any post relating to this portTickType error. Could any one suggest any solution so the project compiles properly with Atmel Studio 7? Let me know if you need more information.


rtel wrote on Saturday, August 20, 2016:

Sorry I don’t know what it is you are trying to compile. The error message is for an old FreeRTOS file that it is building in the src/ASF/thirdparty/freertos/freertos-7.3.0/source directory - that is where Atmel Studio will put FreeRTOS files if you have the Atmel Software Framework (ASF) add FreeRTOS to a project for you. However, the project on the page you link to does not do that, and instead includes a much newer version of FreeRTOS in the FreeRTOS/Source directory, as per the normal FreeRTOS distribution.

You should be able to download the FreeRTOS labs source files (which will be updated to a new version imminently), open \FreeRTOS-Plus\Demo\FreeRTOS_Plus_TCP_and_FAT_ATSAM4E\RTOSDemo.atsln solution file from within Atmel Studio, then build without any problems - and the file you are having a problem building in your first post is not part of that project.