Perhaps following CMSIS is an option, but it is ARM-only, there is not a universal HAL.
STMicro pushed to get CMSIS incorporated into NuttX but at that time, CMSIS had a prohibitive license, didn't follow the NuttX coding style, and would have required re-writing a lot of code to make it CMSIS compatible. So that was declined (STMicro then created its own RTOS). That is one of the problems I have seen with envisioning a solution that needs a massive re-design / re-implementation: It never gets done. No one has time or motivation to do that so it never happens. Do you know of anyone who would really take some months of effort to re-write some else's code for aesthetic reasons? Unless there are some very highly motivated people, it won't happen.
