working_area size requirement for flash programming

I’m using an LPC2138 and I’m programming the flash. I determined empirically that I need about 5KB of RAM specified in the “working_area” primitive. So I put this line in my cfg file.

working_area 0 0x40006C00 0x1400 nobackup

Note that I put the working_area at the end of the RAM (I have 32KB of RAM in the LPC2138, it ends at 0x40007FFF)

My questions:

  1. Does this make sense? Why 5KB? (4KB fails)

And “dcc_downloads” enabled or not doesn’t seem to matter, I need the 5KB no matter what.

  1. I put the working_area at the end of the RAM. Is that good? Is there any inconvenient? Should I use the whole RAM and let OpenOCD decide what part to use?