Have you tried it on real hardware or you really trust a sim?

Still in your previous example you have your DEFINE in lowercase while they need to be un UPPERCASE.... and where are your configuration fuses?