I am using VisualDSP++ and would like to load my program to flash on my EZ-KIT then use it to boot and run my board in standalone mode?
In order to program the flash on your board you must first create a loader (.ldr) file for your project.
Creating a Loader (.ldr) file
- Connect to your Target board with VisualDSP++.
- Open the project you wish to flash to the board.
- Click on the "Project" menu item in VisualDSP++ and select "Project Options...".
- Select "Project" in the left window and select "Loader file" from the ‘Type’ drop down on the right.
- Select the "Project : Load : Options" from the left hand window.
- On the right, under "Boot Mode", for Parallel Flash select "Flash/PROM", and for Serial Flash select "SPI" (Note: you must select "SPI PROM" for serial flash on SHARC). Other "Boot Mode" options are available and vary from processor to processor - Have a look at the Evaluation System Manual for the EZ-KIT you are using for further details.
- Under "Boot Format", if you are using Blackfin select from "Intel hex", “ASCII”, “Include”, “Binary”. For SHARC you also have the addition of "S1", "S2", or "S3" Boot Formats.
- The "Output Width" should be "16-bit" for parallel flash and "8-bit" for serial flash. For SHARC you will also have the option of a “32-bit” bus width.
- The "Use default start address" checkbox should be checked – (The Start Address should only ever be changed if you want the code to be loaded to an address other than the default start address)
- The "Verbose" option can be checked for details output from the elfloader.
- If you are using external memory you must select an appropriate "Initialization file" from the following location:
- Both the "Output file" and "Additional options" should typically be left blank, however:-
- If you wish to give your (.ldr) file a name other than the default [which is the same as the executable name but with an ldr extension] then please enter it into the "Output file" field.
- Any additional loader command-line switches required to modify the loading process should be entered into the "Additional options" field. For a complete list of switches refer to the VisualDSP++ Loader and Utilities Manual.
- After all the options are set up select "OK".
- Click the "Project" menu item and select "Rebuild Project" to build the loader file.
- The loader file should be available in your projects output folder.
Downloading the Loader (.ldr) file to the EZ-KIT
The next step is to download the loader file to the board which is accomplished with the VisualDSP++ Flash Programmer:-
- Using your current session, click on the "Tools" menu item in VisualDSP and select "Flash Programmer..." to load the “Flash Programmer”.
- On the "Driver" tab of the programmer, click the "Browse..." button to browse for the driver file for the flash on your EZ-KIT.
Note:- Drivers are available in the ‘Flash Programmer’ directory of the EZ-Kit you are using. For example:
<install_path>\<processor_family>examples\<processor_EZ KIT Lite>\Flash Programmer\
- Select the (.dxe) file you require and click "Load Driver".
- If successful you will receive a message in the bottom right of the screen otherwise the message that the Loading of the driver has failed.
- Next Click on the "Programming..." tab.
- "Pre-program erase options" should be "Erase affected".
- Select the "File format"
- Click on the "Browse..." button under "Data file" and select the Loader (.ldr) file you just created in the previous section and click "Program".
- During Programming you can monitor the progress with the status bar.
- Once complete and if successful you will receive a “Success: Program Complete” message
- When complete you can close the Flash Programmer window.
Booting the EZ-KIT from Flash Memory
The last step involves configuring your board to boot from flash:-
- First, close VisualDSP++.
- Now configure the ‘Boot Mode’ Switch on your EZ-KIT to boot from flash memory.
- Refer to the "Jumper and Switch Settings" of the appropriate Evaluation System Manual for details on correctly setting the 'Boot Mode'.
- Evaluation System Manuals are available from VisualDSP++ Help or online at the following location:
Blackfin - http://www.analog.com/blackfin/manuals
- Once the appropriate Boot Mode is set simply reset your board to boot it from flash.
Note: If you are using an EZ-KIT connected via the Debug Agent there is an alternate method for resetting the board and performing a boot without having to exit VisualDSP++:-
- Go to the "Settings" menu in VisualDSP++ and choose "Boot Load", which will cause the board to boot from flash and run.
- You can halt the processor at any time by clicking on the "Debug:Halt" menu item.
- You can then load the symbols of your application using the "File:Load Symbols" menu item and selecting the dxe file. This will not change the state of the processor from where it was halted, but it will correlate debug information to what was booted from the flash.
For detailed examples on how to build a bootable loader file for flash memory please refer to the readmet.txt file of the 'Power_On_Self_test' project of the EZ-KIT you are using. These are located in: <install_path>\<processor_family>examples\<processor_EZ KIT Lite>
You will also find information on booting from flash memory in the attached file 'Booting from FLASH readme.txt which is available as part of the VisualDSP++ installation and can be found here: <install_path>\<processor_family>examples\
Related Application Notes
More specific details on booting from Flash can be found in the following EE-Notes. These are available from http://www.analog.com/ee-notes
EE-336: Putting ADSP-BF54x Blackfin Processor Booting into Practice
EE-314: Booting the ADSP-BF561 Blackfin Processor
EE-311: VisualDSP++ Flash Programmer API for Blackfin Processors.
EE-240: ADSP-BF533 Blackfin Booting Process
EE-239: Running Programs from Flash on ADSP-BF533 Blackfin Processors.
EE-345: Boot Kernel Customization and Firmware Upgradeability on SHARC Processors
EE-280: In-Circuit Flash Programming on ADSP-2106x SHARC Processors.
EE-223: In-Circuit Flash Programming on SHARC Processors.
EE-231: In-Circuit Programming of an SPI Flash with SHARC Processors.
EE-177: SHARC SPI Slave Booting