Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

AVR Studio assembler and avr gcc

AVR Studio assembler and avr gcc

2005-08-18 by Wojciech Bober

I have some asm code which I've wrote in AVR Studio. Is it possible to
assemble it using avr-as and link with code written in C?

-- 
Wojtek

JID: bvr@helios.int.pl

RE: [AVR-Chat] AVR Studio assembler and avr gcc

2005-08-18 by wbounce

Yes as long as you include the right info in your make file

My make file has a ASRC=  Entry where I would list my assembler file.
Also I think the extension needs to be .S (case matters)
Then there is a -Wa option that passes thing to the assembler mine look
like
CFLAGS += -Wa,-adhlns=$(<:.c=.lst)

I also have this 
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs 


And this
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o) 
And this
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)


And this
# Assemble: create object files from assembler source files.
%.o : %.S
	@echo
	@echo $(MSG_ASSEMBLING) $<
	$(CC) -c $(ALL_ASFLAGS) $< -o $@


Hope this helps
Show quoted textHide quoted text
-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On
Behalf Of Wojciech Bober
Sent: Thursday, August 18, 2005 3:15 PM
To: avr-chat@yahoogroups.com
Subject: [AVR-Chat] AVR Studio assembler and avr gcc



I have some asm code which I've wrote in AVR Studio. Is it possible to
assemble it using avr-as and link with code written in C?

-- 
Wojtek

JID: bvr@helios.int.pl




 
Yahoo! Groups Links

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.