[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] using c and asm files in one project

From: rudolph
Subject: [avr-gcc-list] using c and asm files in one project
Date: Mon, 16 Apr 2001 14:45:01 +0200

Hi all,

i have an old project with only asm files and want to go to c-source
But there is a single file, call it data.s here, where are some bytes 
defined for the flash space. I want to use the data from that file 
in my project from c code again, but how i have to say my compiler that
there is
an extern defined label in an asm file for the flash space?


.byte 0x01, 0x02 .... 0x00

.byte 0x88, 0x55 ..... 0x00

from my c-code i want to make a call on that labels like:


strcpy( data_ram, label1);
memcpy( data_ram, label2, 0x10);


I think the makefile is something like that:

proj.srec: test.c data.s
        avr-gcc -xassembler-with-cpp data.s -c
        avr-gcc -O test.c -c
        avr-gcc test.o data.o -o proj.out
        avr-objcopy -Osrec proj.out proj.srec

But the compiler tell me that there are no labels 
label1 and label2.

Thanke for your help

reply via email to

[Prev in Thread] Current Thread [Next in Thread]