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/09 06:53:46 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   ## Summary
   to handle the uninitialized stdin/stdout/stderr gracefully
   report here:
   https://github.com/apache/incubator-nuttx/issues/2203
   
   ## Impact
   No functional change.
   
   ## Testing
   
   


----------------------------------------------------------------
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] lukegluke commented on pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   > But to keep the old behaviour as much as possible, I add the same minimal initialization like before for stdin/stdout/stderr.
   
   @xiaoxiang781216, I didn't go into details about these 10.0.0 modifications related to streams, but previously I saw boot output in dmesg after connecting by usb console, now it is empty - is that a bug?


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @xiaoxiang781216 Forgive me for the delay. testing today.


----------------------------------------------------------------
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] jerpelea commented on pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   LGTM


----------------------------------------------------------------
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] lukegluke commented on pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @xiaoxiang781216 this one fix reboot issue within PX4.
   


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @lukegluke and @davids5 please try the new patch can handle the wrong console config gracefully.


----------------------------------------------------------------
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] lukegluke commented on pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @xiaoxiang781216, patch have fixed hardfaults in usb console initiation that was previously, yes, but I had new hardfault on group_free(group, stream) in libs/libc/misc/lib_stream.c on exiting from first task main (ver all in PX4 RcS for example and no matter what task is this)
   


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @lukegluke - I will retest today


----------------------------------------------------------------
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] lukegluke commented on pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   I've built successfully.
   Board starts successfully, dmesg is empty. On reboot (https://github.com/PX4/PX4-Autopilot/issues/16133) now no hardfault, but `PX4_INFO_RAW("Reboot NOW.")` stack in `lib_take_semaphore(stream)` and doesn't pass next to real reboot (NuttX itself is running).


----------------------------------------------------------------
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] lukegluke commented on pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   > @lukegluke `dmesg` works fine on fmu-v6x
   
   @davids5, JFYI I've found out the reason of empty dmesg: `CONFIG_DEV_CONSOLE =n` leads to remapping console to dev/null on boot (PX4 workaround you are mentioned https://github.com/apache/incubator-nuttx/issues/2203#issuecomment-721137099)
   
   As I said previously I hadn't define CONFIG_DEV_CONSOLE for my custom board, but it then turned out that it is "y" by default, so I implicitly turned it off for test on this patches.
   (I'm not using px4 sercon, but directly NuttX CONFIG_CDCACM_CONSOLE)
   
   I'm not sure, doesn't this mean that this remapping to dev/null doesn't needed anymore in PX4?


----------------------------------------------------------------
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] lukegluke edited a comment on pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @xiaoxiang781216, patch have fixed hardfault in usb console initiation that was previously, yes, but I had new hardfault on group_free(group, stream) in libs/libc/misc/lib_stream.c on exiting from first task main (ver all in PX4 RcS for example and no matter what task is this)
   


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   Ditto
   
   ![image](https://user-images.githubusercontent.com/1945821/98705636-c5467c80-2332-11eb-93e0-e8af5e405c46.png)
   


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @xiaoxiang781216 - I have tested your latest commit. It is working fine.  In the no console use case and did not break remapping to dev/null.
   Any reason we should not merge this?
   
   @lukegluke `dmesg` works fine on fmu-v6x
   ```
   NuttShell (NSH) NuttX-10.0.0
   nsh> dmesg
   sercon: Registering CDC/ACM serial driver
   sercon: Successfully registered the CDC/ACM serial driver
   HW arch: PX4_FMU_V6X
   HW type: V6X00
   HW version: 0x00000000
   HW revision: 0x00000000
   FW git-hash: 99833eb001d657f10125fafc9993abd333d442f6
   FW version: 1.11.0 0 (17498112)
   FW git-branch: master
   OS: NuttX
   OS version: Release 10.0.0 (167772415)
   OS git-hash: b7e9ae70c3e3e7b98936e0b32189d3293713ac5f
   Build datetime: Nov 11 2020 08:49:16
   Build uri: localhost
   Toolchain: GNU GCC, 9.3.1 20200408 (release)
   PX4GUID: 00060000000035313536343751050023002a
   MCU: STM32H7[4|5]xxx, rev. Y
   INFO  [param] selected parameter default file /fs/mtd_params
   Board defaults: /etc/init.d/rc.board_defaults
   rgbled #0 on I2C bus 1 (external)
   Board sensors: /etc/init.d/rc.board_sensors
   INFO  [ina226] Failed to init INA226 on bus 1, but will try again periodically.
   ina226 #0 on I2C bus 1 (external)
   INFO  [ina226] Failed to init INA226 on bus 2, but will try again periodically.
   ina226 #1 on I2C bus 2 (external)
   icm20649 #0 on SPI bus 1 (devid=0x25)
   WARN  [SPI_I2C] ism330dlc: no instance started (no device on bus?)
   bmi088 #0 on SPI bus 3 (devid=0x6a)
   bmi088 #1 on SPI bus 3 (devid=0x66)
   WARN  [SPI_I2C] bmm150: no instance started (no device on bus?)
   WARN  [bmp388] failed to reset baro during init
   WARN  [SPI_I2C] bmp388: no instance started (no device on bus?)
   WARN  [bmp388] failed to reset baro during init
   WARN  [SPI_I2C] bmp388: no instance started (no device on bus?)
   WARN  [SPI_I2C] ms5611: no instance started (no device on bus?)
   ist8310 #0 on I2C bus 1 (external)
   lis2mdl #0 on I2C bus 4 (external)
   Board extras: /etc/init.d/rc.board_mavlink
   INFO  [mavlink] mode: Config, data rate: 800000 B/s on /dev/ttyACM0 @ 57600B
   Starting Main GPS on /dev/ttyS0
   Starting MAVLink on /dev/ttyS6
   INFO  [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS6 @ 57600B
   INFO  [px4io] default PWM output device
   INFO  [vehicle_magnetometer] MAG switch from #1 -> #0
   INFO  [init] Mixer: /etc/mixers/quad_x.main.mix on /dev/pwm_output0
   INFO  [init] Mixer: /etc/mixers/pass.aux.mix on /dev/pwm_output1
   ekf2 [481:100]
   ERROR [param] Parameter IMU_GYRO_FFT_EN not found
   INFO  [logger] logger started (mode=all)
   ```
   
   


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @lukegluke thanks to verify the change!


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @xiaoxiang781216 
   Can not build.
   
   ```
   nsh_console.c: In function 'nsh_openifnotopen':
   nsh_console.c:107:14: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     107 |   if (!pstate->cn_outstream)
         |              ^~
   nsh_console.c:109:13: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     109 |       pstate->cn_outstream = fdopen(pstate->cn_outfd, "w");
         |             ^~
   nsh_console.c:109:43: error: 'struct console_stdio_s' has no member named 'cn_outfd'
     109 |       pstate->cn_outstream = fdopen(pstate->cn_outfd, "w");
         |                                           ^~
   nsh_console.c:110:18: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     110 |       if (!pstate->cn_outstream)
         |                  ^~
   nsh_console.c:118:13: error: 'struct console_stdio_s' has no member named 'cn_errfd'
     118 |       pstate->cn_errfd     = pstate->cn_outfd;
         |             ^~
   nsh_console.c:118:36: error: 'struct console_stdio_s' has no member named 'cn_outfd'
     118 |       pstate->cn_errfd     = pstate->cn_outfd;
         |                                    ^~
   nsh_console.c:119:13: error: 'struct console_stdio_s' has no member named 'cn_errstream'
     119 |       pstate->cn_errstream = pstate->cn_outstream;
         |             ^~
   nsh_console.c:119:36: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     119 |       pstate->cn_errstream = pstate->cn_outstream;
         |                                    ^~
   nsh_console.c: In function 'nsh_consolewrite':
   nsh_console.c:190:41: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     190 |   ret = fwrite(buffer, 1, nbytes, pstate->cn_outstream);
         |                                         ^~
   nsh_console.c:199:16: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     199 |   fflush(pstate->cn_outstream);
         |                ^~
   nsh_console.c: In function 'nsh_consoleoutput':
   nsh_console.c:230:24: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     230 |   ret = vfprintf(pstate->cn_outstream, fmt, ap);
         |                        ^~
   nsh_console.c: In function 'nsh_erroroutput':
   nsh_console.c:262:24: error: 'struct console_stdio_s' has no member named 'cn_errstream'
     262 |   ret = vfprintf(pstate->cn_errstream, fmt, ap);
         |                        ^~
   nsh_console.c: In function 'nsh_consoleredirect':
   nsh_console.c:379:17: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     379 |       if (pstate->cn_outstream)
         |                 ^~
   nsh_console.c:381:24: error: 'struct console_stdio_s' has no member named 'cn_errstream'
     381 |           fflush(pstate->cn_errstream);
         |                        ^~
   nsh_console.c:382:24: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     382 |           fflush(pstate->cn_outstream);
         |                        ^~
   nsh_console.c:389:12: error: dereferencing pointer to incomplete type 'struct serialsave_s'
     389 |       ssave->cn_errfd     = pstate->cn_errfd;
         |            ^~
   nsh_console.c:389:35: error: 'struct console_stdio_s' has no member named 'cn_errfd'
     389 |       ssave->cn_errfd     = pstate->cn_errfd;
         |                                   ^~
   nsh_console.c:390:35: error: 'struct console_stdio_s' has no member named 'cn_outfd'
     390 |       ssave->cn_outfd     = pstate->cn_outfd;
         |                                   ^~
   nsh_console.c:391:35: error: 'struct console_stdio_s' has no member named 'cn_errstream'
     391 |       ssave->cn_errstream = pstate->cn_errstream;
         |                                   ^~
   nsh_console.c:392:35: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     392 |       ssave->cn_outstream = pstate->cn_outstream;
         |                                   ^~
   nsh_console.c:406:9: error: 'struct console_stdio_s' has no member named 'cn_outfd'
     406 |   pstate->cn_outfd     = fd;
         |         ^~
   nsh_console.c:407:9: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     407 |   pstate->cn_outstream = NULL;
         |         ^~
   nsh_console.c: In function 'nsh_consoleundirect':
   nsh_console.c:425:9: error: 'struct console_stdio_s' has no member named 'cn_errfd'
     425 |   pstate->cn_errfd     = ssave->cn_errfd;
         |         ^~
   nsh_console.c:425:31: error: dereferencing pointer to incomplete type 'struct serialsave_s'
     425 |   pstate->cn_errfd     = ssave->cn_errfd;
         |                               ^~
   nsh_console.c:426:9: error: 'struct console_stdio_s' has no member named 'cn_outfd'
     426 |   pstate->cn_outfd     = ssave->cn_outfd;
         |         ^~
   nsh_console.c:427:9: error: 'struct console_stdio_s' has no member named 'cn_errstream'
     427 |   pstate->cn_errstream = ssave->cn_errstream;
         |         ^~
   nsh_console.c:428:9: error: 'struct console_stdio_s' has no member named 'cn_outstream'
     428 |   pstate->cn_outstream = ssave->cn_outstream;
         |         ^~
   At top level:
   nsh_console.c:418:13: error: 'nsh_consoleundirect' defined but not used [-Werror=unused-function]
     418 | static void nsh_consoleundirect(FAR struct nsh_vtbl_s *vtbl,
         |             ^~~~~~~~~~~~~~~~~~~
   nsh_console.c:364:13: error: 'nsh_consoleredirect' defined but not used [-Werror=unused-function]
     364 | static void nsh_consoleredirect(FAR struct nsh_vtbl_s *vtbl, int fd,
         |             ^~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   ```


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   > @xiaoxiang781216 - I have tested your latest commit. It is working fine. In the no console use case and did not break remapping to dev/null.
   > Any reason we should not merge this?
   > 
   
   So, @davids5 please merge it.
   


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @lukegluke and @davids5  sorry,  I hit the same issue too and make a fix but forgot to commit my local change. Please try the update again.


----------------------------------------------------------------
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] lukegluke edited a comment on pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   > @lukegluke `dmesg` works fine on fmu-v6x
   
   @davids5, JFYI I've found out the reason of empty px4 dmesg: `CONFIG_DEV_CONSOLE=n` leads to remapping console to dev/null on boot (PX4 workaround you are mentioned https://github.com/apache/incubator-nuttx/issues/2203#issuecomment-721137099)
   
   As I said previously I hadn't define CONFIG_DEV_CONSOLE for my custom board, but it then turned out that it is "y" by default, so I implicitly turned it off for test on this patches.
   (I'm not using px4 sercon, but directly NuttX CONFIG_CDCACM_CONSOLE)
   
   I'm not sure, doesn't this mean that this remapping to dev/null doesn't needed anymore in PX4?


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   Ok, my initial attempt is only to addressing the hardfault issue since stdin/stdout/stderr should always initialize correctly with the right configuration. But to keep the old behaviour as much as possible, I add the same minimal initialization like before for stdin/stdout/stderr. @davids5 @lukegluke please try again.


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @xiaoxiang781216 did you rebase?


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @xiaoxiang781216 
   
   Ok I fixed the build issue.
   
   Yes the stream is not initialized. There are no counts on the semaphore.
   
   ![image](https://user-images.githubusercontent.com/1945821/98717653-32154300-2342-11eb-96c0-e371ffc7ea9b.png)
   
   


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @xiaoxiang781216 @lukegluke - What shall are you building with for apps?


----------------------------------------------------------------
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] lukegluke commented on pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   PX4 implements a simple console buffer to store the full bootup output that can be printed via the 'dmesg' utility https://github.com/PX4/PX4-Autopilot/blob/master/platforms/common/include/px4_platform_common/console_buffer.h so probably it is question more to @davids5 


----------------------------------------------------------------
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] lukegluke edited a comment on pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   I've built successfully.
   Board starts ok, dmesg is empty. On reboot (https://github.com/PX4/PX4-Autopilot/issues/16133) now no hardfault, but `PX4_INFO_RAW("Reboot NOW.")` stack in `lib_take_semaphore(stream)` and doesn't pass next to real reboot (NuttX itself is running).


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   > I'm not sure, doesn't this mean that this remapping to dev/null doesn't needed anymore in PX4? 
   
   @lukegluke I tested it on and off. I prefer having the mapping to dev/null so there is no chances of further changes breaking things.
   
   I think the **current** CONFIG_CDCACM_CONSOLE and CONFIG_DEV_CONSOLE semantics need to be better understood. 
   
   


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   So it isn't related to: https://github.com/apache/incubator-nuttx/blob/master/drivers/syslog/ramlog.c.


----------------------------------------------------------------
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] lukegluke edited a comment on pull request #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   @xiaoxiang781216, patch have fixed hardfault in usb console initiation that was previously, yes, but I had new hardfault on group_free(group, stream) in libs/libc/misc/lib_stream.c on exiting from first task main (`ver all` command in PX4 RcS for example and no matter what task is this)
   


----------------------------------------------------------------
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 #2263: libc/stdio: Preallocate the stdin, stdout and stderr

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


   the content in dmesg is generated by syslog not printf, so I don't think it's related to this issue.


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