You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Project provides a reference basic template that can be used to build 512KB firmware application to execute in internal RAM (Application as part of the FSBL).
5
-
Subproject ExtMemLoader is a used to generate a binary library capable of downloading an application to external memory.
5
+
The ExtMemLoader subproject is a flash algorithm that generates a binary library capable of programming an application into external memory.
6
6
7
7
## Introduction
8
8
9
-
The boot ROM code uses the 512KB area in the AXI SRAM2 to store the FSBL image, Once the clock is set, the green LED (GPIO PO.01) toggles in an infinite loop with a 0.5 second period.
10
-
11
-
## Steps to Configure, Build, Load, and Debug using the Basic Template csolution project
12
-
13
-
> **Note:**
14
-
> **Installed packs and extensions:**
15
-
> - Keil.STM32N6xx_DFP.1.0.1-dev3
16
-
> - Keil.STM32N6570-DK_BSP.1.0.0-dev
17
-
> - Arm CMSIS Debugger 1.3.0
18
-
> - Arm CMSIS Solution 1.62.2
19
-
> - Cbridge27.exe
20
-
> - STM32CubeMX.6.16.1
21
-
> - STM32Cube_FW_U0_V1.3.0
22
-
> - STM32_SigningTool_CLI_V2.20.0
23
-
> - STM32CubeProgrammer_V2.18.0
24
-
9
+
The bootROM copies FSBL image (512KB) from external Flash (Octo SPI Flash Memory) to the internal RAM (AXI SRAM2) and starts executing it.
10
+
In the application, once the clock is configured, the green LED (GPIO PO.01) toggles in an infinite loop with a 0.5 second period.
11
+
12
+
## Steps to Configure, Build, Load and Debug using the Basic Template csolution project
13
+
14
+
> **Note:**
15
+
>
16
+
>-**Required Packs:**
17
+
> - Keil.STM32N6xx_DFP.1.1.0
18
+
> - Keil.STM32N6570-DK_BSP.1.0.0
19
+
>-**Required CMSIS Tools and Extensions:**
20
+
> - Arm CMSIS Solution 1.64.1 (todo:check latest cbridge.exe)
- Project tab: Ensure the **FSBL** and **ExtMemLoader**checkbox are selected
41
-
-Core Generator tab: Check that **Copy only necessary library files**are selected
42
+
- Project tab: Ensure the **FSBL** and **ExtMemLoader**checkboxes are selected and **Appli** checkbox is unselected
43
+
-Code Generator tab: Check that **Copy only necessary library files**is selected
42
44
43
-
### Navigate to Pinout & Configuration:
45
+
### Navigate to Pinout & Configuration
44
46
45
-
#### System core:
47
+
#### System core
46
48
47
-
- CORTEX_M55M_FSBL: Enable CPU ICache and DCache
48
-
- GPIO: Select PO1 pin as **GPIO_output**:
49
+
- CORTEX_M55M_FSBL: Enable **CPU ICache** and **CPU DCache**
50
+
- GPIO: Select PO1 pin as **GPIO_output** and configure PO1 configuration:
49
51
- Pin Context Assignement: **First State Booot Loader**
50
-
- GPIO output level: High
51
-
- Add user label: `LED1_green`
52
+
- GPIO output level: Low
53
+
- Add user label: `LD1_green`
52
54
53
-
#### Connectivity:
55
+
#### Connectivity
54
56
55
-
- SDMMC2: Unselect **First Stage Boot Loader**(disable this peripheral, because have configuration issue)
56
-
- XSPI1: Unselect **First Stage Boot Loader**(disable this peripheral, because have partly conflict with PO1 `LED1_green`)
57
-
- XSPI2: Check that **First Stage Boot Loader** and **External Memory Loader**is selected under Runtime contexts and modify following parameter settings:
57
+
- SDMMC2: Unselect **First Stage Boot Loader**checkbox to disable this peripheral (To avoid configuration issues)
58
+
- XSPI1: Unselect **First Stage Boot Loader**checkbox to disable this peripheral (To avoid configuration issues with PO1 `LD1_green`)
59
+
- XSPI2: Check that **First Stage Boot Loader** and **External Memory Loader**are selected under Runtime contexts and modify following parameter settings:
> **Note:** Note: The OTP configuration for flash source selection is configurable via BOOTROM_CONFIG2 - OTP_WORD11 using **STM32CubeProgrammer**. For more information, please check [UM3234](https://www.st.com/resource/en/user_manual/um3234-how-to-proceed-with-boot-rom-on-stm32n6-mcus-stmicroelectronics.pdf)
111
+
112
+
> **Note:** The OTP configuration for flash source selection is configurable via fuses in BOOTROM_CONFIG_2[8:5], OTP_WORD11 using **STM32CubeProgrammer**. Requires the **default** boot configuration to have sNOR device (connected to XSPIM_P2) attached boot. For more information, please check [UM3234](https://www.st.com/resource/en/user_manual/um3234-how-to-proceed-with-boot-rom-on-stm32n6-mcus-stmicroelectronics.pdf)
106
113
---
107
114
108
115
### STM32CubeMX/STM32N657X0HxQ/FSBL.cgen.yml
109
116
110
-
- #### Comment following redundant files (temporarily issue with cmsis toolbox extension)
### In Activity bar under CMSIS click **Manage Solution Settings**
175
191
176
-
- Select **build_ExtMemLoader** Target Set and click **Build solution**
192
+
- Select **ExtMemLoader** Target Set and click **Build solution**
177
193
-**ExtMemLoader** project should successfully build to have configured flash algorithm (check in root folder if ExtMemLoader.axf file appears)
178
194
179
-
- Continue with select **build_load_FSBL** Target Set and click **Save** then click **Build solution**
180
-
- FSBL project should successfully build to out folder
181
-
- Open the CubeMX.csolution.yml file, **uncomment** the following entries, and **save** the file
182
-
183
-
```yaml
184
-
# - image: $OutDir(FSBL)$/FSBL-trusted.bin
185
-
# load-offset: 0x70000000
186
-
# load: image
187
-
```
188
-
- In STM32N6570-DK board: Set the boot mode in **development mode** (BOOT1 switch position is 1-3) and reset board
195
+
- Continue with select **FSBL** Target Set
196
+
- Ensure **ST-Link@pyOCD** Debug Adapter is selected and **Update launch.json and tasks.json** checkbox is selected and click **Save** then click **Build solution**
197
+
- FSBL project should successfully build into out folder
198
+
- On STM32N6570-DK board: Set the boot mode in **development mode** (BOOT1 switch position is 1-3) and reset board
189
199
- To flash device click **Views and More Actions** and click **Load application to target**
190
-
-In STM32N6570-DK board: Set the boot mode in **flash mode** (BOOT1 switch position is 1-2) and reset board
200
+
-On STM32N6570-DK board: Set the boot mode in **flash mode** (BOOT1 switch position is 1-2) and reset board
191
201
- Green led should blink as we configured previous (in FSBL/Src/main.c)
192
202
193
-
- To debug application, select **debug_FSBL** Target Set and click **Save**
203
+
- To debug application in:
194
204
-**FLASH MODE:**
195
-
- In STM32N6570-DK board: Set the boot mode in **flash mode** (BOOT1 switch position is 1-2) and reset board
205
+
- On STM32N6570-DK board: Set the boot mode in **flash mode** (BOOT1 switch position is 1-2) and reset board
206
+
207
+
- Open .vscode\launch.json file and add following modification to the configuration named "STLink@pyOCD (launch)" under **initCommands** and **customResetCommands** commands:
208
+
- Modify the command name from **tbreak main** to **thbreak main**
196
209
- Click **Load & Debug application** button and now program should wait in main function to start debug
197
210
- With Continue (F5) button green led should blink in flash mode
198
211
199
212
-**DEVELOPMENT MODE:**
200
-
- In STM32N6570-DK board: Set the boot mode in **development mode** (BOOT1 switch position is 1-3) and reset board
201
-
- Open .vscode\launch.json and add commands in initCommands after **monitor reset halt**:
213
+
- On STM32N6570-DK board: Set the boot mode in **development mode** (BOOT1 switch position is 1-3) and reset board
214
+
- Open .vscode\launch.json file and add following modification to the configuration named "STLink@pyOCD (launch)"
0 commit comments