This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

problem getting a simple app to work on a eprom sim.

hi,

I have a simple question concerning the demo version of uVision 2.

I wrote a simple test program in assembler which just switches an LED and it runs perfect with my target eprom.

I define a offset, so that nothing can be linked into the memory from 0x0 - 0x8000

	offset	equ	0x8000

	cseg at reset
	ds	offset

	cseg at reset+offset
	jmp	init_cpu

        ORG	offset+0x100
        program starts here...

Now I want to create an hex file, which should run on my eprom-simulator.

I thougt, I have to set offset to 0. Then I have some space for the vectors and the program starts at 0x100. But nothing happens. In the debugger it works fine, I have a LJMP at 0x0 to 0x100 and there the program starts, but on the eprom simulator nothing happens.

Where exactly do I have to start the program code in the demo version? I'm using a philips 80c552.

Thanks in advance,
Christian

Parents
  • The reset vector is fixed at 0x0000; it is defined by the CPU hardware - this is the 1st instruction your CPU will executa after a reset.

    Therefore your jmp init_cpu needs to be placed at 0x0000 - then you can locate the rest of your code wherever you like (within the restrictions of the demo version, of course!)

Reply
  • The reset vector is fixed at 0x0000; it is defined by the CPU hardware - this is the 1st instruction your CPU will executa after a reset.

    Therefore your jmp init_cpu needs to be placed at 0x0000 - then you can locate the rest of your code wherever you like (within the restrictions of the demo version, of course!)

Children
  • Therefore your jmp init_cpu needs to be placed at 0x0000

    done.

    then you can locate the rest of your code wherever you like (within the restrictions of the demo version, of course!)

    What exactly are the restrictions of the demo version?

    The docs for the eval-version from keil say Programs start at offset 0x0800.

    Does that mean, that I have to set a jmp at 0x0 pointing at 0x800 and everything is fine (i.e. setting the OFFSET variable in my above example to 0x800)?

    I tried this and it did not work. The problem is, I'm not sure if my eprom simulator works, and before I buy another one I want to be sure.

    Christian

  • The problem is, I'm not sure if my eprom simulator works
    You may try it in the µVision2 simulator.