Trying to Make PC_Comm

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

I am working my way through Smiley Book and am now trying to make the programme PC_Comm.

I made the changes to the make file and saved it into the directory with the PC_Comm files. The changes are as follows:

# Target file name (without extension).
TARGET = PC_Comm

# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c
SRC += CommDemo.c

When I do a make All I get the following error:

make.exe: *** No rule to make target `CommDemo.o', needed by `PC_Comm.elf'. Stop.

> Process Exit Code: 2

Make files confuse me completely and I have no idea where to go from here. I have tried the usual, looking for spelling and typos, but can not see any.

I tried doing a make from the command line and get the same error. I'm confused. :?

Thanks for the help

Bob Parry

Bob Parry

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

Quote:
Make files confuse me completely and I have no idea where to go from here.
Me too. Are you using Studio 4.13? If so let it do the makefile for you..if not then..:)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Make files are picky and a topic unto themselves which is why in the book I recommend using the makefile included with the projects software without modifying them.

You usually get the 'no rule to make target' message if makefile cannot find the indicated file. Are you sure it is in the directory with the makefile and that the path is correct?

Smiley

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

I think everything is in the correct place and I am using the make file from the Blinky project. I will double check my paths and try again.

Bob Parry

Bob Parry

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

OK I got it to compile. However I am now more confused than ever regarding make files.

I had all my files including the make file in a directory called PC_Comm. I kept getting the no rule error. So I changed the name of the directory to PC Comm (no underscore) it compiled.

I searched the make file and there is no PC Comm anywhere. So I do not understand why it would not compile, but I am glad that it did.

Bob Parry

Bob Parry

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

Sorry to bump up an old thread, but I had the same problem and spent like 20 minutes trying to figure it out. The cause is a typo in the book, "CommDemo.c" should really be "Demonstrator.c".

The folder name shouldn't have anything at all to do with it.

Source,
http://www.smileymicros.com/inde...