public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Michael Jones <mjones@linear.com>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] Eclipse / CDT without Makefile Project
Date: Thu, 20 Dec 2012 07:44:00 -0000	[thread overview]
Message-ID: <CF3CE19A-837E-4CF9-B2E9-26A615BC0585@linear.com> (raw)

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

             reply	other threads:[~2012-12-20  7:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-20  7:44 Michael Jones [this message]
2012-12-20  8:32 ` [ECOS] " John Dallaway
2012-12-20 15:15   ` [ECOS] " Michael Jones
2012-12-20 15:34     ` [ECOS] " John Dallaway
2012-12-21  7:03       ` [ECOS] " Michael Jones
2012-12-22 11:00         ` Ilija Kocho
     [not found]           ` <02A08039-66E9-4427-9E68-7C66E5C4200D@linear.com>
     [not found]             ` <50D5E4B9.5010300@siva.com.mk>
2012-12-22 20:42               ` Michael Jones
     [not found]                 ` <48C70F8E-290F-4E62-98FC-E5CEA9906AAE@linear.com>
2012-12-23  0:09                   ` Ilija Kocho
2012-12-23  0:19                     ` Michael Jones
2012-12-23 17:58                       ` Ilija Kocho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CF3CE19A-837E-4CF9-B2E9-26A615BC0585@linear.com \
    --to=mjones@linear.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).