What is the role of a hardware abstraction layer (HAL) in embedded systems? Discuss its significance in managing hardware resources, how it simplifies software development, and the trade-offs involved in its implementation. Consider how HAL interacts with both hardware and higher-level software components.