You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2026/10/15 08:13:39 UTC
(mynewt-nimble) 02/03: targets/auracast_usb: Sync MCU linker script with mynewt-core
This is an automated email from the ASF dual-hosted git repository.
sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit e5f7579c884ea7003cc68c3eaf34a8f86cc66f5c
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Wed Oct 14 22:33:41 2026 +0200
targets/auracast_usb: Sync MCU linker script with mynewt-core
The target uses a copy of nRF5340 MCU linker script from mynewt-core
that places LC3, libsamplerate, libm and audio_usb code in RAM.
The copy got out of date with core and the application no longer
links (undefined static_conf_handlers) since link tables are
missing.
Regenerate the script from current mynewt-core version, which brings
in link tables (that now also provide net core image section), NSC
region and .noinit section, and keep only auracast specific code
placement on top of it.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jerzy Kasenberg <je...@codecoup.pl>
---
targets/auracast_usb/nrf5340-mcu.ld | 42 ++++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 19 deletions(-)
diff --git a/targets/auracast_usb/nrf5340-mcu.ld b/targets/auracast_usb/nrf5340-mcu.ld
index 2e2e4f167..6417f4e86 100644
--- a/targets/auracast_usb/nrf5340-mcu.ld
+++ b/targets/auracast_usb/nrf5340-mcu.ld
@@ -41,11 +41,13 @@ OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
* __StackLimit
* __StackTop
* __stack
- * __bssnz_start__
- * __bssnz_end__
+ * __noinit_start__
+ * __noinit_end__
*/
ENTRY(Reset_Handler)
+NSC_REGION_SIZE = 0x200;
+
SECTIONS
{
.imghdr (NOLOAD):
@@ -99,6 +101,7 @@ SECTIONS
*(SORT(.dtors.*))
*(.dtors)
+INCLUDE "link_tables.ld.h"
EXCLUDE_FILE(*liblc3.a: *libsamplerate.a:) *(.rodata*)
*(.eh_frame*)
@@ -106,14 +109,6 @@ SECTIONS
. = ALIGN(4);
} > FLASH
-
- .net_core_img :
- {
- PROVIDE(net_core_img_start = .);
- KEEP(*(.net_core_img));
- PROVIDE(net_core_img_end = .);
- } > FLASH
-
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
@@ -126,6 +121,15 @@ SECTIONS
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
. = ALIGN(4);
} > FLASH
+
+ .gnu.sgstubs :
+ {
+ FILL(0xffff);
+ . = (ALIGN(16384) >= . + NSC_REGION_SIZE) ? (ALIGN(16384) - NSC_REGION_SIZE) : (ALIGN(16384) - NSC_REGION_SIZE + 16384);
+ _start_sg = .;
+ } > FLASH
+ PROVIDE(_end_sg = .);
+
__exidx_end = .;
__etext = .;
@@ -172,15 +176,6 @@ SECTIONS
/* Non-zeroed BSS. This section is similar to BSS, but does not get zeroed at init-time.
*/
- .bssnz :
- {
- . = ALIGN(4);
- __bssnz_start__ = .;
- *(.bss.core.nz*)
- . = ALIGN(4);
- __bssnz_end__ = .;
- } > RAM
-
.bss :
{
. = ALIGN(4);
@@ -191,6 +186,15 @@ SECTIONS
__bss_end__ = .;
} > RAM
+ .noinit :
+ {
+ . = ALIGN(4);
+ __noinit_start__ = .;
+ *(.noinit*)
+ . = ALIGN(4);
+ __noinit_end__ = .;
+ } > RAM
+
/* Heap starts after BSS */
. = ALIGN(8);
__HeapBase = .;