]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/Projects/MCUXpresso/NonSecure/main_ns.c
commit 9f316c246baafa15c542a5aea81a94f26e3d6507
[freertos] / FreeRTOS / Demo / CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso / Projects / MCUXpresso / NonSecure / main_ns.c
index 055413bff3f44556f4c02cd9d9f4678ade4237e4..834fbe80f3fc9b4217550eacfee5ef67dddc4c81 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
- * FreeRTOS Kernel V10.2.0\r
- * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
+ * FreeRTOS Kernel V10.3.0\r
+ * Copyright (C) 2020 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
@@ -57,7 +57,30 @@ void SystemInit( void );
  *\r
  * It calls a function called vHandleMemoryFault.\r
  */\r
-void MemManage_Handler( void )  __attribute__ ( ( naked ) );\r
+void MemManage_Handler( void ) __attribute__ ( ( naked ) );\r
+/*-----------------------------------------------------------*/\r
+\r
+/* For instructions on how to build and run this demo, visit the following link:\r
+ * https://www.freertos.org/RTOS-Cortex-M33-LPC55S69-MCUXpresso-GCC.html\r
+ */\r
+\r
+/* Non-Secure main. */\r
+int main( void )\r
+{\r
+       /* Create tasks. */\r
+       prvCreateTasks();\r
+\r
+       /* Start scheduler. */\r
+       vTaskStartScheduler();\r
+\r
+       /* Will not get here if the scheduler starts successfully.  If you do end up\r
+       here then there wasn't enough heap memory available to start either the idle\r
+       task or the timer/daemon task.  https://www.freertos.org/a00111.html */\r
+\r
+       for( ; ; )\r
+       {\r
+       }\r
+}\r
 /*-----------------------------------------------------------*/\r
 \r
 static void prvCreateTasks( void )\r
@@ -85,22 +108,6 @@ void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-/* Non-Secure main. */\r
-int main( void )\r
-{\r
-       /* Create tasks. */\r
-       prvCreateTasks();\r
-\r
-       /* Start scheduler. */\r
-       vTaskStartScheduler();\r
-\r
-       /* Should not reach here as the scheduler is already started. */\r
-       for( ; ; )\r
-       {\r
-       }\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
 /* configUSE_STATIC_ALLOCATION is set to 1, so the application must provide an\r
  * implementation of vApplicationGetIdleTaskMemory() to provide the memory that\r
  * is used by the Idle task. */\r
@@ -166,6 +173,7 @@ void MemManage_Handler( void )
                " ldr r1, handler_address_const                                         \n"\r
                " bx r1                                                                                         \n"\r
                "                                                                                                       \n"\r
+               " .align 4                                                                                      \n"\r
                " handler_address_const: .word vHandleMemoryFault       \n"\r
        );\r
 }\r