Hello everyone , I'm ruffian Heng , It's a serious technical ruffian . What I bring you today is the open source project of ruffian Heng RT-UFL.
Ruffian Heng in the past two years i.MXRT In the process of customer project support , One of the fairly high-frequency problems encountered is making i.MXRT Download algorithm . We know i.MXRT No built-in nonvolatile memory , Generally, a piece of external memory is used to load and start , The most common is through FlexSPI Peripherals, peripherals, serial NOR Flash, Hang up NOR Flash We can start it offline , You can also debug online , And online debugging is bound to be inseparable from the download algorithm .
Because it's an external connection Flash, So the download algorithm needs to be based on Flash Depending on the connection and model of , This needs to make a matching download algorithm according to the actual situation of the client board . Download algorithm for those who understand how it works , It's not hard to make one , But it's not easy for people who don't know . From our i.MXRT Original factory technical support angle , We don't want to do it over and over again , Based on this , PI Ziheng launched an open source project , Name it RT-UFL, Is to design a super download algorithm . This project is still in the research and development stage , If you have better suggestions and ideas , Welcome to leave a message at the bottom of the article .
Project address ：https://github.com/JayHeng/RT-UFL
One 、 brief introduction
RT-UFL It's a platform wide application i.MXRT Common to Flash Download Algorithm Project , The ultimate goal of the project is to achieve a .FLM The document applies to all i.MXRT Development board , No matter which one it's connected to Flash model .
RT-UFL Mainly to solve the following seven pain points ：
1. every last i.MXRT Each model requires a separate download algorithm file . 2. The same i.MXRT Models with different attributes Flash Different algorithm files are also required . 3. The same i.MXRT Model with the same features Flash but Flash Factory settings are different （ Yes no SFDP、QE Default status light ） Different algorithm files are also required . 4. Flash Connect to i.MXRT Different FlexSPI Different algorithm files may also be required on pins . 5. If there is a flaw in the public design of the download algorithm , It needs to be updated as a whole i.MXRT Download algorithm corresponding to the model . 6. For the release of the download algorithm , There is no unified version management . 7. In the process of mass production , If replaced Flash model , The algorithm file needs to be replaced accordingly , It's a little cumbersome for the factory process .
RT-UFL There are three layers in design ：
- At the bottom is Driver layer ： namely Low-level drive , about i.MXRT Come on , Namely FlexSPI Module driver .
- In the middle is Adapter layer ： This layer is the core , It's all i.MXRT platform 、 whole Flash Adaptive support for models .
- The top layer is API layer ： This belongs to the download algorithm template , In fact, the integrated development environment (Keil、JLink) To determine the , Non modifiable .
Two 、 characteristic
In order to make RT-UFL Become a super download algorithm , It should contain at least eight features as follows ：
1. Can run at all i.MXRT Under the model . 2. It can be used as i.MXRT All types of devices that can be started Flash. 3. You can erase it and connect it to i.MXRT Can start FleXSPI On the pin Flash. 4. Can automatically identify connected Flash type (QuadSPI, Octal-SPI, Hyperbus). 5. Can automatically detect Flash Yes no SFDP And its version . 6. It can be supported without SFDP Tabular Flash. 7. Automatic identification Flash Default QE State and turn on QE. 8. Can output some valid Flash Information for subsequent start-up .
Records of ruffian Henghui RT-UFL All difficulties and solutions in the project development process , Share with you the mystery behind the design of download algorithm , Please look forward to the following articles ！
Welcome to subscribe to
WeChat search " Ruffian scale embedded " Or scan the QR code below , You can watch it for the first time on your mobile phone .