You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2022/09/12 10:55:26 UTC

[mynewt-core] branch master updated: hw/bsp/olimex-pic32xxx: Update BSP

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 670054fcc hw/bsp/olimex-pic32xxx: Update BSP
670054fcc is described below

commit 670054fccf3ef3ce39e3b547124c1306388e8613
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Mon Aug 29 19:56:23 2022 +0200

    hw/bsp/olimex-pic32xxx: Update BSP
    
    both olimex-pic32-emz64 and olimex-pic32-hmz-144 have
    MCU with 2MB of flash. So far slot 0 and 1 had 192 kB and
    most of the flash was not used.
    
    This increases slot size to 512 kB and also sets up other
    common flash areas that are used by various packages (i.e. logs).
---
 hw/bsp/olimex-pic32-emz64/bsp.yml           | 16 ++++++++--------
 hw/bsp/olimex-pic32-emz64/p32mz_app_mem.ld  |  3 ++-
 hw/bsp/olimex-pic32-emz64/syscfg.yml        |  4 ++++
 hw/bsp/olimex-pic32-hmz144/bsp.yml          | 16 ++++++++--------
 hw/bsp/olimex-pic32-hmz144/p32mz_app_mem.ld |  5 +++--
 hw/bsp/olimex-pic32-hmz144/syscfg.yml       |  4 ++++
 6 files changed, 29 insertions(+), 19 deletions(-)

diff --git a/hw/bsp/olimex-pic32-emz64/bsp.yml b/hw/bsp/olimex-pic32-emz64/bsp.yml
index cd9a3d9a0..c60d740e3 100644
--- a/hw/bsp/olimex-pic32-emz64/bsp.yml
+++ b/hw/bsp/olimex-pic32-emz64/bsp.yml
@@ -41,24 +41,24 @@ bsp.flash_map:
         FLASH_AREA_IMAGE_0:
             device: 0
             offset: 0x1D000000
-            size: 192kB
+            size: 512kB
         FLASH_AREA_IMAGE_1:
             device: 0
-            offset: 0x1D030000
-            size: 192kB
+            offset: 0x1D080000
+            size: 512kB
         FLASH_AREA_IMAGE_SCRATCH:
             device: 0
-            offset: 0x1D060000
+            offset: 0x1D100000
             size: 16kB
 
         # User areas.
         FLASH_AREA_REBOOT_LOG:
             user_id: 0
-            device: 1
-            offset: 0x00000000
+            device: 0
+            offset: 0x1D110000
             size: 64kB
         FLASH_AREA_NFFS:
             user_id: 1
-            device: 1
-            offset: 0x00010000
+            device: 0
+            offset: 0x1D104000
             size: 32kB
diff --git a/hw/bsp/olimex-pic32-emz64/p32mz_app_mem.ld b/hw/bsp/olimex-pic32-emz64/p32mz_app_mem.ld
index 46861cbe4..963373131 100644
--- a/hw/bsp/olimex-pic32-emz64/p32mz_app_mem.ld
+++ b/hw/bsp/olimex-pic32-emz64/p32mz_app_mem.ld
@@ -26,6 +26,7 @@
  */
 
   /* Program leave space for image header ~192KB */
-  kseg0_program_mem     (rx)  : ORIGIN = 0x9D000020, LENGTH = 0x2FFE0
+  kseg0_program_mem     (rx)  : ORIGIN = 0x9D000020, LENGTH = 0x7FFE0
+  kseg1_program_mem     (rx)  : ORIGIN = 0xBD000020, LENGTH = 0x7FFE0
   /* Cachable RAM 512KB */
   kseg0_data_mem       (w!x)  : ORIGIN = 0x80000000, LENGTH = 0x80000
diff --git a/hw/bsp/olimex-pic32-emz64/syscfg.yml b/hw/bsp/olimex-pic32-emz64/syscfg.yml
index eafd62c5b..52f0cd61e 100644
--- a/hw/bsp/olimex-pic32-emz64/syscfg.yml
+++ b/hw/bsp/olimex-pic32-emz64/syscfg.yml
@@ -28,6 +28,10 @@ syscfg.defs:
         range: 8000000, 24000000, 50000000, 100000000, 200000000
 
 syscfg.vals:
+    REBOOT_LOG_FLASH_AREA: FLASH_AREA_REBOOT_LOG
+    CONFIG_FCB_FLASH_AREA: FLASH_AREA_NFFS
+    NFFS_FLASH_AREA: FLASH_AREA_NFFS
+    COREDUMP_FLASH_AREA: FLASH_AREA_IMAGE_1
     TIMER_0: 1
     I2C_3: 1
     I2C_3_FREQ_KHZ: 400
diff --git a/hw/bsp/olimex-pic32-hmz144/bsp.yml b/hw/bsp/olimex-pic32-hmz144/bsp.yml
index 8f92ee3fe..2399de433 100644
--- a/hw/bsp/olimex-pic32-hmz144/bsp.yml
+++ b/hw/bsp/olimex-pic32-hmz144/bsp.yml
@@ -41,24 +41,24 @@ bsp.flash_map:
         FLASH_AREA_IMAGE_0:
             device: 0
             offset: 0x1D000000
-            size: 192kB
+            size: 512kB
         FLASH_AREA_IMAGE_1:
             device: 0
-            offset: 0x1D030000
-            size: 192kB
+            offset: 0x1D080000
+            size: 512kB
         FLASH_AREA_IMAGE_SCRATCH:
             device: 0
-            offset: 0x1D060000
+            offset: 0x1D100000
             size: 16kB
 
         # User areas.
         FLASH_AREA_REBOOT_LOG:
             user_id: 0
-            device: 1
-            offset: 0x00000000
+            device: 0
+            offset: 0x1D110000
             size: 64kB
         FLASH_AREA_NFFS:
             user_id: 1
-            device: 1
-            offset: 0x00010000
+            device: 0
+            offset: 0x1D104000
             size: 32kB
diff --git a/hw/bsp/olimex-pic32-hmz144/p32mz_app_mem.ld b/hw/bsp/olimex-pic32-hmz144/p32mz_app_mem.ld
index 46861cbe4..75555b95e 100644
--- a/hw/bsp/olimex-pic32-hmz144/p32mz_app_mem.ld
+++ b/hw/bsp/olimex-pic32-hmz144/p32mz_app_mem.ld
@@ -25,7 +25,8 @@
  * sections are same.
  */
 
-  /* Program leave space for image header ~192KB */
-  kseg0_program_mem     (rx)  : ORIGIN = 0x9D000020, LENGTH = 0x2FFE0
+  /* Program leave space for image header ~512KB */
+  kseg0_program_mem     (rx)  : ORIGIN = 0x9D000020, LENGTH = 0x7FFE0
+  kseg1_program_mem     (rx)  : ORIGIN = 0xBD000020, LENGTH = 0x7FFE0
   /* Cachable RAM 512KB */
   kseg0_data_mem       (w!x)  : ORIGIN = 0x80000000, LENGTH = 0x80000
diff --git a/hw/bsp/olimex-pic32-hmz144/syscfg.yml b/hw/bsp/olimex-pic32-hmz144/syscfg.yml
index f10800af6..7d6c66387 100644
--- a/hw/bsp/olimex-pic32-hmz144/syscfg.yml
+++ b/hw/bsp/olimex-pic32-hmz144/syscfg.yml
@@ -28,6 +28,10 @@ syscfg.defs:
         range: 8000000, 24000000, 50000000, 100000000, 200000000
 
 syscfg.vals:
+    REBOOT_LOG_FLASH_AREA: FLASH_AREA_REBOOT_LOG
+    CONFIG_FCB_FLASH_AREA: FLASH_AREA_NFFS
+    NFFS_FLASH_AREA: FLASH_AREA_NFFS
+    COREDUMP_FLASH_AREA: FLASH_AREA_IMAGE_1
     TIMER_0: 1
 
     # UART_1 available on UEXT header