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

How to set breakpoints in an assembly program?

Hello,
I can't set breakpoints in my assembly program if I run it using the monitor (Phytec MM167)! I can step through it and let it run to the cursor line, but setting a breakpoint isn't possible.
In simulator mode everything works fine.
I'm using a Phytec miniModul-167 with 256kB SRAM and 256kB Flash ROM. I'm working with the evaluation version of uVision2. My trivial program only fills a part of the memory with concurrent values (see below).

	NAME	fillMem
$NOLIST
$INCLUDE(REG167.INC)
$LIST

PAGE3	DGROUP	SYSTEM, Stack_s, Data_s
	ASSUME 	DPP3:PAGE3

;------ Stack Section
Stack_s	SECTION DATA SYSSTACK
Start_of_stack:
	DSW     40	  ; Reserve 40 non-init.
Top_of_stack:    	  ; words
Stack_s	ENDS

;------ Data Section
Data_s	SECTION DATA
Tab1:	DSW	64
Data_s	ENDS

;------ Initializing Code Section
Init_s	SECTION CODE AT 0
Init	PROC
      	jmp     Start	  ; Entry Point
Init 	ENDP
Init_s	ENDS

;------ Relocatable Code Section
Code_s	SECTION CODE
FillMem	PROC
Start:	mov	sp,#top_of_stack
; Fill table Tab1 with values 1 to 64
        mov     r0,#64	  ; Count = 64
        mov     r1,#1 	  ; Value = 1
        mov     r8,#Tab1  ; Adr = Tab1
Loop1:  mov     [r8],r1	  ; (Adr) = Value
        add     r1,#1  	  ; Value++
        add     r8,#2  	  ; Adr = Adr + 2 (Words!)
        sub     r0,#1  	  ; Count--
        jmp     cc_nz,Loop1 ; Do While(Count != 0)
Ende:	jmp     Ende 	  ; stop
FillMem ENDP
Code_s	ENDS	  	  ; End of code section
      	END

I reserved some memory for the traps as described in the Getting Started User's Guide (RESERVE 8H-0BH, 0ACH-0AFH). External Memory settings are: #1 RAM 0x0 size 0x3FFF, #2 ROM 0x10000 size 0x3FFF.
If I write C-code programs everything works just fine!

Do I have to make additional settings or is it simply not possible to set breakpoints in assembly programs?
Can anyone help me?

0