Debug configuration and Firmware download

Prerequisite

Flash programming algorithm file should be copied to IDE and Debugger folders before trying to debug or download firmware. Please following these steps:

  1. Copy file [SDK Dir]/tools/prog_tool_v2/JLinkDevices.xml and folder [SDK Dir]/tools/prog_tool_v2/BlueX/ to folder [JLink Dir].
  2. (For Keil Only)Copy files [SDK Dir]/tools/prog_tool_v2/BlueX/* to folder [Keil Dir]/ARM/Flash/.

Keil Configuration

  1. Power up the development board. Connect JLink to the board.
  2. Open Keil project,Click Project->Options for Target ‘*’->Debug, select Use “J-LINK/J-TRACE Cortex”. Deselect “Load Application at Startup”.
  3. Then click Settings->Flash Download. Select “Erase Sectors”, “Program” and “Verify”. Set “RAM for Algorithm Start: 0x100000, Size: 0x1000”
  4. Click Add, Select “APOLLO_00_1V8” or “APOLLO_00_3V3” according to your Flash voltage.
  5. OK.
../_images/keil_configuration.png ../_images/keil_configuration_2.png

Eclipse Configuration

  1. Open Eclipse, import the project. Build a target. Click Run->Debug Configurations.

  2. Double click GDB SEGGER J-Link Debugging to create a debug configuration.

  3. In the page Main, click Search Project to select the elf file built just now.

  4. In the page Debugger, set Device name to “APOLLO_00_1V8” or “APOLLO_00_3V3”. Set Other options to “-singlerun -strict -timeout 0 -jlinkscriptfile JLinkSettings.JLinkScript”.

    ../_images/eclipse_debug_configuration_1.png
  5. In the page Startup, select “Initial Reset and Halt”, “Enable flash breakpoints”, “Load symbols: Use project binary”, “Load executable: Use project binary”, “Pre-run/Restart reset”. Deselect “RAM application(reload after each reset/restart”, “Set breakpoint at: main”, “Continue”.

    ../_images/eclipse_debug_configuration_2.png
  6. Apply.

Firware download by J-Flash

  1. Open J-Flash. Create a new project.Select “BlueX Apollo_00_1V8” or “BlueX Apollo_00_3V3” as Target Device. Click OK.
  2. Press F3 to Erase all Sectors or F4 to Erase Chip.
  3. Open the hex file. Press F7 to automatically program and verify.
../_images/firmware_download_by_jflash.png