Skip to main content
Visitor II
October 20, 2026
Solved

issue with ST Edge AI tutorial linker script STM32N6

As i was going through the tutorial
https://dev.st.com/edge-ai-docs/general/latest/en/docs/tutorials/how-to-deploy-ai-model-stm32n6-neural-art.html
i have faced issues in the linker script.

The tutorial’s linker-script example places model data in EXTFLASH using the *_atonbuf.xSPI2*(.rodata*) pattern. In my generated project, however, the model weights are emitted in Application/User/AI/network.o as .rodata._ec_blob_network_* sections. Those sections didn’t match the example’s pattern, so the general .rodata* rule placed them in ROM instead.

This caused .rodata to extend past the ROM boundary at 0x70180000 and overlap .AI_XSPI2. Adding *(.rodata._ec_blob_network*) to the .AI_XSPI2 section moved the model blobs into EXTFLASH and fixed the link.

Please consider updating the tutorial to mention that generated model-section names can differ, and show how to check the linker map and route the generated model blob sections to EXTFLASH.

the solution for me was to update the linker script with this.

	  /* NPU activation buffers and model weights placed by ST Edge AI Core */
.AI_AXIFLEXMEM (NOLOAD) : { . = ALIGN(4); KEEP(*(.AI_AXIFLEXMEM)) . = ALIGN(4); } >RAM
.AI_AXISRAM1 (NOLOAD) : { . = ALIGN(4); KEEP(*(.AI_AXISRAM1)) . = ALIGN(4); } >RAM
.AI_AXISRAM2 (NOLOAD) : { . = ALIGN(4); KEEP(*(.AI_AXISRAM2)) . = ALIGN(4); } >AXISRAM2
.AI_AXISRAM3 (NOLOAD) : { . = ALIGN(4); KEEP(*(.AI_AXISRAM3)) . = ALIGN(4); } >AXISRAM3
.AI_AXISRAM4 (NOLOAD) : { . = ALIGN(4); KEEP(*(.AI_AXISRAM4)) . = ALIGN(4); } >AXISRAM4
.AI_AXISRAM5 (NOLOAD) : { . = ALIGN(4); KEEP(*(.AI_AXISRAM5)) . = ALIGN(4); } >AXISRAM5
.AI_AXISRAM6 (NOLOAD) : { . = ALIGN(4); KEEP(*(.AI_AXISRAM6)) . = ALIGN(4); } >AXISRAM6
.AI_XSPI2 :
{
. = ALIGN(4);
KEEP(*(.AI_XSPI2))
*(.rodata._ec_blob_network*)
*_atonbuf.xSPI2*(.rodata*)
. = ALIGN(4);
} >EXTFLASH

 

Julian E.
Julian E.Best answer
ST Technical Moderator
October 21, 2026

Hello ​@zahid_alfahmi,

 

Thank you for your comment.

I shared it internally and we will update our tutorial.

 

Have a good day,

Julian

​In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

1 reply

Julian E.
Julian E.Best answer
ST Technical Moderator
October 21, 2026

Hello ​@zahid_alfahmi,

 

Thank you for your comment.

I shared it internally and we will update our tutorial.

 

Have a good day,

Julian

​In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.