can i test a code in codewarrior4.6 without a target board?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

can i test a code in codewarrior4.6 without a target board?

Jump to solution
2,408 Views
Xbot
Contributor II
hi,
 
i want to test a code and perform instructions to verify how many clock cycles are spent. Is this possible?
 
thanks,
Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,401 Views
CrasyCat
Specialist III
Hello
 
You can use the simulator for that.
 
I would proceed as follows:
  - Start the simulator and load your code
  - Set a Breakpoint on the beginning of the code snippet on which you want to evaluate the cycle count
  - Set a breakpoint at the end of the code snippet on which you want to measure cycle count
  - Run till first breakpoint is reached.
  - On the debugger Status bar you have different area. Next to the frequency area you have a small
   area denoting the current cycle counts. Double click within that area to reset the cycle count to 0
  - Run till second breakpoint is reached
 
You see the number of cycles between the two breakpoint in the status bar (in the area where you did double click before).
 
I hope this helps
 
CrasyCat

View solution in original post

0 Kudos
Reply
2 Replies
1,402 Views
CrasyCat
Specialist III
Hello
 
You can use the simulator for that.
 
I would proceed as follows:
  - Start the simulator and load your code
  - Set a Breakpoint on the beginning of the code snippet on which you want to evaluate the cycle count
  - Set a breakpoint at the end of the code snippet on which you want to measure cycle count
  - Run till first breakpoint is reached.
  - On the debugger Status bar you have different area. Next to the frequency area you have a small
   area denoting the current cycle counts. Double click within that area to reset the cycle count to 0
  - Run till second breakpoint is reached
 
You see the number of cycles between the two breakpoint in the status bar (in the area where you did double click before).
 
I hope this helps
 
CrasyCat
0 Kudos
Reply
1,401 Views
Xbot
Contributor II
it sure did help a lot with regards to the procedure where you can reset the clock cycle... thanks.
0 Kudos
Reply