From: Shakthi Kannan <shakthimaan@yahoo.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] print problem on ARM, toolchain 3.4.3
Date: Sun, 13 Nov 2005 22:39:16 -0800 (PST) [thread overview]
Message-ID: <20051114063916.10876.qmail@web30715.mail.mud.yahoo.com> (raw)
Greetings!
This is a followup on use of printf with u-boot-1.1.2
with cross-toolchains 2.95.3 and Codesourcery's 3.4.3
on ARM.
http://sourceforge.net/mailarchive/message.php?msg_id=13329626
I am now trying to write a standalone code to be run
with u-boot. This is the simple foo.c file:
/*
* foo.c
*
*/
#include <common.h>
#include <exports.h>
int main (int argc, char *argv[])
{
/* Print the ABI version */
app_startup(argv);
putc ('c');
return (0);
}
The Makefile for cross-compilation:
# Makefile
# Tools
CROSS =
/usr/local/arm/3.4.3/bin/arm-none-linux-gnueabi-
CC = $(CROSS)gcc
AS = $(CROSS)as
LD = $(CROSS)ld
OBJCOPY = $(CROSS)objcopy
TARGET = foo
BASE = 0x04000000
CFLAGS = -fno-strict-aliasing -fno-common -ffixed-r8
-msoft-float -D__KERNEL__ -fno-builtin -ffreestanding
-nostdinc -isystem
/usr/local/arm/3.4.3/bin/../lib/gcc/arm-non-linux-gnueabi/3.4.3/include
-pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -Wall
-Wstrict-prototypes
INCLUDE =
-I/home/shaks/docs/monitor/u-boot/u-boot-1.1.2/include
-I/usr -I$(LIBSTUB_INCLUDE)
LIBSTUB_INCLUDE =
/usr/local/arm/3.4.3/bin/../lib/gcc/arm-none-linux-gnueabi/3.4.3/include
LDFLAGS = -Ttext $(BASE) -e main
all:
$(CC) $(CFLAGS) $(INCLUDE) -c $(TARGET).c -o
$(TARGET).o
$(LD) $(LDFLAGS) $(TARGET).o -o $(TARGET)
objcopy:
$(OBJCOPY) -O binary $(TARGET) $(TARGET).bin
2>/dev/null
clean:
rm -f *~ *.o *.bin $(TARGET)
On running make clean; make, I get this output:
/usr/local/arm/3.4.3/bin/arm-none-linux-gnueabi-gcc
-fno-strict-aliasing -fno-common -ffixed-r8
-msoft-float -D__KERNEL__ -fno-builtin -ffreestanding
-nostdinc -isystem
/usr/local/arm/3.4.3/bin/../lib/gcc/arm-non-linux-gnueabi/3.4.3/include
-pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -Wall
-Wstrict-prototypes
-I/home/shaks/docs/monitor/u-boot/u-boot-1.1.2/include
-I/usr
-I/usr/local/arm/3.4.3/bin/../lib/gcc/arm-none-linux-gnueabi/3.4.3/include
-c foo.c -o foo.o
/usr/local/arm/3.4.3/bin/arm-none-linux-gnueabi-ld
-Ttext 0x04000000 -e main foo.o -o foo
foo.c:1: warning: target CPU does not support
interworking
foo.o: In function `main':
foo.c:(.text+0x1c): undefined reference to
`app_startup'
foo.c:(.text+0x24): undefined reference to `putc'
make: *** [all] Error 1
foo.o gets created. putc is declard in common.h, but,
where is the actual definition? I'd appreciate any
input from folks who have done similar style of
firmware development with u-boot.
Thanks,
SK
--
Shakthi Kannan, MS
Software Engineer, Specsoft (Hexaware Technologies)
[E]: shakthimaan at yahoo.com [M]: (91) 98407-87007
[W]: http://www.shakthimaan.com [L]: Chennai, India
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
next reply other threads:[~2005-11-14 6:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-14 6:39 Shakthi Kannan [this message]
2005-11-14 9:27 ` [U-Boot-Users] print problem on ARM, toolchain 3.4.3 Wolfgang Denk
2005-11-14 10:11 ` Shakthi Kannan
2005-11-14 10:45 ` Shakthi Kannan
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=20051114063916.10876.qmail@web30715.mail.mud.yahoo.com \
--to=shakthimaan@yahoo.com \
--cc=u-boot@lists.denx.de \
/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