A method for manufacturing a semiconductor device includes the steps of
forming a circuit element on a semiconductor substrate, forming an
insulation film covering the circuit element, forming a first electrode
on the insulation film, forming a ferroelectric film on the first
electrode, forming a second electrode on the ferroelectric film, forming
a hardmask comprised of lower, middle, and upper layer mask films on the
second electrode, etching the second electrode using the upper layer mask
film as an etching mask, removing the upper layer mask film remaining
after the etching of the second electrode, etching the ferroelectric film
and the first electrode using the middle layer mask film as an etching
mask, removing the middle layer mask film remaining after the etching of
the ferroelectric film and the first electrode, and removing the lower
layer mask film.