AP_Periph not showing up on CAN on new board

Hi I’m working on a board which already is supported but I’m porting it so it works with a different stm32. I got it to compile without any problems but now it’s not seen on CAN. I tested it out with just a simple project that sends CAN frames and it works so I know the hardware is alright. When I try to upload my AP_Periph_with_bl.hex to the board through cubeprogrammer with the option run after programming I get “Warning: The core is locked up” and when I connect it to a working CAN bus on CubeOrange+ it doesn’t show up in inspector. I tried everything I could think of and I really don’t know what to try next. Any and all help would be greatly appreciated.