#error freertos.h must be included before timer.h

Well, in that case the official port and example works as expected. It probably is a problem with your environment (toolchain/project/sdk). If you can share your project and build instructions, I can try to repro it.

Thanks.