SPI on STM32F746RE (nucleo-144)
Hi I'm trying to get the SPI working on the nucleo-144:f746 board, but I can't see the /dev/spi on the generated binary... This means that the SPI on this card is not (yet) implemented? Thanks in advance Roberto
Re: SPI on STM32F746RE (nucleo-144)
Hi Roberto, Normally NuttX doesn't create /dev/spi or /dev/i2c for these buses, you need to enable the option to create the char device file; In the SPI case you need to enable this option: [ ] SPI character driver Also you need to make sure that in your board initialization files the function spi_register() is called to register the spi device file. BR, Alan On 3/1/22, Roberto Bucher wrote: > Hi > > I'm trying to get the SPI working on the nucleo-144:f746 board, but I > can't see the /dev/spi on the generated binary... This means that the > SPI on this card is not (yet) implemented? > > Thanks in advance > > Roberto > >
Setting TERM environment variable before starting the application
Hello, I am playing around with ncurses on NuttX and would like to set a TERM environment variable to xterm-256color via setenv() before the application is started (I would like to run unmodified ncurses example applications), but am not quite sure where this would best fit in. It seems that CONFIG_BOARD_EARLY_INITIALIZE and board_early_initialize() would do the trick, but there is not a single board defconfig that is using this feature. Any suggestions? Thanks! Michael
Re: Setting TERM environment variable before starting the application
Hi Michael, I think you could do it using the board late initialize, because it is just after the board's drivers initialization and before the application initialization. So it will run before any ncurses initialization. Did you mean you ported the default ncurses used on Linux or are you using the pdcurses that Mr. Greg ported to NuttX some years ago? BR, Alan On 3/1/22, Michael Jung wrote: > Hello, > > I am playing around with ncurses on NuttX and would like to set a TERM > environment variable to xterm-256color via setenv() before the application > is started (I would like to run unmodified ncurses example applications), > but am not quite sure where this would best fit in. It seems that > CONFIG_BOARD_EARLY_INITIALIZE and board_early_initialize() would do the > trick, but there is not a single board defconfig that is using this > feature. Any suggestions? > > Thanks! > Michael >
Re: Setting TERM environment variable before starting the application
Hi Alan, thanks for your feedback. According to the documentation board_late_initialize() is running in a separate thread (But probably not in its own task group?!). So would the environment variable still be copied to the application? I am running the default ncurses from Linux. There really was not much porting to do (some test programs call system() and popen()/pclose(), which I had to comment out). Bye, Michael Am Di., 1. März 2022 um 19:27 Uhr schrieb Alan Carvalho de Assis < acas...@gmail.com>: > Hi Michael, > > I think you could do it using the board late initialize, because it is > just after the board's drivers initialization and before the > application initialization. > > So it will run before any ncurses initialization. > > Did you mean you ported the default ncurses used on Linux or are you > using the pdcurses that Mr. Greg ported to NuttX some years ago? > > BR, > > Alan > > On 3/1/22, Michael Jung wrote: > > Hello, > > > > I am playing around with ncurses on NuttX and would like to set a TERM > > environment variable to xterm-256color via setenv() before the > application > > is started (I would like to run unmodified ncurses example applications), > > but am not quite sure where this would best fit in. It seems that > > CONFIG_BOARD_EARLY_INITIALIZE and board_early_initialize() would do the > > trick, but there is not a single board defconfig that is using this > > feature. Any suggestions? > > > > Thanks! > > Michael > > >
Re: Setting TERM environment variable before starting the application
I don't know if it was modified recently but it was optional to run as separated thread. Very nice Michael, it is really good when porting programs and libraries from Linux are easy to do. So, currently we have litesql, pdcurses, ncurses, etc as examples of porting from Linux. Maybe it could be possible to port nginx too, at least an old version and for some board with enough memory. BR, Alan On Tuesday, March 1, 2022, Michael Jung wrote: > Hi Alan, > > thanks for your feedback. According to the documentation > board_late_initialize() is running in a separate thread (But probably not > in its own task group?!). So would the environment variable still be > copied to the application? > > I am running the default ncurses from Linux. There really was not much > porting to do (some test programs call system() and popen()/pclose(), which > I had to comment out). > > Bye, > Michael > > > > > Am Di., 1. März 2022 um 19:27 Uhr schrieb Alan Carvalho de Assis < > acas...@gmail.com>: > > > Hi Michael, > > > > I think you could do it using the board late initialize, because it is > > just after the board's drivers initialization and before the > > application initialization. > > > > So it will run before any ncurses initialization. > > > > Did you mean you ported the default ncurses used on Linux or are you > > using the pdcurses that Mr. Greg ported to NuttX some years ago? > > > > BR, > > > > Alan > > > > On 3/1/22, Michael Jung wrote: > > > Hello, > > > > > > I am playing around with ncurses on NuttX and would like to set a TERM > > > environment variable to xterm-256color via setenv() before the > > application > > > is started (I would like to run unmodified ncurses example > applications), > > > but am not quite sure where this would best fit in. It seems that > > > CONFIG_BOARD_EARLY_INITIALIZE and board_early_initialize() would do the > > > trick, but there is not a single board defconfig that is using this > > > feature. Any suggestions? > > > > > > Thanks! > > > Michael > > > > > >