New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

armv4t vs armv4tl architecture argument to as

Got problems with Bubba? Then this forum is for you.
Locked
ceb
Posts: 9
Joined: 16 Aug 2007, 07:58

armv4t vs armv4tl architecture argument to as

Post by ceb »

I am trying to compile an application that uses assembly language, yet as is having problems when I specify march=armv4tl, which is what comes from uname -m. as does work with march=armv4t (no trailing l). I have looked fairly deeply for a description of the difference between these two architecture models, but I don't seem to find one.

I would guess that armv4tl is an evolution or superset of armv4t, but it would be nice to know in advance rather than have it come and bite me in the middle of something else.

Thanks,

/Charles
wmnelis
Posts: 8
Joined: 21 Jun 2007, 10:30

Post by wmnelis »

Unfortunately I do not have an answer to your question. Instead I have been having trouble getting any assembly code to work on the Bubba. I am currently trying to learn ARM assembly. I am using GNU Assembler (as it seems you are as well). I am trying to assemble the following source file:

----
.section .data
output:
.ascii "Hello ARM!\n"
filename:
.ascii "output.txt\n"
.section .text
.global _start
_start:
#
#;; Open the output file for writing
#
mov %r0, #filename
mov %r1, $4 @ 4 = write only
swi 0x66 @ 0x66 = Open file
mov %r5, %r0 @ Save the file handle in r5

#
#;; Write the string
#
adr %r1, output
mov %r2, $11 @ The string is 11 chars long
swi 0x69 @ 0x69 = Write to file

#
#;; Close the file
#
mov %r0, %r5 @ Move the file handle back to r0
swi 0x68 @ 0x68 = Close file

#
#;; Exit the program
#
swi 0x11 @ 0x11 = Exit
----

with the following makefile:


----
##
## Macros
##

# Environment macros
AS=as
LD=ld
RM=rm -f

# Project macros
EXE_NAME=hello #Put the name you want the executable to have here
ASFLAGS=
LDFLAGS=

##
## File List
##

# Project file list (leave off the suffixes)
SOURCE_FILES= \
hello

# 3rd party file list
LIBRARIES= \
#Put any required 3rd party libraries here

##
## Suffix rules (do not change)
##

##
## Commands (do not change)
##

# Build the executable only
exe: \
compile \
all

# Compile all files
compile: ${SOURCE_FILES:=.s}
${AS} -march=armv4t ${ASFLAGS} -o ${SOURCE_FILES:=.o} ${SOURCE_FILES:=.s} ${LIBRARIES}

# Link object files into executable
all: ${SOURCE_FILES:=.o}
${LD} ${LDFLAGS} -o ${EXE_NAME} ${SOURCE_FILES:=.o} ${LIBRARIES}

# Get rid of all non-source files
clean:
${RM} ${EXE_NAME} ${SOURCE_FILES:=.o}

----

Any help you could provide would be greatly appreciated.

Thanks.
Locked