This is an automated email from the ASF dual-hosted git repository. kasjer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 22199c957c972157a51827d63a975f443aa0ba9e Author: Jerzy Kasenberg <[email protected]> AuthorDate: Mon Oct 19 21:45:06 2026 +0200 hw/mcu/pic32mz: Place .bss right after .sbss .bss output section had no address expression so it was placed at next free address of kseg0_data_mem region. With XC32 v5 linker option --no-alloc-dinit-mapping (needed to keep interrupt vector offset registers out of the binary image) sections initialized by .dinit template do not have ALLOC flag and are not taken into account. As a result .bss was placed over .sbss, e.g. main task stack overlapped OS global variables. Use location counter (aligned) as .bss address, the same way it is done for .sbss. Layout produced by older XC32 versions is unchanged. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Jerzy Kasenberg <[email protected]> --- hw/mcu/microchip/pic32mz/p32mz_app.ld | 2 +- hw/mcu/microchip/pic32mz/p32mz_boot.ld | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mcu/microchip/pic32mz/p32mz_app.ld b/hw/mcu/microchip/pic32mz/p32mz_app.ld index 3310fc7bc..de6458e06 100644 --- a/hw/mcu/microchip/pic32mz/p32mz_app.ld +++ b/hw/mcu/microchip/pic32mz/p32mz_app.ld @@ -1743,7 +1743,7 @@ SECTIONS * around absolute sections as needed. * */ - .bss : + .bss ALIGN(4) : { *(.dynbss) *(COMMON) diff --git a/hw/mcu/microchip/pic32mz/p32mz_boot.ld b/hw/mcu/microchip/pic32mz/p32mz_boot.ld index c9e31d847..d841f36cc 100644 --- a/hw/mcu/microchip/pic32mz/p32mz_boot.ld +++ b/hw/mcu/microchip/pic32mz/p32mz_boot.ld @@ -1740,7 +1740,7 @@ SECTIONS * around absolute sections as needed. * */ - .bss : + .bss ALIGN(4) : { *(.dynbss) *(COMMON)
