What exactly do you call "normal code"?
Without a code sample, this community won't be able to help you...

I had no problem running any ESP32 code on M5Stack, after i made the proper modifications related to GPIO assignment.