2025-06-20 4:45 AM
Hello ST Community,
I’m working with the STM32 Nucleo-N657 board and need a way to execute my application after flashing to external memory without manually toggling the BOOT1 jumper on the board.
What I’m Doing Now:
Problem:
I have N6 board connected to a remote PC and won’t always have physical access to toggle the BOOT1 jumper and press reset.
I would like to know:
Is there a programmatic or configuration-based way to run the program automatically after flashing, without needing to change the BOOT1 jumper manually?
I am looking for a way to avoid all manual interventions between flashing and execution.
Any help or guidance will be greatly appreciated!
Thanks,
2026-04-25 2:39 PM
ST - is there some way to achieve this? Alternatively is there a CLI based way to run an application from RAM in dev mode without the use of CubeIDE?
2026-04-26 10:03 AM
Hello @Konami
In DEV_BOOT mode, to execute code from RAM, you need tto load the binary into the target memory region (AXISRAM1 or AXISRAM2), perform a core reset, force the program counter (PC) at the start address of that memory region (at 0x34180400 if in AXISRAM2), and set the stack pointer (SP) at the beginning of stack address.
This is depend of the linker configuration used.
This is what all IDEs such as STM32CubeIDE or IAR Embedded Workbench for Arm do. STM32_Programmer_CLI, combined with a script, can technically perform all of these steps as well.
Be careful: on the STM32N6 microcontroller series, applying a system reset will erase AXISRAM1 and AXISRAM2. Refer to RM0486, Table 33 – Internal SRAM features. Therefore, make sure to perform a core reset instead.
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.
2026-04-26 10:06 AM
Unfortunately, there is no other way to change the boot behavior beyond the logical level combinations of the BOOT0 and BOOT1 pins.
In all cases, the decision is made by the BootROM and its execution is not accessible by the user. Refer to UM3234.
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.
2026-04-26 1:50 PM
Great, thanks. Could you share what the right commands for STM32_Programmer_CLI to do this would be?
2026-04-27 12:12 AM
Hello @Konami
For the full command, you should use:
>STM32_Programmer_CLI.exe --help
Or refer to UM2237
STM32CubeProgrammer software description - User manual
I do not test on my side, but if the linker file is STM32N6XX_AXISRAM2_fsbl.ld, it could be something like:
>STM32_Programmer_CLI.exe -c port=SWD ap=1 reset=Crst -w FSBL.bin 0x34180400
>STM32_Programmer_CLI.exe -c port=SWD ap=1 reset=Crst -coreReg PC=0x34180404
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.