We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I would like to use UV2 to Debug the following assembly language program on a Phytec C508 target board using the Keil Monitor-51 driver. org 0000h main: mov R0, #00h mov p1, #0ffh mov p2, #0ffh end However, when I Debug and single step into the program the code is not executed. When I Run, the code is not executed. Are there settings in UV2 that need to be set? Is there a minimum amount of additional code that needs to be added to test this simple assembly program? Thanks
You don't have any thing hooked up to the external data bus do you? Like a PROM or SRAM? Port 2 is used for addressing so this may be a problem. However, now that I think about it, I seem to remember that Port 2 will take on the 0xFF value in between external data bus transactions so this code should be fine. The move to R0 is useless of course. Are you sure your code is assembling correctly? If there is a monitor then you are probably not able to org to 0x0000 since the monitor needs to be there. How about calling an assembler routing from C's main() function? - Mark
The problem is not that something is tied to the external bus. And the code is assembling correctly. I don't have any problems using the simulator. The problem I am having is when I connect to the target system and try to single step through my code. Other code is executed and eventually NOPs are executed and my code is never reached.
Again, where is the monitor program located? Usually monitors take over the interrupt vectors and "fake out" your application to make it believe it is running on a bare CPU. Try org'ing your program to 0x2000? - Mark
The solution to the problem is as follows. In Keil Select "Options for Target" Select the Debug tab Select Use Keil 51 monitor driver Check Load application at startup I believe that my code was never executed because it was not being load correctly.
That would do it.