Debig in Flash works - but how?

Hi

I got debuging work in flash with an aduc7026 mcu.

I use these commands to copy the code into the flash

(in Eclipse Initialize commands)

target remote localhost:3333
monitor wait_halt
monitor armv4_5 core_state arm
monitor mwh 0xFFFFF804 0x08
monitor mwb 0xFFFFF808 0x09
monitor load_binary I2C_Demo/main.bin 0x0
monitor reset

Run-commands:

target remote localhost:3333
monitor soft_reset_halt
monitor reg pc 0x00000000
monitor arm7_9 force_hw_bkpts enable
symbol-file main.out
thbreak main
continue

I was unable to get the flash work with the cfi driver.

I tried this setup:

working_area 0 0x00010000 0x2000 nobackup

flash bank cfi 0x00080000 0x10000 2 2 0

I a little bit confused why flash drivers are needed in general.

In my case I set 2 registers to allow writing to flash. After that

data is written directly in flash.

Is it possible many MCUs flash can’t be written like SRam?

Best regards, Tilo