Fixed current tick initialization
Updated linker file for PK40X256
semaphore.h should be included only if semaphores are enabled.