WinAVR reports a problem from the Makefile that is generated by Atmel Studio 4.19

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

Hi,

 

I have the attached the generated makefile from Atmel Studio 4.19, but keep getting the below errors when I issue the make command from WinAVR, which I prefer to use.  I have a main.c and a ws2812.s assembly file.  Make keeps reporting that it's looking for the ws2812.c instead of ws2812.s file, even though the rule is specified for the ws2812.s.  Also I keep getting the "sh 1420 sync_with_child: child 3992(0x114) died before initialization with status code 0x0" warning.  Any idea what's the warning is?  Thanks!

 

c:\AVR\projects\default>make
      0 [main] sh 1420 sync_with_child: child 3992(0x114) died before initialization with status code 0x0
    952 [main] sh 1420 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
make: *** No rule to make target `../ws2812.c', needed by `ws2812.o'.  Stop.

Attachment(s): 

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

Looking at a typical AS4.19 Makefile,   I notice:

## General Flags
PROJECT = ahoesch
MCU = atmega2560
TARGET = ahoesch.elf
CC = avr-gcc

CPP = avr-g++

Your 'makefile' has an empty macro for $(CC)

 

I suggest that you delete your project and start again.    Just add your two source files via the IDE.

 

David.

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

david.prentice wrote:

Looking at a typical AS4.19 Makefile,   I notice:

## General Flags
PROJECT = ahoesch
MCU = atmega2560
TARGET = ahoesch.elf
CC = avr-gcc

CPP = avr-g++

Your 'makefile' has an empty macro for $(CC)

 

I suggest that you delete your project and start again.    Just add your two source files via the IDE.

 

David.

 

I ended up using Atmel Studio 6.2 and HAVE to move the file in to the existing project.  Atmel Studio 6.2 does not have the concept of adding a file to a project.  You create a new file, and it does not belong to a existing, open project until you MOVE it to the project of choice.  Thanks.

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

Of course you can add files to an AS6.2 project.    Either as a Link or as a Copy.

 

Your AS4.19 'problem' is due to an empty $(CC)

THis is probably because you specified Project->Custom_Options->External_Tools with an empty path to avr-gcc

 

I suppose that I come from the generation that used the command line.     So I can understand how Make works.

 

It would be worth your while to visit Wikipedia.    See how a traditional language tool set operates.   e.g. .c to .i to .s to .o to .elf to ...

 

In the old days,   it was very simple to type a cc command.    Nowadays,   for a cross-compile,   there are masses of complex parameters and switches.

Hence,   you let Make do the job for you.

 

David.