From bc7c3123a7ecb7daf517a778ebdfe6b697830a77 Mon Sep 17 00:00:00 2001 From: Jerzy Kasenberg Date: Sat, 16 Mar 2024 18:39:22 +0100 Subject: [PATCH] mcu/pic32: Add image_header region This add dependency to mgmt/image_header package that provides dummy image header so elf file can be loaded to device without creating the image with newt tool. This image header is then replaced by newt tool. --- hw/mcu/microchip/pic32mz/p32mz_app.ld | 5 +++++ hw/mcu/microchip/pic32mz/pkg.yml | 1 + 2 files changed, 6 insertions(+) diff --git a/hw/mcu/microchip/pic32mz/p32mz_app.ld b/hw/mcu/microchip/pic32mz/p32mz_app.ld index 0af636b862..3310fc7bc0 100644 --- a/hw/mcu/microchip/pic32mz/p32mz_app.ld +++ b/hw/mcu/microchip/pic32mz/p32mz_app.ld @@ -117,6 +117,7 @@ MEMORY { kseg1_boot_mem : ORIGIN = 0x9FC00000, LENGTH = 0x480 kseg1_boot_mem_4B0 : ORIGIN = 0xBFC004B0, LENGTH = 0xA50 + kseg0_image_header_mem (r) : ORIGIN = 0x9D000000, LENGTH = 0x20 INCLUDE p32mz_app_mem.ld config_BFC0FF40 : ORIGIN = 0xBFC0FF40, LENGTH = 0x4 config_BFC0FF44 : ORIGIN = 0xBFC0FF44, LENGTH = 0x4 @@ -695,6 +696,10 @@ SECTIONS KEEP(*(.boot_reset)) } > kseg1_boot_mem /* Boot Sections */ + .image_header : + { + KEEP(*(.image_header*)) /* Image header */ + } > kseg0_image_header_mem .reset : { _app_reset = .; diff --git a/hw/mcu/microchip/pic32mz/pkg.yml b/hw/mcu/microchip/pic32mz/pkg.yml index 38874b8d9d..0096c9050e 100644 --- a/hw/mcu/microchip/pic32mz/pkg.yml +++ b/hw/mcu/microchip/pic32mz/pkg.yml @@ -28,6 +28,7 @@ pkg.keywords: pkg.deps: - "@apache-mynewt-core/hw/hal" - "@apache-mynewt-core/hw/drivers/uart/uart_hal" + - "@apache-mynewt-core/mgmt/image_header" pkg.deps.ETH_0: - "@apache-mynewt-core/hw/drivers/lwip/pic32_eth"