Download .hex Files to Flash
After .hex files are generated, you need to download these files to flash. Specific steps are provided below:
- Configure Keil flash programming algorithm.
- Copy the GR551x_8MB_Flash.FLM in SDK_Folder\build\binaries\xflash_flm_tools\Keil to Keil_Folder\ARM\Flash.
- Click (Options for Target) on the Keil toolbar, open the Options for Target ‘GR551x_SK’ dialog box, and select Debug tab. Click Settings on the right side of Use: J-LINK/J-TRACE Cortex.
- In the Cortex JLink/JTrace Target Driver Setup window, select Flash Download. In the Download Function pane, you can set the erase type and check optional items: Program, Verify, and Reset and Run. Default configurations of Keil are shown below:
- Click Add to add the GR551x 8MB Flash.FLM to the Programming Algorithm.
- Configure RAM for Algorithm, which defines address space to load and implement the programming algorithm. Enter the start address of RAM in GR551x in the Start input field: 0x30000000. Enter 0xF000 in the Size input field.
- Click OK to save the settings.
- Configure the Configure Flash Menu Command.
- Click (Options for Target) on the Keil toolbar, open the Options for Target ‘GR551x_SK’ dialog box, and select Utilities tab.
- On the Init File bar in the Configure Flash Menu Command pane, click ... to browse and select the download.ini file in SDK_Folder\build\scripts; or copy the download.ini file to the project directory and select it.
By default, Use Target Driver for Flash Programming and Use Debug Driver are checked.
Do not check Update Target before Debugging.
- Download the .hex file.
After completing configuration, click (Download) on the Keil toolbar to download the .hex file to flash. After download is completed, the following results are displayed in the Build Output window of Keil.
During file download, if “No Cortex-M SW Device Found” pops up, it indicates the SoC may be in sleep state currently (the firmware with sleep mode enabled is running), so the .hex file cannot be downloaded to flash. In this case, developers need to press RESET on the GR5515 SK Board and wait for about 1 second; then click (Download) to re-download the file.