fix build when HAL is enabled