This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Eclipse / CDT without Makefile Project


I have been trying to make an Eclipse/CDT (Juno) project for eCos, but not a Makefile project. Mainly so that it can navigate to h files, and try to see if it will drive GDB.

Eclipse seems to ignore linker options and do its own thing. For example, for the linker I have:

-mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -v -nostdlib -T../../ecos/TWR-K60D100M_install/lib/target.ld

But, it appears that some options, like -T are ignored. And the linker tries to link in crt0.o, even if I set the compile options to not include startup files. What is surprising is Eclipse make a makefile that seemed correct. Although, I am not a gcc/make expert. I did notice it puts all the options on one line, rather than splitting the build into compile and link. Perhaps that is part of the problem. See the makefile below.

Is there a way to make Eclipse strictly obey all my options and build properly?

Does anyone have a simple project I can look at to see how to set this up?

Is this a complete waste of my time?

Mike

Generated Makefile

################################################################################
# Automatically-generated file. Do not edit!
################################################################################

-include ../makefile.init

RM := rm -rf

# All of the sources participating in the build are defined here
-include sources.mk
-include Sources/subdir.mk
-include subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif

-include ../makefile.defs

# Add inputs and outputs from these tool invocations to the build variables 

# All Target
all: hello_world

# Tool invocations
hello_world: $(OBJS) $(USER_OBJS)
	@echo 'Building target: $@'
	@echo 'Invoking: Cross GCC Linker'
	arm-eabi-gcc -nostartfiles -nodefaultlibs -nostdlib -static -mcpu=cortex-m3 -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -v -nostdlib -T../../ecos/TWR-K60D100M_install/lib/target.ld -o "hello_world" $(OBJS) $(USER_OBJS) $(LIBS)
	@echo 'Finished building target: $@'
	@echo ' '

# Other Targets
clean:
	-$(RM) $(OBJS)$(C_DEPS)$(EXECUTABLES) hello_world
	-@echo ' '

.PHONY: all clean dependents
.SECONDARY:

-include ../makefile.targets


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]