Add a #if ( configUSE_TIMERS ) conditional compilation constant in to allow the software timers source file to be included in a build that is not configured to use timers without resulting in linker errors.
diff --git a/Source/timers.c b/Source/timers.c
index bf25f8f..fc0a709 100644
--- a/Source/timers.c
+++ b/Source/timers.c
@@ -63,6 +63,12 @@
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
+/* This entire source file will be skipped if the application is not configured
+to include software timer functionality. This #if is closed at the very bottom
+of this file. If you want to include software timer functionality then ensure
+configUSE_TIMERS is set to 1 in FreeRTOSConfig.h. */
+#if ( configUSE_TIMERS == 1 )
+
/* Misc definitions. */
#define tmrNO_DELAY ( portTickType ) 0U
@@ -621,3 +627,7 @@
}
/*-----------------------------------------------------------*/
+/* This entire source file will be skipped if the application is not configured
+to include software timer functionality. If you want to include software timer
+functionality then ensure configUSE_TIMERS is set to 1 in FreeRTOSConfig.h. */
+#endif /* configUSE_TIMERS == 1 */