STM32N6 VENC + NPU + Camera linker script
- February 16, 2026
- 1 reply
- 159 views
Hi all,
I am currently trying to merge the STM32N6 VENC_SDCARD Project with my Codebase that is based on the STM32 Modelzoo Object Detection (https://github.com/AlexGraefe/STM32N6CameraEvaluation). However, naively copy-pasting the code does not work. For most resolutions, the generated h264 streams are wrong and for the others, the code crashes at weird places e.g., when leaving a function. As the only difference between my code and the VENC_SDCARD example is the linker script, I was wondering if wrong memory allocations might be the reason for this. The heap in the object detection example is placed on AXISRAM1, which might too small. However, I am unable to place the heap onto other parts of the RAM (internal or external), without the program crashing directly upon startup.
Copying the linker script provided by VENC_SDCARD also does not work as then, I run into compilation errors stating the code uses too much RAM (as buffers for images are placed in different regions).
Moreover, I noticed that the linker script provided by the Modelzoo, which I use (appended), says: AXISRAM1_S (xrw) : ORIGIN = 0x34000400. However, the reference manual states that AXISRAM1 should start at 0x34064000.
To summarize, I am heavily confused on how to write a linker script for the N6, especially when it comes to fully utilizing all available RAMs for different peripherals.
Do you have any resources or guidance on how a general purpose linker script for the N6 that supports as many functionalities as possible (NPU, VENC, external RAM, Camera, space for CPU-heavy tasks) should look like?
Best regards,
Alex
