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 debugging

I have a code that I'm trying to debug with Keil uvision4 .

I set up the project for simulator debugger. However, when I click "Debug" it always goes to the .s file but never enters the c code

Parents
  • it doesn't even go to the C code !!!

    when i click on 'run' the first time it goes to the assembly file then the space in front of these lines become green the second time i click on run nothing change
    and i can't click on run again as if it is still running

     Reset_Handler   PROC
                    GLOBAL Reset_Handler
                    ENTRY
                                    IMPORT  __main
                    LDR     R0, =__main
                    BX      R0                        ;Branch to __main
                    ENDP
    

    .

Reply
  • it doesn't even go to the C code !!!

    when i click on 'run' the first time it goes to the assembly file then the space in front of these lines become green the second time i click on run nothing change
    and i can't click on run again as if it is still running

     Reset_Handler   PROC
                    GLOBAL Reset_Handler
                    ENTRY
                                    IMPORT  __main
                    LDR     R0, =__main
                    BX      R0                        ;Branch to __main
                    ENDP
    

    .

Children
  • >>i can't click on run again as if it is still running

    Then press STOP and see where it is stuck, or frankly STEP INTO the code and follow what is happening. Debugging about having a clue about what is going on.

    >>it doesn't even go to the C code !!!

    The processor doesn't run C code.

  • I am not an informatic engineer so i may not grasp the meaning behind all these concepts. I apologize if i didn't fully understand your answer or may be i didn't succeeded in explaining my problem
    to know where is the bug i have to go step by step or do some breakpoints
    usually when i try to debug my project , which is composed of a .s file where i define my vector table and a c. code that contains my algorithm, when i go step by step the space in front of each executed line become green and so on until i find the bug
    however in my case not a single instruction was executed.
    Even if my "code is looping for some hardware that doesn't exist"

    at least there are some instruction that should be working fine my first code line is

     A = (0.7854 * D*D); //cross section area