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 2020/11/17 07:35:13 UTC

[GitHub] [incubator-nuttx] liuguo09 opened a new pull request #2320: Add debug.h selection choice to support include chip debug.h

liuguo09 opened a new pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320


   ## Summary
   Add Select debug.h choice which may be under include/arch or include/arch/chip.
   
   ## Impact
   
   ## Testing
   Test and verify with using chip debug.h and none debug.h locally.
   


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320#issuecomment-728905096


   > Should these be 2 independent settings?
   > 
   > I can have none, either one or both.
   
   No, we can't select both. Because only one function named __arch_syslog can be redefined by either arch or chip:
   


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] davids5 merged pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
davids5 merged pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320


   


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] davids5 commented on pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320#issuecomment-729673647


   > @davids5 do you think my anwser resolve your concern?
   
   No. but let's merge it for what it is.
   
   > Would you provide the 2 debug.h files for example.
   
   I was asking for 2 example files to be added as attachments to the PR.
   
   My hope was the the arch and chip level debug files could add arch and chip level focused debug statements. 
   I.E. I do not want all the high level output when fs has debugging enabled. But I do care about SDMMC messages.  
   


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320#issuecomment-729683886


   > > @davids5 do you think my anwser resolve your concern?
   > 
   > No. but let's merge it for what it is.
   > 
   > > Would you provide the 2 debug.h files for example.
   > 
   > I was asking for 2 example files to be added as attachments to the PR.
   > 
   
   Sorry, I can't provide example header file now, because it's the 3rd party code I don't have right to share it without the permission. But, the patch provided here work with the 3rd party special log mechanism very well.
   
   > My hope was the the arch and chip level debug files could add arch and chip level focused debug statements.
   > I.E. I do not want all the high level output when fs has debugging enabled. But I do care about SDMMC messages.
   
   This feature is provided a hook to let arch/chip to redirect ALL log to some special hardware but without implementing syslog_channel_s.
   
   The feature you want could be achieved by adding more debugging macro in debug.h?
   


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320#issuecomment-729344232


   @davids5 do you think my anwser resolve your concern?


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] davids5 commented on pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320#issuecomment-728933312


   Can this be cascaded with priority of chip -> arch -> system:
   ```
   /* The actual logger function may be overridden in arch/debug.h if needed.
    * (Currently only if the pre-processor supports variadic macros)
    */
   
   #ifndef __arch_syslog
   #  define __arch_syslog syslog
   #endif
   ```
   
   Would you provide the 2 debug.h files for example. 


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment on pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320#issuecomment-728942587


   > Can this be cascaded with priority of chip -> arch -> system:
   
   Yes, you can achieve this by select one of:
   
   1. CONFIG_ARCH_CHIP_DEBUG_H->chip
   2. CONFIG_ARCH_DEBUG_H           ->arch
   3. CONFIG_ARCH_NONE_DEBUG_H->system
   
   > 
   > ```
   > /* The actual logger function may be overridden in arch/debug.h if needed.
   >  * (Currently only if the pre-processor supports variadic macros)
   >  */
   > 
   > #ifndef __arch_syslog
   > #  define __arch_syslog syslog
   > #endif
   > ```
   > 
   > Would you provide the 2 debug.h files for example.
   
   Yes, you can provide two:
   arch/xxx/include/chip.h
   arch/xxx/include/yyy/chip.h
   But only one can be selected by defconfig.
   
   If you have better idea, please modify PR directly.


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment on pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320#issuecomment-729683886


   > > @davids5 do you think my anwser resolve your concern?
   > 
   > No. but let's merge it for what it is.
   > 
   > > Would you provide the 2 debug.h files for example.
   > 
   > I was asking for 2 example files to be added as attachments to the PR.
   > 
   
   Sorry, I can't provide example header file now, because it's the 3rd party code I don't have right to share it without the permission. But, the patch provided here work with the 3rd party special log mechanism very well.
   
   > My hope was the the arch and chip level debug files could add arch and chip level focused debug statements.
   > I.E. I do not want all the high level output when fs has debugging enabled. But I do care about SDMMC messages.
   
   This feature is provided a hook to let arch to redirect ALL log to some special hardware but without implementing syslog_channel_s. This patch just extend this feature to allow chip provider redirect the log too.
   
   The feature you want could be achieved by adding more debugging macro in debug.h?
   


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320#issuecomment-728942587


   > Can this be cascaded with priority of chip -> arch -> system:
   
   Yes, you can achieve this by select one of:
   
   1. CONFIG_ARCH_CHIP_DEBUG_H->chip
   2. CONFIG_ARCH_DEBUG_H           ->arch
   3. CONFIG_ARCH_NONE_DEBUG_H->system
   
   > 
   > ```
   > /* The actual logger function may be overridden in arch/debug.h if needed.
   >  * (Currently only if the pre-processor supports variadic macros)
   >  */
   > 
   > #ifndef __arch_syslog
   > #  define __arch_syslog syslog
   > #endif
   > ```
   > 
   > Would you provide the 2 debug.h files for example.
   
   Yes, you can provide two:
   arch/include/chip.h
   arch/include/xxx/chip.h
   But only one can be selected by defconfig.
   
   If you have better idea, please modify PR directly.


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment on pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320#issuecomment-728942587


   > Can this be cascaded with priority of chip -> arch -> system:
   
   Yes, you can achieve this by select one of:
   
   1. CONFIG_ARCH_CHIP_DEBUG_H->chip
   2. CONFIG_ARCH_DEBUG_H           ->arch
   3. CONFIG_ARCH_NONE_DEBUG_H->system
   
   > 
   > ```
   > /* The actual logger function may be overridden in arch/debug.h if needed.
   >  * (Currently only if the pre-processor supports variadic macros)
   >  */
   > 
   > #ifndef __arch_syslog
   > #  define __arch_syslog syslog
   > #endif
   > ```
   > 
   > Would you provide the 2 debug.h files for example.
   
   Yes, you can provide two:
   arch/xxx/include/debug.h
   arch/xxx/include/yyy/debug.h
   But only one can be selected by defconfig.
   
   If you have better idea, please modify PR directly.


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] davids5 commented on pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320#issuecomment-728895155


   Should these be 2 independent settings?
   
   I can have none, either one or both.


----------------------------------------------------------------
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.

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



[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #2320: Add debug.h selection choice to support include chip debug.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment on pull request #2320:
URL: https://github.com/apache/incubator-nuttx/pull/2320#issuecomment-728905096


   > Should these be 2 independent settings?
   > 
   > I can have none, either one or both.
   
   No, we can't select both. Because only one function named __arch_syslog can be redefined by either arch or chip:
   https://github.com/apache/incubator-nuttx/pull/2320/files#diff-538fa12a3a84cafb87733a28969196475416c88c220fe43adbd0ab34cbad15f3L110-L116


----------------------------------------------------------------
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.

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