From: Robin S. <net...@et...> - 2002-12-17 02:05:09
|
Greetings all. I've been tinkering with a general purpose 89c51Rx+ based board I built f= or=20 fun. Was trying to fiddle around with sdcc and came up with some queries. These MAY not be strictly sdcc specific but I wondered if anyone else fac= ed=20 them Here are a set of problems I am currently facing: 1. For some god forsaken reason, I wish to do some initialisation prior t= o the=20 invocation of the main() function entry point. And I want to do it in asm= =2E=20 So I've gone and written an __sdcc_external_startup call and all is fine = and=20 dandy. I also wish to install my interrupt handlers by hand from here. So I am using the .org asm directive and putting ljmps to my handlers at = the=20 appropriate positions in the memory map and all is well. Now I link the file containing the asm code with a .c file containing the= =20 main() call. I do NOT see my interrupt handler anywhere in the *.lst, *.r= st=20 files generated, even though it behaves exactly as I want it to. I can se= e=20 the __interrupt_vectors symbol but it does not show me the code I have=20 embedded in the external_startup code. Why ? 2. Since I wish to compile a lot of code i thought I would place all of i= t in=20 a nice make environment on my linux box. The rules I have placed are=20 exceedingly simple. The make utility searches for *.c and *.asm files=20 recursively from the root of the repository and does : #C sources to Object code %.rel: %.c =09@$(CC) $(HPATH) $(CFLAGS) $@ $< #Assembly-sources to Object code %.rel: %.asm =09@$(AS) $(ASFLAGS) $@ $< where=20 CC=3Dsdcc CFLAGS=3D-c AS=3Dasx8051 ASFLAGS=3D-l -o -s -g The problem is that everytime an asm file is encountered, I get an error = such=20 as=20 "file.rel: cannot open" and make bombs out. There are no permission related problems at all. Am I missing something ? I would be most grateful if someone could suggest some solutions. Many thanks! Robin. |