I have read several discussions about serial data transfer. It is easiest to get working after all. Usually people try to transfer large amounts of data sooner or later. But I have not seen any good protocols for it. There several good for ancient PCs but not for current controllers.
In the Stone Age I used for instance Kermit and Zmodem. And they worked.
Their specifications are open so it should be possible to implement them or one of them for Arm too. Maybe CubeMX could have that too.