Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 26 Next »

It is assumed that the reader has working knowledge of the product being used and its features.

1. FlashtoolGUI Help

The FlashtoolGUI application provides the user with the ability to create, modify, and write flash content Aptina Imaging System-on-Chip (SOC) devices that support SPI flash memory.

When you start FlashTool, if a device is attached,  it will detect it and then load the appropriate SDAT file(s). If no device is attached, you'll be able to manually load the appropriate SDAT file(s).

Here's a link to a "Tech Note" on NVM Record sizes.

1.1 Sensor Info Tab

The Sensor Info tab is presented first. This dialog lets you load the appropriate SDAT file(s) for the device you'll be working on.

It also presents some operational notes.



Sensor Data File (.xsdat or .sdat)

The sensor data file is used by the application to convert the symbolic names of sensor registers and variables to numeric addresses.

1.2 Configuration Tab

The Configuration tab is where you load the configuration file (.fcfg), or FCFG file. It is also enables navigation to the various Table types via the "Select Table" Radio buttons.

1.2.1 Configuration File

The flashtoolgui uses a text based file which describes the structure and content of the flash image. When the content of the flash has been specified, it can be saved into a configuration file through the Save and Program Page. A previously saved configuration file can be loaded into the tool in order to update its contents.
Although FlashTool has the ability to add Comments when creating and editing records, the user may manually add comments to any area of the configuration file; simply start each line with "#@" to indicate a user comment.

There are per-product sample files located in the folder "flashtool" under the installation folder.

For a detailed description of the syntax and structure of the configuration file refer to the document SPI Flash Programming Tool User Guide.
One thing to note is that not all sections are valid for all products, and they must be placed in a specific order;

Most ProductsAP0101 / AP0201/2 Only
INIT_TABLEINIT_TABLE
CALIBRATION_INIT_TABLECALIBRATION_INIT_TABLE
PATCH_INIT_TABLEPATCH_INIT_TABLE
DEWARP_INIT_TABLE or STE_INIT_TABLEPATCH_TOC
OVERLAY_INIT_TABLECOMMAND_SEQ_TOC
PATCH_TOC 
OVERLAY_BITMAP_TOC 
OVERLAY_STRING_TOC 
COMMAND_SEQ_TOC  
DEWARP_CONFIG_TOC or STE_CONFIG_TOC 
OVERLAY_COLORLUT_TOC 
OVERLAY_USERCHAR_TOC 

1.2.2 Tables

The "Select Table" section is used to select the Table that you want to modify.
Note: Distortion and Graphics Overlay do not apply to AP0101 and AP0201/2 products.

  • Global; contains register and variable settings that don't apply to the other specific areas (such as Patch or Calibration).
  • Patch; contains patches (some recommended, some optional on per-feature basis) to be applied.
  • Calibration; contains settings that are specific to calibration.
  • Distortion Correct; settings for devices that support distortion correction (also know as "Dewarp").
  • Graphics Overlay; settings to define overlays available to the product.
  • Command Sequence; settings where specific Host Commands can be defined.Vendor Specific; allows definition of custom records types.

1.2.3 General Table Controls

Each table contains a set of general controls to manipulate records.
Note: "Insert From Fcfg" doesn't apply to "Command Sequence" nor "Vendor Specific".

1.2.3.1 Convert INI

This dialog lets you load INI file Preset data from an INI file, or copy/paste the info.  When using "Load Text", you must include the preset name as the first line.

Once loaded, select "Convert" to convert to records, and then "Add and Close" to add the records.

1.2.3.2 Add New Record

This dialog lets you create new records of various types. Select the Type, and the "Usage" will appear in the upper dialog.

You can optionally add comments in the "Record Comments" section, but you add the record data in the "Record parameters"  section.
Note: selecting "Command" record type opens an additional pull-down dialog for you to select the actual command.

1.2.3.3 Insert from Fcfg

This dialog will add the records as defined in a .fcfg file.  Note that the entire .fcfg file contents will be added as there is no way for FlashTool to determine which record types would apple to the given Table.

1.2.3.4 Edit Record and Delete Record

Self-explanatory really; edit or delete existing records.  Note: no warning is given when selecting "Delete Record", and there is no "Undo" function.

 1.2.4 Global Table

This dialog is used to define register and variable settings that don't apply to the other specific areas (such as Patch or Calibration).

1.2.5 Patch Table

In this table specify the list of firmware patches that need to be included in the flash image. Please note that when you locate a .bin file which includes the patch, the tool will also look for a file with a similar name ending with the extension .info. The .info file has to be the correct information file for the intended patch file.

Select the Command "Load_Patch" to create the record and use the associated index from the "Patch Table", and then add the associated patch to match that record.

1.2.6 Calibration Table

This table contains the calibration-specific settings for the device.

1.2.7 Distortion Correction Table

This table contains records for defining multiple Lens Distortion Correction settings. This will contain with DeWarp or STE Command records, and associated Lens Distortion Correction Table entries (either from .bin or .xml files) as created by either the Distortion Correction or STE plugins.

Each of the assets that have been included in their corresponding tables will be referenced using their index number. The indexes start with 0. A host command which makes use of one of these assets will use as part of its parameter list a reference to the asset index in the appropriate table

It is assumed that the reader of this document has understanding of the Lens Distortion features and controls of the product they are working on.

1.2.8 Graphics Overlay

This table lets you define the records for load of the various types of overlays; Bitmaps, Strings, and Userchar.

  • Bitmap; use this table to specify the list of graphics overlay bitmap file paths that need to be included in the flash image. The bitmap files have to be in Aptina RLE format, and they can be created using DevWare or makeover.exe.
  • String; use this table to specify the list of graphics overlay string file paths that need to be included in the flash image. The string files have to be in binary format. They can be created using DevWare.
  • Userchar; use this table to specify binary file containing the "Userchar" settings.

It is assumed that the reader of this document has understanding of the Overlay features and controls of the product they are working on.

1.2.9 Command Sequence

This table lets you define individual sequences of commands. Start by add a new Sequence in the "Sequences" dialog.
Select it, and then added the individual commands to be contained in that sequence via the "Add New Record" button.

Navigate between sequences via the "Sequences" table.

1.2.10 Vendor Specific

1.3.1 How to create an initialization sequence

How to create an initialization sequence

  1. Select the table: select one of the tables Global, Patch, Calibration, Distortion Correction or Graphics Overlay.
  2. Create records: records can be created either directly by pressing the button New, or by importing DevWare presets using the Import button.
    1. Import


The import dialog allows the user to create flash records out of DevWare presets. Importing can be done either from an INI file or by directly typing or pasting text into the dialog window using the Load Text option.
If section presets are detected, the content of the preset can be viewed in the Preset Contents window. Some notes on using a text file with a Preset:

  • The preset must have a standard name in brackets; for example, "[Timing settings]".
  • Only lines that can be converted into flash records will be displayed; other lines are ignored.
  • Lines will only be processed until the next preset name is found, or end-of-file is reached.

Pressing the Convert button will cause the tool to display the converted records. Until you press the Add and Close button, these records will not be added to the flash content.
The tool attempts to group the individual preset lines into a single flash record, in order to reduce the overhead associated with the record structure. The order of preset lines is maintained during the conversion process.

During the conversion process the above warning message may be displayed. This warning indicates that that records that perform operations on bitfields were detected. The warning does not indicate a problem, but only the fact that the syntax for specifying the value to be written is different between the DevWare presets and the flash tool. This is only important if you are trying to verify the conversion process and notice a change in the values used in the bitfield records.

    1. New Record


Select the type of record. You may add comments in the comments section, and the parameter list in the Record Parameters section, if applicable. The top most section will show some helpful hints about the selected record type, and any additional information.
For records which require numeric parameters, you may enter a sequence of parameters as necessary with a space or a comma delimiter between them.
The Test button allows you to verify the record in terms of consistency of the parameter list with the requirements for the record. If an incorrec number of parameters is provided for the record you will get an error.
When finished press the Finish button in order to insert the new record into the selected table.
Once the records of a table have been created it is possible to change their relative location by uding the Up and Down arrow buttons. It is also possible to edit or delete records as necessary.
In order to view the content of a record, select it. Its contents will be displayed inside the window Details of Selected Record. The record content will be displayed in the format of the configuration file which the flash tool uses to store and restore its contents.
Comments that may have been entered for the record will appear at the top of the record details where each comment line starts with the symbols #@.
Vendor-Specific Records in Initialization Tables
The flash contents specification defines the VENDOR_SPECIFIC_00 to VENDOR_SPECIFIC_15 record types, which may contain any arbitrary data of your choosing. When creating a vendor-specific record, select the sub-type of the record from 00 to 15, and enter the data in the Parameters window as a list of byte values.
Unfortunately, as of this writing, the firmware on the Aptina SOC chips does not recognize the vendor-specific record type, and triggers an error condition if it encounters one. It is possible to include vendor-specific records in an initialization table if the vendor-specific records are preceded by a Command record

  • Config_Command_Seq_Processor 0

and followed by the command record

  • Config_Command_Seq_Processor 1

That will turn off error checking and allow the firmware to skip over the vendor-specific records without generating an error condition. The Flash Tool does not automatically generate these Command records, you have to enter them.
Vendor-Specific Records Outside of Tables
It is also possible to put vendor-specific records at user-defined addresses in the flash memory, outside of any tables. To do this, select the Vendor-Specific button at the lower left of the window, and add the records to the list.
Note that the first parameter of an out-of-table vendor-specific record is the address where it is to be placed in flash. This is different from an in-table record where the only parameters are the data. The address must be greater than 0x00000030 so it does not interfere with the main Table of Contents. The Flash Tool will make sure the init tables and other flash data do not overlap the out-of-table records. If you create more than one vendor-specific record, you must ensure that they do not overlap.

1.3 Generate Image and Program Tab

This page allows the user to save the current flash image configuration, produce a binary image for the current configuration, or program the flash with a previousely created flash image.

1.1.3 Memory Type

Memory Type
This option allows the user to specify the type of memory (flash or EEPROM) that will be used. This is for SOC sensors that can support various types of memory, e.g. MT9V129.


1.1.4 Flash Memory Size

Flash Memory Size
Use this option in order to specify the size of the flash device in bytes. When creating the flash binary image, the tool will verify that the memory requirements for the current configuration does not exceed the flash size.


1.1.5 Maximum Image Size

Maximum Image Size
This option allows the user to specify the size of the image that the tool will generate. This option is useful when space needs to be reserved on the flash device for purposes other than the image content.


1.1.6 Sensor Revision

Sensor Revision
When a DEMO camera is connected to the PC that runs the flashtoolgui, this field is automatically determined by the application. It specifies the revision of the sensor that is connected. The user can override the automatically determined revision in order to force the tool to generate flash records that comply with the desired revision.


1.1.7 Enable Spaces Mode

Enable Spaces Mode
Adds extra Blank Records in the Table of Contents, Init Table, and all COMMAND_SEQ_V1. This allows extensibility after initial programming, but is a change from the original format. Please refer to Encoding Specification Section 6.4 for details. The mode status is displayed on the main dialog screen (top-center).If this mode is enabled, a warning dialog will appear when the "Generate Flash Image" button is pressed, with the option to cancel the operation.Note: this mode is not applied to the configuration file.



Save Configuration

Select the button to save the current configuration to a file (.cfg). The file can be opened later to add records or make changes.


Generate Image

Image Type - Choose Base Image to create a complete image, which includes all tables and assets. This option is necessary in order to produce a valid initial flash image. Choose Image Extension in order to produce a binary image of the assets only. This includes the patches, graphics overlay bitmaps and strings, and distortion correction configurations. An extension file is needed in order to add assets into an existing base image.
Generate Flash Image - Select to generate a binary image (.bin) of the flash memory configuration. This image can be written into flash using this or other tools. Note; if Spaces Mode is enabled (see "Global Settings/Enable Spaces Mode"), a warning dialog will appear when the "Generate Flash Image" button is pressed, with the option to cancel the operation


Program Flash

Start Address - Specify the flash address to beging writing the image to.
Erase Before Writing - The flash device content will be erased prior to programming the new content into it. Uncheck to suppress erasing the flash device content, this may be desirable if the area in the address space of the device has been erased before.
Program Image into Flash - Select the button to write an existing image to flash.
In order to perform this operation, a Demo2/Demo2X camera with the correct headboard and a supported flash device must be connected to your computer.


Read Image from Flash (Aptina Internal only)

Select the button to read the flash memory image and save it to a binary (.bin) file.


Generate Configuration from Image (Aptina Internal only)

Select the button to convert a binary (.bin) file into a Configuration (.fcfg) file.

1.4.1 Save Configuration

Save Configuration

Select the button to save the current configuration to a file (.cfg). The file can be opened later to add records or make changes.


1.4.2 Generate Image

Generate Image

Image Type - Choose Base Image to create a complete image, which includes all tables and assets. This option is necessary in order to produce a valid initial flash image. Choose Image Extension in order to produce a binary image of the assets only. This includes the patches, graphics overlay bitmaps and strings, and distortion correction configurations. An extension file is needed in order to add assets into an existing base image.
Generate Flash Image - Select to generate a binary image (.bin) of the flash memory configuration. This image can be written into flash using this or other tools. Note; if Spaces Mode is enabled (see "Global Settings/Enable Spaces Mode"), a warning dialog will appear when the "Generate Flash Image" button is pressed, with the option to cancel the operation


1.4.3 Program Flash

Program Flash

Start Address - Specify the flash address to begin writing the image to.
Erase Before Writing - The flash device content will be erased prior to programming the new content into it. Uncheck to suppress erasing the flash device content, this may be desirable if the area in the address space of the device has been erased before.
Program Image into Flash - Select the button to write an existing image to flash.
In order to perform this operation, a Demo2/Demo2X camera with the correct headboard and a supported flash device must be connected to your computer.


1.4.4 Read Image from Flash

Read Image from Flash (Aptina Internal only)

Select the button to read the flash memory image and save it to a binary (.bin) file.


1.4.5 Generate Configuration from Image

Generate Configuration from Image (Aptina Internal only)

Select the "Convert .bin to .fcfg File" button to convert a binary (.bin) file into a Configuration (.fcfg) file.

Select the "Convert .fcfg to DevWare .ini File" button to convert a Configuration (.fcfg) file into DevWare (.ini) file.

Note: The fcfg to ini conversion is for debugging purpose only. The programming structure between fcfg and ini file is different. Not all Host command is supported by flashtool. User should use the converted ini file together with DevWare HCI plugin to get the correct results.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.