diff options
| author | Glenn Ruben Bakke <glennbakke@gmail.com> | 2018-04-20 19:04:08 +0200 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-07-18 17:12:26 +1000 |
| commit | 03da4e33fb20c22da4a2f0bf26cb2ff5479d0f01 (patch) | |
| tree | 045f282cb9407d9f1c304f3c63855b5e7228ef3e | |
| parent | 58ec23fdf707329088f3d2f7537a94e8cd77b167 (diff) | |
nrf/bluetooth: Fixes for s132 v5 BLE stack
Removing unused nrf52832_512k_64k_s132_5.0.0.ld.
Adding new linker script s132_5.0.0 following new
linker script scheme.
Updating ble_drv.c to handle de-increment of
outstanding tx packets on hvx for s132 v5.
| -rw-r--r-- | ports/nrf/boards/nrf52832_512k_64k_s132_5.0.0.ld | 26 | ||||
| -rw-r--r-- | ports/nrf/boards/s132_5.0.0.ld | 4 | ||||
| -rw-r--r-- | ports/nrf/drivers/bluetooth/ble_drv.c | 4 |
3 files changed, 8 insertions, 26 deletions
diff --git a/ports/nrf/boards/nrf52832_512k_64k_s132_5.0.0.ld b/ports/nrf/boards/nrf52832_512k_64k_s132_5.0.0.ld deleted file mode 100644 index d4982565e..000000000 --- a/ports/nrf/boards/nrf52832_512k_64k_s132_5.0.0.ld +++ /dev/null @@ -1,26 +0,0 @@ -/* - GNU linker script for NRF52 w/ s132 5.0.0 SoftDevice -*/ - -/* Specify the memory areas */ -MEMORY -{ - FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K /* entire flash */ - FLASH_TEXT (rx) : ORIGIN = 0x00023000, LENGTH = 308K /* app */ - FLASH_USER (rx) : ORIGIN = 0x00070000, LENGTH = 64K /* app data, filesystem */ - RAM (xrw) : ORIGIN = 0x200039c0, LENGTH = 0x0c640 /* 49.5 KiB, give 8KiB headroom for softdevice */ -} - -/* produce a link error if there is not this amount of RAM for these sections */ -_stack_size = 8K; -_minimum_heap_size = 16K; - -/* top end of the stack */ - -/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/ -_estack = ORIGIN(RAM) + LENGTH(RAM); - -/* RAM extents for the garbage collector */ -_ram_end = ORIGIN(RAM) + LENGTH(RAM); - -INCLUDE "boards/common.ld" diff --git a/ports/nrf/boards/s132_5.0.0.ld b/ports/nrf/boards/s132_5.0.0.ld new file mode 100644 index 000000000..93a70687c --- /dev/null +++ b/ports/nrf/boards/s132_5.0.0.ld @@ -0,0 +1,4 @@ +/* GNU linker script for s132 SoftDevice version 5.0.0 */ + +_sd_size = 0x00023000; +_sd_ram = 0x000039c0; diff --git a/ports/nrf/drivers/bluetooth/ble_drv.c b/ports/nrf/drivers/bluetooth/ble_drv.c index 4790073e2..8b3609f89 100644 --- a/ports/nrf/drivers/bluetooth/ble_drv.c +++ b/ports/nrf/drivers/bluetooth/ble_drv.c @@ -979,7 +979,11 @@ static void ble_evt_handler(ble_evt_t * p_ble_evt) { case BLE_EVT_TX_COMPLETE: #endif BLE_DRIVER_LOG("BLE EVT TX COMPLETE\n"); +#if (BLE_API_VERSION == 4) + m_tx_in_progress -= p_ble_evt->evt.gatts_evt.params.hvn_tx_complete.count; +#else m_tx_in_progress -= p_ble_evt->evt.common_evt.params.tx_complete.count; +#endif break; case BLE_GAP_EVT_SEC_PARAMS_REQUEST: |
