Difference between revisions of "User:Simonea"

From eLinux.org
Jump to: navigation, search
Line 1: Line 1:
 
Enrolled in [[ECE597 - 32-bit Embedded Linux, Rose-Hulman|ECE 597]] at Rose-Hulman Institute of Technology, working on [[ECE597 Interactive Pong]]
 
Enrolled in [[ECE597 - 32-bit Embedded Linux, Rose-Hulman|ECE 597]] at Rose-Hulman Institute of Technology, working on [[ECE597 Interactive Pong]]
 +
 +
==Lab 5 Part C==
 +
I found the following makefile to work, while the suggested alterations and the file in "solutions/lab05c_x86_configuro/app" did not work for me:
 +
<pre># ****************************************************************************
 +
# Makefile
 +
#
 +
# x86 makefile for lab 5 part c.
 +
#
 +
# **NOTE: ensure that the values in setpaths.mak are set properly for where
 +
#   the actual packages are
 +
# ****************************************************************************
 +
 +
include ../../setpaths.mak
 +
 +
#Variables
 +
CC := $(LINUX86_GCC)
 +
CC_ROOT := $(LINUX86_DIR)
 +
CFLAGS := -g
 +
LINKER_FLAGS := -lstdc++
 +
 +
#Configuro Vars
 +
CONFIG := app_cfg
 +
XDC:=$(XDC_INSTALL_DIR)/xdc
 +
CONFIGURO:= $(XDC_INSTALL_DIR)/xs xdc.tools.configuro
 +
export XDCPATH:=/home/user/rtsc_primer/examples;$(XDCROOT)
 +
TARGET  := gnu.targets.Linux86
 +
PLATFORM := host.platforms.PC
 +
 +
.PHONY:all
 +
all:app.x86U
 +
 +
.PHONY : clean
 +
clean  :
 +
@rm -rf app.x86U
 +
@rm -rf app.o
 +
@rm -rf $(CONFIG)
 +
 +
#Primary
 +
app.x86U : app.o linker.cmd
 +
@$(CC) $(CFLAGS) $(LINKER_FLAGS) $< $(CONFIG)/linker.cmd -o $@
 +
@echo $@ successfully created
 +
 +
%.o : %.c $(CONFIG)/compiler.opt
 +
@$(CC) $(CFLAGS) $(shell cat $(CONFIG)/compiler.opt) -c $< -o $@
 +
 +
compiler.opt linker.cmd : $(CONFIG).cfg
 +
@$(CONFIGURO) -c $(CC_ROOT) -t $(TARGET) -p $(PLATFORM) -o $(CONFIG) $^
 +
@echo "Configuro has completed; it's results are in $(CONFIG) "
 +
</pre>
  
 
[[Category:ECE597]]
 
[[Category:ECE597]]

Revision as of 21:19, 15 April 2010

Enrolled in ECE 597 at Rose-Hulman Institute of Technology, working on ECE597 Interactive Pong

Lab 5 Part C

I found the following makefile to work, while the suggested alterations and the file in "solutions/lab05c_x86_configuro/app" did not work for me:

# ****************************************************************************
# Makefile
#
# x86 makefile for lab 5 part c.
#
# **NOTE: ensure that the values in setpaths.mak are set properly for where 
#	  the actual packages are
# ****************************************************************************

include ../../setpaths.mak

#Variables
CC := $(LINUX86_GCC)
CC_ROOT := $(LINUX86_DIR)
CFLAGS := -g
LINKER_FLAGS := -lstdc++

#Configuro Vars
CONFIG := app_cfg
XDC:=$(XDC_INSTALL_DIR)/xdc
CONFIGURO:= $(XDC_INSTALL_DIR)/xs xdc.tools.configuro
export XDCPATH:=/home/user/rtsc_primer/examples;$(XDCROOT)
TARGET   := gnu.targets.Linux86
PLATFORM := host.platforms.PC

.PHONY:all
all:app.x86U

.PHONY : clean
clean  :
	@rm -rf app.x86U	
	@rm -rf app.o
	@rm -rf $(CONFIG)

#Primary
app.x86U : app.o linker.cmd
	@$(CC) $(CFLAGS) $(LINKER_FLAGS) $< $(CONFIG)/linker.cmd -o $@
	@echo $@ successfully created

%.o : %.c $(CONFIG)/compiler.opt
	@$(CC) $(CFLAGS) $(shell cat $(CONFIG)/compiler.opt) -c $< -o $@

compiler.opt linker.cmd : $(CONFIG).cfg 
	@$(CONFIGURO) -c $(CC_ROOT) -t $(TARGET) -p $(PLATFORM) -o $(CONFIG) $^
	@echo "Configuro has completed; it's results are in $(CONFIG) "