I2C SPI USB CAN eSPI Cable Testing View All Videos Quick Start Guides Software Downloads App Notes White Papers User Manuals Knowledge Base Sales Support About Us
Products Blog Sales Support Contact Search
Can I Automate Flashing S-Record Files to a Chip?
Rena Ayeras

Question from the Customer:

I found your Aardvark I2C/SPI Host Adapter and it looks like the best tool for my project. Before I make a purchase, I have some questions:

  • I want to flash an *.srec file (S-record format) on a chip, such as the TI BQ40Z50. Could the Aardvark adapter work with such a device?
  • Can this process be automated? Either a batch script or a C# application would work for me.
Response from Technical Support:

Thanks for your questions! The Aardvark adapter will easily support your project. For flashing a *.srec file, we have two software tools that you could use, and they fulfill the two options you are looking for: a batch script or an application written in C#.

Batching *.srec Files

The Flash Center Software is a free application that you can download. It provides the mechanism to quickly erase, program, and verify I2C and SPI based EEPROM and Flash memory chips. We provide and regularly update an XML parts library with built-in support for EEPROMs and serial Flash chips from major chip manufacturers. Using the Flash Center Software, you easily can load the contents of a Motorola S-Record file – as well as binary and Intel Hex files – into the data buffer that can then be written to the device.

  • The XML files can be customized to flash new prototypes and chips that are not yet supported.
  • If you need to flash multiple chips, you can do so with multiple adapters and one instance of the Flash Center Software.

Automating Processes with API and C#

The Aardvark Software API supports controlling the Aardvark adapter by creating a custom application for your specific requirements. The API can be used with multiple operating systems and programming languages, including C#. Functional API program examples are provided that can be used as-is or modified as needed.

For your application, we suggest the example program: aai2c_file. This program demonstrates the I2C slave functionality of the Aardvark adapter by transmitting a binary file with a second Aardvark adapter as the master device. As previously mentioned, you can modify this program to meet your requirements. For more information about API, please refer to the section API Documentation of the Aardvark I2C/SPI Host Adapter User Manual.

To make the job easier, we also suggest converting .srec files to HEX or BIN format files. To do so, you can use the objcopy tool as shown below.

objcopy -I srec -O ihex INFILE OUTFILE

objcopy -I srec -O binary INFILE OUTFILE

We hope this answers your questions. Additional resources that you may find helpful include the following:

If you need more information, feel free to contact us with your questions, or request a demo that applies to your application.

Request a Demo