tech-embed archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Embedded development platform
This is my (very) basic program that I am trying to write using a
cross-compiled NetBSD toolchain. To do this i simply did the following...
$ cd /usr/src
<download and unpack sources into /usr/src>
$ ./build.sh -m m68k -t
$ cd ~
$ mkdir coldfire
$ mkdir coldfire/tools
$ cd coldfire/tools
$ cp -R /usr/src/tools/obj/tools.NetBSD-1.6.2-i386/* .
$ cd ..
$ mkdir Projects
$ mkdir Projects/EvalBoard
$ cd Projects/EvalBoard
In this folder I have the following files...
init.asm
1)
2) .text
3) .global _start
4)
5) # A Comment
6) # .equ TEST_CONSTANT, 0x200
7) .set TEST_CONSTANT,0x200
8) _start:
9)
10) move.b TEST_CONSTANT,d0
11)
Makefile
1) TOOLBIN=../../tools/bin
2) ASM=$(TOOLBIN)/m68k--netbsdelf-as
3) LINKER=$(TOOLBIN)/m68k--netbsdelf-ld
4) OBJCOPY=$(TOOLBIN)/m68k--netbsdelf-objcopy
5)
6) code.o : init.o
7) $(LINKER) init.o -o code.o
8)
9) init.o : init.asm
10) $(ASM) -m68020 -o init.o init.asm
11)
12) clean :
13) rm init.o
14)
When I do a "make" I get the following error...
../../tools/bin/m68k--netbsdelf-as -o init.o init.asm
../../tools/bin/m68k--netbsdelf-ld init.o -o code.o
init.o: In function `_start':
init.o(.text+0x4): undefined reference to `d0'
*** Error code 1
Stop.
make: stopped in /usr/coldfire/Projects/EvalBoard
It looks like the assembler assumes that d0 is a variable, when it should
be data register 0. Looking at the docs for the assembler, I don't see
anything special.
Any ideas? Thanks in advance.
--
Brian
Home |
Main Index |
Thread Index |
Old Index