mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-15 13:40:01 +00:00
porting: Fix mempool initialization
This fix crash on init due to changes in mmepool init after recent sync with core.
This commit is contained in:
@@ -65,8 +65,8 @@ int main(int argc, char *argv[])
|
||||
ble_hci_sock_set_device(atoi(argv[1]));
|
||||
}
|
||||
|
||||
ble_hci_sock_init();
|
||||
nimble_port_init();
|
||||
ble_hci_sock_init();
|
||||
|
||||
/* This example provides GATT Alert service */
|
||||
ble_svc_gap_init();
|
||||
|
||||
@@ -77,8 +77,8 @@ int main(int argc, char *argv[])
|
||||
ble_hci_sock_set_device(atoi(argv[1]));
|
||||
}
|
||||
|
||||
ble_hci_sock_init();
|
||||
nimble_port_init();
|
||||
ble_hci_sock_init();
|
||||
|
||||
ble_svc_gap_init();
|
||||
ble_svc_gatt_init();
|
||||
|
||||
@@ -71,11 +71,12 @@ int main(int argc, char *argv[])
|
||||
ble_hci_sock_set_device(atoi(argv[1]));
|
||||
}
|
||||
|
||||
printf("hci init\n");
|
||||
ble_hci_sock_init();
|
||||
printf("port init\n");
|
||||
nimble_port_init();
|
||||
|
||||
printf("hci init\n");
|
||||
ble_hci_sock_init();
|
||||
|
||||
/* This example provides GATT Alert service */
|
||||
printf("gap init\n");
|
||||
ble_svc_gap_init();
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
static struct ble_npl_eventq g_eventq_dflt;
|
||||
|
||||
extern void os_msys_init(void);
|
||||
extern void os_mempool_module_init(void);
|
||||
|
||||
void
|
||||
nimble_port_init(void)
|
||||
@@ -37,6 +38,7 @@ nimble_port_init(void)
|
||||
/* Initialize default event queue */
|
||||
ble_npl_eventq_init(&g_eventq_dflt);
|
||||
/* Initialize the global memory pool */
|
||||
os_mempool_module_init();
|
||||
os_msys_init();
|
||||
/* Initialize the host */
|
||||
ble_hs_init();
|
||||
|
||||
Reference in New Issue
Block a user