rebased on upstream

- remove HAL support
- new test directory
- probe for localtime_r