You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/23 19:47:48 UTC

[GitHub] [incubator-nuttx] tito97sp opened a new pull request, #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c

tito97sp opened a new pull request, #7400:
URL: https://github.com/apache/incubator-nuttx/pull/7400

   
   
   Signed-off-by: Andrés Sánchez Pascual <ti...@hotmail.com>
   
   ## Summary
   `stm32_bringup()` not reachable. Fix CONFIG_LIB_BOARDCTL build cap in `board_late_initialize()` function
   
   ## Impact
   Board STM32H743ZI
   
   ## Testing
   Tested on target.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] tito97sp commented on a diff in pull request #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c

Posted by GitBox <gi...@apache.org>.
tito97sp commented on code in PR #7400:
URL: https://github.com/apache/incubator-nuttx/pull/7400#discussion_r1002773648


##########
boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c:
##########
@@ -86,7 +86,7 @@ void stm32_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
+#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)

Review Comment:
   Regarding the implementation of the board_late_initialize I have find that there exist several implementations of the same as resumed in the next diagram:
   
   ![Untitled Diagram drawio](https://user-images.githubusercontent.com/25639961/197418606-c64d0124-e10b-42b7-a549-ac3cc14c26f9.png)
   
   Where the different color paths are taken depending on the build caps used.
   
   Maybe an effort should be done here in homogenizing this as it is really difficult to understand the proper way to initialize the board.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7400:
URL: https://github.com/apache/incubator-nuttx/pull/7400#discussion_r1002773918


##########
boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c:
##########
@@ -86,7 +86,7 @@ void stm32_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
+#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)

Review Comment:
   What configuration are you using? Maybe you can post a defconfig file, so it will be more easy to track down the root cause



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] tito97sp closed pull request #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c

Posted by GitBox <gi...@apache.org>.
tito97sp closed pull request #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c
URL: https://github.com/apache/incubator-nuttx/pull/7400


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] tito97sp commented on a diff in pull request #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c

Posted by GitBox <gi...@apache.org>.
tito97sp commented on code in PR #7400:
URL: https://github.com/apache/incubator-nuttx/pull/7400#discussion_r1002779246


##########
boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c:
##########
@@ -86,7 +86,7 @@ void stm32_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
+#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)

Review Comment:
   Sorry an error was made by me and the PR is gonna be closed. 
   
   The `stm32_bringup()` function is better to be call from app so this PR approach is erroneous. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] tito97sp commented on a diff in pull request #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c

Posted by GitBox <gi...@apache.org>.
tito97sp commented on code in PR #7400:
URL: https://github.com/apache/incubator-nuttx/pull/7400#discussion_r1002773648


##########
boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c:
##########
@@ -86,7 +86,7 @@ void stm32_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
+#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)

Review Comment:
   Regarding the implementation of the `board_late_initialize()` I have found that there exist several implementations of the same function as resumed in the next diagram:
   
   ![Untitled Diagram drawio](https://user-images.githubusercontent.com/25639961/197418606-c64d0124-e10b-42b7-a549-ac3cc14c26f9.png)
   
   Where the different color paths are taken depending on the build caps used of the same color. (Black color indicates that no build caps check are done in some implementations)
   
   Maybe an effort should be done here in homogenizing this as it is really difficult to understand the proper way to initialize the board.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] tito97sp commented on a diff in pull request #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c

Posted by GitBox <gi...@apache.org>.
tito97sp commented on code in PR #7400:
URL: https://github.com/apache/incubator-nuttx/pull/7400#discussion_r1002766985


##########
boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c:
##########
@@ -86,7 +86,7 @@ void stm32_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
+#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)

Review Comment:
   Hi @pkarashchenko, what do you propose in this case? 
   
   I see that there exists other boards does not check neither `CONFIG_NSH_LIBRARY` nor `CONFIG_BOARDCTL` for intializing the board and other that checks both. 
   
   * nuttx/boards/arm/samv7/samv71-xult/src/sam_boot.c
   * nuttx/boards/arm/stm32/nucleo-f303ze/src/stm32_boot.c
   
   In my case I have defined `CONFIG_NSH_LIBRARY` and also `CONFIG_BOARDCTL` so the `stm32_bringup()` function is never reachable.
   
   Why `CONFIG_BOARDCTL` must not be defined in order to perform a board_late_initialization?
   
   I am confused about the difference between `CONFIG_BOARDCTL` and `CONFIG_LIB_BOARDCTL`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7400:
URL: https://github.com/apache/incubator-nuttx/pull/7400#discussion_r1002763737


##########
boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c:
##########
@@ -86,7 +86,7 @@ void stm32_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
+#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)

Review Comment:
   seems like `LIB_BOARDCTL` is leftover from renaming. Probably we need to clean-up all the places and do not introduce new dependencies



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] tito97sp commented on a diff in pull request #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c

Posted by GitBox <gi...@apache.org>.
tito97sp commented on code in PR #7400:
URL: https://github.com/apache/incubator-nuttx/pull/7400#discussion_r1002779246


##########
boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c:
##########
@@ -86,7 +86,7 @@ void stm32_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
+#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)

Review Comment:
   Sorry an error was made by me and the PR is gonna be closed. 
   
   The `stm32_bringup()` function is better to be called from app so this PR approach is erroneous. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] tito97sp commented on a diff in pull request #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c

Posted by GitBox <gi...@apache.org>.
tito97sp commented on code in PR #7400:
URL: https://github.com/apache/incubator-nuttx/pull/7400#discussion_r1002773648


##########
boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c:
##########
@@ -86,7 +86,7 @@ void stm32_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
+#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)

Review Comment:
   Regarding the implementation of the `board_late_initialize()` I have found that there exist several implementations of the same function as resumed in the next diagram:
   
   ![Untitled Diagram drawio](https://user-images.githubusercontent.com/25639961/197418606-c64d0124-e10b-42b7-a549-ac3cc14c26f9.png)
   
   Where the different color paths are taken depending on the build caps used.
   
   Maybe an effort should be done here in homogenizing this as it is really difficult to understand the proper way to initialize the board.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7400: board/stm32h7: Fix CONFIG_LIB_BOARDCTL build cap in stm32_boot.c

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7400:
URL: https://github.com/apache/incubator-nuttx/pull/7400#discussion_r1002773744


##########
boards/arm/stm32h7/nucleo-h743zi/src/stm32_boot.c:
##########
@@ -86,7 +86,7 @@ void stm32_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
+#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)

Review Comment:
   I will try to take a look here this week



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org