From: Maarten B. <sou...@ds...> - 2006-12-29 09:34:06
|
Chris, I haven't checked with SDCC 2.6.0 but 2.6.2 properly issues a warning: ?ASlink-Warning-Undefined Global 'foo' referenced by module '' What command line options did you use to assemble vect.asm? I used: asx8051 -plosgff vect.asm Maarten > I've created a newbie puzzle for myself. > > I'm working with a Cypress FX2LP. I'm trying to put a ljmp at address 0x0000 that jumps to > my startup code like the GnuRadio folks do in their firmware. I have a vect.a51 file > with the two lines > > > __reset_vector:: > ljmp foo > > > I also have a main.c, of course. > > The thing is this. I compile everything separately without error, then use a > linker line like > > sdcc -o main.ihx vect.rel main.rel > > which links without error. The problem is, I never defined "foo", the target for the > ljmp! When I look at the generated code, there is a ljmp 0 at address 0. How did > "foo" get to be zero. Why didn't the linker flag an error? I don't really want foo, of > course, I want the address of my startup code, which the GnuRadio folks nab with > > ljmp s_GSINIT > > If I use that, I still get no error and a ljmp to zero. > > I'm using a SDCC 2.6.0 binary on WinXP. Is this a compiler/linker/asm bug? Or am I just > being a dunce? > > -- > C |