FreeRTOS Makefile

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have Downloaded FreeRTOSV8.2.3 and copied the core folders/files into a new project AS7 C/C++, added folders to project directories and trying to compile them.

 

the errors I am getting are:
Error  invalid operands (*UND* and *UND* sections) for `<<' .....src\freertos\portable\GCC\AVR32_UC3\exception.S 290

I am trying to make the demo project so I have something to compare with as per instructions:

 

  1. Open a command prompt (Cygwin or Windows) and navigate to the FreeRTOS/Demo/AVR32_UC3/AT32UC3A/GCC or FreeRTOS/Demo/AVR32_UC3/AT32UC3B/GCC directory for the UC3A and UC3B demos respectively.
  2. Enter the command 'make'.

 

How do I navigate in command prompt? to run make?

 

If I run make -f "D:\FreeRTOS\FreeRTOSV8.2.3\FreeRTOS\Demo\AVR32_UC3\AT32UC3A\GCC\"

Or make -f "D:\FreeRTOS\FreeRTOSV8.2.3\FreeRTOS\Demo\AVR32_UC3\AT32UC3A\GCC\config.mk"

I get the error *** No Targets. Stop

What does this mean?

Last Edited: Tue. May 3, 2016 - 08:28 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How do I navigate in command prompt? to run make?

Oh you kids!

 

The MS-DOS command to change directory is CD. So you just type:

C:\> CD /FreeRTOS/Demo/AVR32_UC3/AT32UC3A/GCC

Of course this pre-supposes that all the FreeRTOS stuff has been unpacked to C:\FreeRTOS\. If it is somewhere else then change the start of that destination.

 

To run make you do nothing more than type the command make:

C:\wherever\> make

However this pre-supposes that the PATH environment variable has been updated to include the location where make.exe resides. When MS-DOS tries to run a command it takes what you type ("make") adds ".exe" to it and then tries to load that from the current directory. If that fails it then tries the first entry in PATH. If that fails it tries the next and so on. So you might need to update PATH to include the location where make.exe is located.

 

HOWEVER Studio 7 makes this much easier for you. Rather than just run "Command Prompt" from the Windows Start menu there is a menu entry on the Tools menu of Studio 7 that offers to run a Command Prompt for you. If you do that then it starts a command prompt but (importantly) it adds the location of all the GCC /GNU .exe files that Studio itself uses to PATH. So if you CD to any location and "make" it will work. What's more it'll even run the RIGHT version of make (just in case there are already more than one on your machine).

 

EDIT: ah, I now see you have your FreeRTOS installed on drive D:. In that case you probably need to do this:

C:\> D:
D:\> CD \FreeRTOS\FreeRTOSV8.2.3\FreeRTOS\Demo\AVR32_UC3\AT32UC3A\GCC\

The "D:" on its own switches the current drive from C: (which is probably where a COmmand Prompt will first put you) to D:. The following CD then applies to a directory on D:.

Last Edited: Thu. Jan 14, 2016 - 09:46 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, Old Timer!smiley

 

Runs better, however I am now getting this result with 1 error:

 

D:\FreeRTOS\FreeRTOSV8.2.3\FreeRTOS\Demo\AVR32_UC3\AT32UC3A\GCC>make
ECHO is off.
ECHO is off.
avr32-gcc (AVR_32_bit_GNU_Toolchain_3.4.3_820) 4.4.7
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

Compiling \`../../BOARDS/EVK1100/led.c\' to \`../../BOARDS/EVK1100/led.o\'.
Warning: Deprecated arch `uc' specified. Please use '-march=ucr1' instead. Using arch 'ucr1'
../../BOARDS/EVK1100/led.c:1: error: Conflicting architectures implied by -mpart and -march

 

make: *** [../../BOARDS/EVK1100/led.o] Error 1

 

 

How do I go about debugging this?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My most recent download of FreeRTOS is just 8.1.0 not the 8.2.3 but I'm guessing the UC3 code in it hasn't changed as the error you are getting looks like it's because the FreeRTOS code was written for an ancient version of the avr32-gcc compiler. So what I find in the makefile is this:

# ** ** ** *** ** ** ** ** ** ** ** ** ** ** **
# MAKE RULES
# ** ** ** *** ** ** ** ** ** ** ** ** ** ** **

# Include the make configuration file.
include $(MAKECFG)

so it's actually getting the $(ARCH) value used in -march, for example:

CPPFLAGS  = -march=$(ARCH) -mpart=$(PART) $(WARNINGS) $(DEFS) \
            $(PLATFORM_INC_PATH:%=-I%) $(INC_PATH:%=-I%) $(CPP_EXTRA_FLAGS)

from a separate config.mk file which includes:

# CPU architecture: {ap|uc}
ARCH = uc

# Part: {none|ap7xxx|uc3xxxxx}
PART = uc3a0512

The (later) version of the compiler you are using says that "-march=uc" is deprecated and you should not be using "-march=ucr1" so I guess you need to edit config.mk to have:

# CPU architecture: {ap|uc}
ARCH = ucr1

# Part: {none|ap7xxx|uc3xxxxx}
PART = uc3a0512

But it's possible there may be other "issues" by using a more modern compiler.

 

BTW I thought that Atmel's ASF contained a copy of FreeRTOS for UC3. They are also the ones who build the avr32-gcc compiler so there's a pretty fair bet that if they have a copy of FreeRTOS they have made it work with the latest issue of their compiler. The stuff in the generic FreeRTOS download probably dates from several years ago!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks that gave me some insight into what I'm dealing with.

 

I setup a Virtual Machine and Tried AS6.1, AS5.1 and attempted AS4(Not sure how to use that one)

they gave me the same error.

 

Change of tactic: I also downloaded FreeRTOS 8.1.0 same version you are using

Compiling gives the same errors:

 

Error  invalid operands (*UND* and *UND* sections) for `<<' .....src\freertos\portable\GCC\AVR32_UC3\exception.S

Error  invalid operands (*UND* and *UND* sections) for `<<' .....src\freertos\portable\GCC\AVR32_UC3\exception.S

Error  invalid operands (*UND* and *UND* sections) for `<<' .....src\freertos\portable\GCC\AVR32_UC3\exception.S

Error  invalid operands (*UND* and *UND* sections) for `<<' .....src\freertos\portable\GCC\AVR32_UC3\exception.S

 

The code it is referring to is:

.global ipr_val
  .type ipr_val, @object
ipr_val:
  .word (INT0 << AVR32_INTC_IPR0_INTLEV_OFFSET) | (_int0 - _evba),\
        (INT1 << AVR32_INTC_IPR0_INTLEV_OFFSET) | (_int1 - _evba),\
        (INT2 << AVR32_INTC_IPR0_INTLEV_OFFSET) | (_int2 - _evba),\
        (INT3 << AVR32_INTC_IPR0_INTLEV_OFFSET) | (_int3 - _evba)

It would appear the definitions are undefined.

I presume they should be in "intc.h" given the include at the top of page:

#include "intc.h"

this include file exists in ASF, does this mean ASF is a dependency of FREERTOS? (Wouldn't have thought so)

Which ASF Version?...

 

Could you please have a look to see where these definitions should be?

Or if they need to be changed?

 

BTW I thought that Atmel's ASF contained a copy of FreeRTOS for UC3.

I would have thought so, I looked for FreeRTOS as new project, Board and ASF wizard with no luck.

Only place I found it was in a sample project using FreeRTOS 7.0.0 from 2011(Very different)

 

If you know something I don't I'm all ears!

Sorry I was not expecting so many road blocks, seemed such a simple well documented path.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gave up, stick with tasks, use interrupts when response time is critical.