I select my device in the debugger, as shown in the attached screenshot. When I click on 'Start debugging', the debugging does not start. Using the simulator as a debugger, the debugging starts even without adding breakpoints. What is the issue?
After clicking on 'Start debugging'
This is my code:
start:
; To read all 10 serial bytes from the signature row, following steps must be performed:
; 1. Load the Z-pointer with the signature byte address given
; 2. Set the SIGRD bit in the SPMCSR register
; 3. Set the SPMEN bit in the SPMCSR register
; 4. Load from Z register to general register
; 5. General register now contains the serial byte
; Read Serial Number Byte 0
ldi ZH, 0x00
ldi ZL, 0x0E // Set address of the Signature row to be read
; Load SPMCSR bits into R16, then write to SPMCSR
ldi R16, 0x21 ; (1<<SIGRD)|(1<<SPMEN)
out SPMCSR, R16
LPM R0, Z
; Read Serial Number Byte 1
ldi ZH, 0x00
ldi ZL, 0x0F // Set address of the Signature row to be read
; Load SPMCSR bits into R16, then write to SPMCSR
ldi R16, 0x21 ; (1<<SIGRD)|(1<<SPMEN)
out SPMCSR, R16
LPM R1, Z
; Read Serial Number Byte 2
ldi ZH, 0x00
ldi ZL, 0x10 // Set address of the Signature row to be read
; Load SPMCSR bits into R16, then write to SPMCSR
ldi R16, 0x21 ; (1<<SIGRD)|(1<<SPMEN)
out SPMCSR, R16
LPM R2, Z
; Read Serial Number Byte 3
ldi ZH, 0x00
ldi ZL, 0x11 // Set address of the Signature row to be read
; Load SPMCSR bits into R16, then write to SPMCSR
ldi R16, 0x21 ; (1<<SIGRD)|(1<<SPMEN)
out SPMCSR, R16
LPM R3, Z
; Read Serial Number Byte 4
ldi ZH, 0x00
ldi ZL, 0x12 // Set address of the Signature row to be read
; Load SPMCSR bits into R16, then write to SPMCSR
ldi R16, 0x21 ; (1<<SIGRD)|(1<<SPMEN)
out SPMCSR, R16
LPM R4, Z
; Read Serial Number Byte 5
ldi ZH, 0x00
ldi ZL, 0x13 // Set address of the Signature row to be read
; Load SPMCSR bits into R16, then write to SPMCSR
ldi R16, 0x21 ; (1<<SIGRD)|(1<<SPMEN)
out SPMCSR, R16
LPM R5, Z
; Read Serial Number Byte 6
ldi ZH, 0x00
ldi ZL, 0x14 // Set address of the Signature row to be read
; Load SPMCSR bits into R16, then write to SPMCSR
ldi R16, 0x21 ; (1<<SIGRD)|(1<<SPMEN)
out SPMCSR, R16
LPM R6, Z
; Read Serial Number Byte 7
ldi ZH, 0x00
ldi ZL, 0x15 // Set address of the Signature row to be read
; Load SPMCSR bits into R16, then write to SPMCSR
ldi R16, 0x21 ; (1<<SIGRD)|(1<<SPMEN)
out SPMCSR, R16
LPM R7, Z
; Read Serial Number Byte 8
ldi ZH, 0x00
ldi ZL, 0x16 // Set address of the Signature row to be read
; Load SPMCSR bits into R16, then write to SPMCSR
ldi R16, 0x21 ; (1<<SIGRD)|(1<<SPMEN)
out SPMCSR, R16
LPM R8, Z
; Read Serial Number Byte 9
ldi ZH, 0x00
ldi ZL, 0x17 // Set address of the Signature row to be read
; Load SPMCSR bits into R16, then write to SPMCSR
ldi R16, 0x21 ; (1<<SIGRD)|(1<<SPMEN)
out SPMCSR, R16
LPM R9, Z
`