I've loaded my program onto Flash, and now I would like to debug with HPUSB-ICE attached to my BF533 target board. How can I do this?
Debugging an application which boots from Flash on your target board is relatively simple with an EZ-KIT session, as we offer a 'Boot Load' option within VisualDSP++ which will reset the target EZ-KIT so it starts running from Flash, allowing debugging of the application as with debugging an executable (DXE). This option is only for EZ-KIT Lite via Debug Agent platforms, and is available via 'Settings'->'Boot Load'.
If the target is a custom target board, you need to configure the way in which VisualDSP++ connects to your target, to ensure that when VisualDSP++ does connect to your board it does not reset the processor.
There are three different Initial Connection Settings available:
*Halt and Reset: (Default)
This is the standard Connection Setting used for hardware targets in VisualDSP++. Once the IDDE connects to the target it halts the processor, and performs a Core Reset. Note that after a Core Reset, Boot does not start automatically. This setting is not suitable for debugging a target booting from Flash.
This Connection Setting will simply halt the target processor once VisualDSP++ connects to your board. It does not perform and additional actions, so code which has booted from flash can be resumed using the 'Debug'->'Run' command.
*Do Not Disturb:
This Connection Setting will allow VisualDSP++ to establish a connection with your target board, but will perform no further actions. Any code booting from flash will run uninterrupted until any debug commands are issued from the IDDE. This setting is not suitable for BF561 Targets, the VisualDSP++ IDDE will simply issue a halt if this setting is chosen.
Configuring the Platform:
The Initial Connection Settings are configured via the settings for your 'Platform', which can be modified/created within the Configurator. Below is an example for configuring a single BF533 Target:
Further details regarding configuring the platform can be found in the VisualDSP Documentation at 'Help'->'Contents'->'Graphical Environment'->'Emulation Tools'->'VisualDSP++ Configurator'.
Debugging the Application:
Actually debugging the application, albeit possible, is not fully featured. Firstly, 'C' level debugging is not possible, as only assembly level single stepping can be used. Secondly, breakpoints will not be available for code which resides in flas; only hardware breakpoints can be used. Even with these restrictions, it is possible to view memory and registers from flash exactly as though it were internal memory. To view Debug Symbols, you will need to choose 'File'->'Load Symbols', and select your application's DXE file.
Another way to debug the application is to put following instruction at the start of your code or kernel/init code, and create the kernel dxe with this code. This insruction will cause the processor to loop at the start of the application.
[Blackfin]: JUMP 0;
1. build a loader file with the kernel/init code dxe built above.
2, Flash the code onto your board using a flash programmer. Close VisualDSP++.
3. Boot the code by pressing reset on the board.
4. Open the VisualDSP++ with a new session having the processor in HALT state.
5. Open the VisualDSP++ session created above. Load symbols from the kernel project.
In the disassembly window the program counter will be looping at the jump(pc,0) - or jump 0 - instruction. Replace the jump(pc,0) - or jump 0 - with a 'nop' instruction in the disassembly window and you can now step through your kernel/init code/application as required.