Further testing shows that this is likely User Flash Memory issue of my MAX10 bemicro kit.
Moving from SDRAM to Onchip RAM shows the same result of all FFs in part of the text memory.
Luckily i have another board and everything seems ok. it runs. No problem.
Previously on the bad board, I already had some weird issue but didn't trace to the bottom of it. When I put my reset vector to the first sector of the UFM, the boot copier couldn't load the application. It got stuck half way when it reads an all F boot record header.
When I put the reset vector to an offset of 16kB into the UFM then it worked. Then I moved on.
Now, when the code grows larger, it stops working again.
So, on the bad board, there are sectors of FLASH that can't be written to by the Quartus PROGRAMMER tool ... Be ware!
The kit is fitted with MAX10 10M08DA...ES
Thanks.