anjiahao1 opened a new pull request, #9962:
URL: https://github.com/apache/nuttx/pull/9962

   We can use the driver in nuttx to download
   files with debugger
   
   ## Summary
   open flash loader
   ## Impact
   If the nuttx driver supports it, we can flash any firmware through 
openflashloader
   ## Testing
   stm32f429i-disco with internal flash
   
   
   ## CONFIG
   ```
   CONFIG_DISABLE_IDLE_LOOP=y
   CONFIG_SYSTEM_OFLOADER=y
   CONFIG_SYSTEM_OFLOADER_TABLE="/dev/flash,0x08000000,0x20000",0
   ```
   
   ## Usage
   1. Compile elf firmware with ofloader and corresponding firmware driver.
   2. Configure the corresponding jlink xml file,etc 
`~/.config/SEGGER/JLinkDevices/vela/JLinkDevices.xml`
   ```
   <Database>
       <Device>
           <ChipInfo Vendor="STM32NUTTX" Name="NuttX" 
Core="JLINK_CORE_CORTEX_M4" WorkRAMAddr="0x20000000" WorkRAMSize="0x10000000" />
           <FlashBankInfo Name="Storage" BaseAddr="0x00000000" 
MaxSize="0xffffffff" Loader="/home/ajh/work/vela_all/nuttx/nuttx" 
LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
       </Device>
   </Database>
   ```
   Loader is The compiled elf firmware.
   
   3. use `JLinkExe -if SWD -speed 4000 -device STM32NUTTX` ,then `loadbin 
/home/ajh/work/nuttx.bin 0x08000000` ,we can flash `nuttx.bin` to /dev/flash
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to