I have already changed the define NRF52, NRF52832_XXAA,BOARD_PCA10040 to NRF51,NRF51822 and BOARD_PCA10001 and adjusted the ROM and RAM areas as below.
But there still exist 2 errors, and I can't find out why. I didn't make any other change.