![](https://stamssolution.com/wp-content/uploads/2023/04/image-3.png)
STM32H7-External Loader
前言
由於 STM32CubeProgrammer 中,對 Flash 支持的型號有限,只能覆蓋一部分 MCU和 Flash 的型號,無法完全滿足客戶的需求。stm32CubeMX 製作 external Flash loader 的方法。客戶可以根據自己的型號,進行定制化的生成。
這邊使用Discovery STM32H750XB為基準-從CubeIDE+CubeMX建立Eternal Loader 給CubeProgrammer使用
STM32CubeMX設定
建立QSPI配置以及DriverFlashMemory
![](https://stamssolution.com/wp-content/uploads/2023/04/image-4-1024x432.png)
官方有寫好的Code複製到資料夾內
這邊官方有提供範例可以下載,可以再依照範例修改
![](https://stamssolution.com/wp-content/uploads/2023/04/image-5-1024x463.png)
STM32CubeIDE Code修正
quadspi.h的部份將官方提供的資料複製
![](https://stamssolution.com/wp-content/uploads/2023/04/image-7-1024x419.png)
要在CubeProgrammer上面顯示的資訊
![](https://stamssolution.com/wp-content/uploads/2023/04/image-8-1024x398.png)
建立linker.ld檔以及產生出stldr檔
![](https://stamssolution.com/wp-content/uploads/2023/04/image-9-1024x404.png)
根據所使用的FlashMemory做配置
![](https://stamssolution.com/wp-content/uploads/2023/04/image-10-1024x242.png)
Complier產生stldr檔
![](https://stamssolution.com/wp-content/uploads/2023/04/image-11-1024x684.png)
放到STM32CubeProgrammer可以存取到的資料夾內
![](https://stamssolution.com/wp-content/uploads/2023/04/image-12-1024x463.png)