Fix RAM test (end address was wrong, now it depends on actual RAM size)