Struggling to debug portenta h7

in the old days i could go over all the behind the scenes arduino code and understand where things might be breaking down. currently i am struggling with a project where everything was working as expected on the M7 core. but the final project would also use the M4 core. so i have a blank M4 sketch empty setup and empty loop. all my M7 code is working perfectly. then i boot the M4 that has the empty sketch loaded and something completely tramples pin PA0 which i was using for a TIM2 ETR pin to take in a 10Mhz signal scale down to 1Mhz for a microsecond counter. the 10Mhz was coming from a Chip Scale Atomic Clock. this project will eventually live on the sea bottom and so running of a CSAC is very important. anyway, so the M4 booting breaks my M7 code. fine, but how do i debug this. i have no idea where to look at see what is happening when the M4 boots so that perhaps i could disable whatever is going on. i just don't get how i am suppose to debug all this mbed and/or arduino stuff that is happening behind the scenes. any help is greatly appreciated. i've been using arduino since ~2008 or 2009 can recall exactly i think it was decimilla back then atmega 328.
Let me know...
Thanks,
Jeff