cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6 - all internal SRAM for data - all code on external QSPI?

tjaekel
Lead

I am not yet the full expert (I have not read all docs, just trying with a simple project).
It looks like, what I have in mind is maybe not possible.

Goal:
I want to have all my code on external QSPI memory (because the chip does not have an internal code flash memory).
The entire internal SRAM should be free to be used completely as data (not any code in internal SRAM).

My impressions after first trials:

  1. I can load and debug code when generated as FSBL:
    The code is loaded via ST-LINK debugger to internal SRAM and I can step through the code - WORKS
  2. But what happens I decide to place and KEEP the code on external QSPI?
    I cannot flash (with IDE, instead a need to sign the code and flash with STM32CubeProgrammer).
    Could I still "debug" my code, even it is stored (and executed) from external QSPI memory?

The issue seems to be this:

  • If I write project as FSBL (in order to be able to debug: code runs in internal SRAM) - I cannot make use of entire internal SRAM as data.
  • OK: I can change my source code and move/keep code to external QSPI. This makes my internal SRAM free for more data.
    But I cannot debug anymore???

Question:
Is it possible to let boot STM32N6 from external QSPI memory and keep going to execute code from external QSPI? Can I utilize the entire internal SRAM just for data (not any code)? (e.g. using XIP feature - is it there?)
How to debug such a project? (seems to be not possible)

Is there any performance penalty when I keep my code running from external QSPI (even it should be an Octal-SPI and potentially caches involved)?

Is there a linker script example (for STM32IDE, GNU) which can do this BIN file generation? (all code remains on external QSPI, all internal SRAM for data, flash signed code on external QSPI). I have not found one in the Appli sub-project.

1 REPLY 1
RomainR.
ST Employee

Do not duplicate questions and refer to the following posts below:

https://community.st.com/t5/stm32-mcus-boards-and-hardware/nucleo-n657x0-q-failed-to-start-gdb-server/m-p/756845#M23229

https://community.st.com/t5/stm32-mcus-boards-and-hardware/stm32n6-nucleo-board-not-as-1v8-possible/td-p/756852

https://community.st.com/t5/stm32-mcus-boards-and-hardware/stm32n6-nucleo-board-with-external-qspi-image-booting/td-p/756848

Best regards,

Romain,

 

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.