btashton edited a comment on issue #3140:
URL: 
https://github.com/apache/incubator-nuttx/issues/3140#issuecomment-813177941


   @HecticSalad To use the GPIO demo you need to enable these flags:
   ```
   CONFIG_BOARD_LATE_INITIALIZE=y
   CONFIG_DEV_GPIO=y
   CONFIG_EXAMPLES_GPIO=y
   CONFIG_NSH_ARCHINIT=y
   ```
   
   You will then have these 9 pins mapped to the driver
   
https://github.com/apache/incubator-nuttx/blob/master/boards/arm/stm32f7/nucleo-144/src/nucleo-144.h#L183-L203
   
   Here is it running:
   ```
   NuttShell (NSH) NuttX-10.0.1
   nsh> ls /dev
   /dev:
    console
    gpin0
    gpin1
    gpin2
    gpin3
    gpint8
    gpout4
    gpout5
    gpout6
    gpout7
    null
    ttyS0
   nsh> gpio -o 1 /dev/gpout4
   Driver: /dev/gpout4
     Output pin:    Value=1
     Writing:       Value=1
     Verify:        Value=1
   nsh> 
   ```
   You can read a little about the late initialize feature here 
https://nuttx.apache.org/docs/latest/reference/os/board.html  and then the  the 
NSH_ARCHINIT is documented here 
https://nuttx.apache.org/docs/latest/applications/nsh/config.html?highlight=nsh_archinit#nsh-specific-configuration-settings
 which calls the late init function for you.
   
   
   Also for your openocd command if you are using a recent build, you can just 
use the board configuration:
   ```
   openocd -f board/st_nucleo_f7.cfg -c init -c "reset halt" -c "flash 
write_image erase nuttx.bin 0x08000000"
   ```
   


-- 
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:
[email protected]


Reply via email to