DolphinV4 API  1.6.1.0
Setting up Keil uVision for DolphinV4 Suite DolphinV4APIConfigurator and EOPX2

This chapter describes how to integrate DolphinV4 Suite DolphinV4APIConfigurator and EOPX2 into Keil uVision effectively.
Three basic adjustments are required:

  • setup Keil uVision to start DolphinV4 Suite DolphinV4APIConfigurator passing the project folder as argument
  • setup the uVision project to execute automatically the EOPX2 postbuild script
  • setup the uVision project for EOPX2 to download the .hex file into the chip

Setting up Keil uVision to effectively work with DolphinV4 Suite DolphinV4APIConfigurator

DolphinV4 Suite DolphinV4APIConfigurator is a application GUI that helps you to generate C and assembler code. The C code, generated and packed into the EO3100I_CFG.h and EO3100I_CFG.c files, is in charge of the chip peripheral initialisation as well as API module and I/O configuration. The assembler code generated by DolphinV4 Suite DolphinV4APIConfigurator is stored in the STARTUP.asm, which is in charge of the chip start up sequence.

The DolphinV4 Suite DolphinV4APIConfigurator configuration will be stored in the Keil project folder (\Profiles) for a later use.

Note:
If you created a new project using the copy_template.cmd script (under \ directory) your Keil project already contains the set up described in the next lines

Do the following steps to start the DolphinV4 Suite DolphinV4APIConfigurator GUI within the Keil uVision environment:

  • Select the Tools -> Customize Tools menu
    keil_customize.PNG
  • Add DolphinV4 Suite DolphinV4APIConfigurator to the Tools menu, as shown on following picture:

    keil_tools.png
  • DolphinV4 Suite DolphinV4APIConfigurator is added to your Tools menu.
  • Start the DolphinV4 Suite DolphinV4APIConfigurator from the Tools menu: Tools -> DolphinV4APIConfigurator.
  • Notice that the Profiles combo box includes only the default Template profile. Also the Project directory in Generate EO3100I_CFG page is already set to your Keil project directory.

    Setting Post-build tools


    In order to use the EOPX2 postbuild script tool the following settings have to be set in Keil uVision:

    • Options For Target Program After Build
    • Add postbuild.txt to the Keil project

After the Build/Rebuild process was successful, the EOPX2 post-build tools are executed automatically. The EOPX2 script performs these postbuild tasks.

  • generates the CFG area .hex file after reading the information from the postbuild.txt file
  • calculates the bist CRC
  • patches the ouput .hex file in order to locate the code for SWI area.
keil_postbuild.png

Run #1:
EOPX2.exe -fprg "#H" -fcfg "$H@H_cfg.hex" -script "$Ppostbuild.txt"

Note:
If the fcfg file does not exist, it will be created.

Creating postbuild script


Add new file "postbuild.txt" to your Keil project as shown on following figure:

keil_script.png

Setting Flash Programming tool

In order to use the EOPX2 Programmer to download hex files to your chip after compiling, following has to be set in Keil uVision:

  • Options For Target Tool for Flash Programming
keil_eop.png

Command:
eopx2.exe

Arguments:
-fprg "#H" -fcfg "$H@H_cfg.hex" -write

uVision replaces "#H" by the output .hex file path (C:\MyProject\Output\sample.hex)
"$H@H_cfg.hex" is replaced by configuration area file path (C:\MyProject\Output\sample_cfg.hex)

Optionally:
If you use the the setBist with [first_data_obj] parameter, the -fmap switch needs to be specified.

-fmap "$H@H.m51" -write

Note:
For more information about the postbuild commands please read the DolphinV4 Suite\EOPX2 Programmer\Postbuild Tools section (see References).