]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/WIN32-MSVC/main.c
Add software timer to the Win32 blinky demo.
[freertos] / FreeRTOS / Demo / WIN32-MSVC / main.c
index b90548741c6bf75209369f41b81dd480e52551b8..ee8219744999c866d763cad852b4b2da58a90fb4 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
- * FreeRTOS Kernel V10.0.0\r
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
+ * FreeRTOS Kernel V10.2.1\r
+ * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
  *\r
  * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
  * this software and associated documentation files (the "Software"), to deal in\r
@@ -10,8 +10,7 @@
  * subject to the following conditions:\r
  *\r
  * The above copyright notice and this permission notice shall be included in all\r
- * copies or substantial portions of the Software. If you wish to use our Amazon\r
- * FreeRTOS name, please do so in a fair use way that does not cause confusion.\r
+ * copies or substantial portions of the Software.\r
  *\r
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
 #include <stdlib.h>\r
 #include <conio.h>\r
 \r
+/* Visual studio intrinsics used so the __debugbreak() function is available\r
+should an assert get hit. */\r
+#include <intrin.h>\r
+\r
 /* FreeRTOS kernel includes. */\r
 #include "FreeRTOS.h"\r
 #include "task.h"\r
@@ -69,16 +72,16 @@ The blinky demo is implemented and described in main_blinky.c.
 If mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is not 1 then the comprehensive test and\r
 demo application will be built.  The comprehensive test and demo application is\r
 implemented and described in main_full.c. */\r
-#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     0\r
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     1\r
 \r
 /* This demo uses heap_5.c, and these constants define the sizes of the regions\r
 that make up the total heap.  heap_5 is only used for test and example purposes\r
 as this demo could easily create one large heap region instead of multiple\r
 smaller heap regions - in which case heap_4.c would be the more appropriate\r
 choice.  See http://www.freertos.org/a00111.html for an explanation. */\r
-#define mainREGION_1_SIZE      7201\r
+#define mainREGION_1_SIZE      8201\r
 #define mainREGION_2_SIZE      29905\r
-#define mainREGION_3_SIZE      6407\r
+#define mainREGION_3_SIZE      7607\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -289,6 +292,9 @@ volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
                        }\r
                }\r
 \r
+               /* Cause debugger break point if being debugged. */\r
+               __debugbreak();\r
+\r
                /* You can step out of this function to debug the assertion by using\r
                the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero\r
                value. */\r