This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new cce7b7ada6 stm32f7: add showprogress in __start
cce7b7ada6 is described below

commit cce7b7ada67a92e51fcf46e4e491648d8b161b7f
Author: raiden00pl <raide...@railab.me>
AuthorDate: Thu Jul 28 12:08:09 2022 +0200

    stm32f7: add showprogress in __start
---
 arch/arm/src/stm32f7/stm32_start.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/src/stm32f7/stm32_start.c 
b/arch/arm/src/stm32f7/stm32_start.c
index 82ffc3c786..fefc1229aa 100644
--- a/arch/arm/src/stm32f7/stm32_start.c
+++ b/arch/arm/src/stm32f7/stm32_start.c
@@ -63,6 +63,24 @@
 
 #define HEAP_BASE  ((uintptr_t)&_ebss+CONFIG_IDLETHREAD_STACKSIZE)
 
+/****************************************************************************
+ * Private Function prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: showprogress
+ *
+ * Description:
+ *   Print a character on the UART to show boot status.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_DEBUG_FEATURES
+#  define showprogress(c) arm_lowputc(c)
+#else
+#  define showprogress(c)
+#endif
+
 /****************************************************************************
  * Public Data
  ****************************************************************************/
@@ -206,6 +224,7 @@ void __start(void)
   stm32_clockconfig();
   arm_fpuconfig();
   stm32_lowsetup();
+  showprogress('A');
 
   /* Enable/disable tightly coupled memories */
 
@@ -214,11 +233,13 @@ void __start(void)
   /* Initialize onboard resources */
 
   stm32_boardinitialize();
+  showprogress('B');
 
   /* Enable I- and D-Caches */
 
   up_enable_icache();
   up_enable_dcache();
+  showprogress('C');
 
 #ifdef CONFIG_ARMV7M_ITMSYSLOG
   /* Perform ARMv7-M ITM SYSLOG initialization */
@@ -231,6 +252,7 @@ void __start(void)
 #ifdef USE_EARLYSERIALINIT
   arm_earlyserialinit();
 #endif
+  showprogress('D');
 
   /* For the case of the separate user-/kernel-space build, perform whatever
    * platform specific initialization of the user memory is required.
@@ -241,9 +263,13 @@ void __start(void)
 #ifdef CONFIG_BUILD_PROTECTED
   stm32_userspace();
 #endif
+  showprogress('E');
 
   /* Then start NuttX */
 
+  showprogress('\r');
+  showprogress('\n');
+
   nx_start();
 
   /* Shouldn't get here */

Reply via email to