Информацию по make и makefile, прочел вроде понятно. Вот что в доке написано, вроде так и делаю.
Цитата
While these initialization modules are meant as generic startup code there might be the need for customization.
Let’s assume the return value of _sdcc_external_startup() in crtstart.asm should not be checked (or
_sdcc_external_startup() should not be called at all). The recommended way would be to copy crtstart.asm (f.e.
from
http://sdcc.svn.sourceforge.net/viewvc/*ch...vice/lib/mcs51/crtstart.asm) into the source directory, adapt it there, then assemble it with asx8051 -plosgff 4 crtstart.asm and
when linking your project explicitely specify crtstart.rel. As a bonus a listing of the relocated object file crtstart.rst
is generated.
Вот makefile :
Код
CC=sdcc
AS=asx8051
LINKFLAGS=--model-large --code-loc 0x0000 --code-size 0xFFFF --xram-loc 0x0000 --xram-size 0x0700
all: main.hex
main.rel: main.c
$(CC) $(LINKFLAGS) -c main.c
crtstart.rel: crtstart.asm
$(AS) -plosgff crtstart.asm
main.hex: main.rel crtstart.rel
$(CC) $(LINKFLAGS) main.rel crtstart.rel
packihx <main.ihx>main.hex
clean:
@del *.hex *.ihx *.lnk *.mem *.rel *.rst *.sym *.lst *.map
Все компилится получается хекс, но только просматриваю сгенерированный файл main.asm
он должен получится из двух объектных файлов main.rel crtstart.rel а там только от main.rel
может что не так сделал в макефайле ?
Сообщение отредактировал sergey sva - Aug 20 2008, 13:44
Прикрепленные файлы
asm.zip ( 14.16 килобайт )
Кол-во скачиваний: 33