mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [11/50] [abbrv] incubator-mynewt-core git commit: MYNEWT-731 Crash in config_init_fcb()
Date Wed, 26 Apr 2017 22:40:59 GMT
MYNEWT-731 Crash in config_init_fcb()

- While specifying the flash layout NRF52840 and NRF52832 need to be
  distinguished. Seperate structs are define for each oen now.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/a1a0647f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/a1a0647f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/a1a0647f

Branch: refs/heads/bluetooth5
Commit: a1a0647f89856a0246ec24182c9ca72139d102aa
Parents: 813463e
Author: Vipul Rahane <vipulrahane@apache.org>
Authored: Tue Apr 18 18:47:32 2017 -0700
Committer: Vipul Rahane <vipulrahane@apache.org>
Committed: Tue Apr 18 18:47:32 2017 -0700

----------------------------------------------------------------------
 hw/mcu/nordic/nrf52xxx/src/hal_flash.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a1a0647f/hw/mcu/nordic/nrf52xxx/src/hal_flash.c
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/src/hal_flash.c b/hw/mcu/nordic/nrf52xxx/src/hal_flash.c
index 7d3410b..57a8ee0 100644
--- a/hw/mcu/nordic/nrf52xxx/src/hal_flash.c
+++ b/hw/mcu/nordic/nrf52xxx/src/hal_flash.c
@@ -43,6 +43,15 @@ static const struct hal_flash_funcs nrf52k_flash_funcs = {
     .hff_init = nrf52k_flash_init
 };
 
+#ifdef NRF52840_XXAA
+const struct hal_flash nrf52k_flash_dev = {
+    .hf_itf = &nrf52k_flash_funcs,
+    .hf_base_addr = 0x00000000,
+    .hf_size = 1024 * 1024,	/* XXX read from factory info? */
+    .hf_sector_cnt = 256,	/* XXX read from factory info? */
+    .hf_align = 1
+};
+#elif defined(NRF52832_XXAA)
 const struct hal_flash nrf52k_flash_dev = {
     .hf_itf = &nrf52k_flash_funcs,
     .hf_base_addr = 0x00000000,
@@ -50,6 +59,9 @@ const struct hal_flash nrf52k_flash_dev = {
     .hf_sector_cnt = 128,	/* XXX read from factory info? */
     .hf_align = 1
 };
+#else
+#error "Must define hal_flash struct for NRF52 type"
+#endif
 
 #define NRF52K_FLASH_READY() (NRF_NVMC->READY == NVMC_READY_READY_Ready)
 


Mime
View raw message