diff --git a/porting/examples/nuttx/main.c b/porting/examples/nuttx/main.c index 7492e120e..9eeddec83 100644 --- a/porting/examples/nuttx/main.c +++ b/porting/examples/nuttx/main.c @@ -24,6 +24,9 @@ #include #include #include +#include + +#include "netutils/netinit.h" #include "nimble/nimble_npl.h" #include "nimble/nimble_port.h" @@ -71,6 +74,18 @@ int main(int argc, char *argv[]) ble_hci_sock_set_device(atoi(argv[1])); } +#ifndef CONFIG_NSH_ARCHINIT + /* Perform architecture-specific initialization */ + + boardctl(BOARDIOC_INIT, 0); +#endif + +#ifndef CONFIG_NSH_NETINIT + /* Bring up the network */ + + netinit_bringup(); +#endif + printf("port init\n"); nimble_port_init();