Hi Mike, > Look at the assembler listing file generated at the output and you will > see. There is no interrupt code generated (or there was not in my simple > test case I derived from this code ... )
Interrupt function will have code generated, but there will be no interrupt vector. > The key here seems to be that SDCC looks like it either does 'compile' > OR 'link' in one command line invocation. It also cannot compile more > than one source file on a single command line. > > So that > > sdcc project1.c sys.rel > > Has actually the same effect as > > sdcc project1.c > > And the sys.rel bit is ignored :-) This is wrong. Without -c SDCC compiles AND links. It compiles project1.c and then links it with sys.rel. > The problem is worsened by the fact that the code defines the volatile > variable TIMEOUT twice, once in sys.c and once in project1.c according > to the code given. The failure to take any notice of the users request > to link sys.rel then covers up this problem. It should generate an error, doesn't it? > Modular compilation would be more like > > sdcc -c sys.c > sdcc -c project1.c > > sdcc -o project.ihx project1.rel sys.rel > > Which is what a make tool would execute. This is fine too. Maarten ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user