From your memory map I gather you have a 2MB flash. The error messages are saying you don't have room to fit the code into onchip memory though. So my question is how big is your onchip memory? From the warnings it looks like you need more than 64kB of on chip memory. Since this worked on Nios I, I suggest performing optimizations to make it fit (see pages 4-23 to 4-28 of the "Developing Programs using the HAL" doc).
Also that code with a little bit of modification could use the HAL 100% (i.e. full upgrade to Nios II). nr_flash_erase_sector and other function calls starting in "nr_" are legacy SDK calls, and there are HAL equivalents for these.