1
\$\begingroup\$

I have been saving for example M95160 2Kbyte EEPROM in bin format up to now and I believe it is quite easy to understand. There is an address and corresponding data - the programmer takes care of everything else.

However I need to convert my bin file to e2p format.

I do not know how this format works to start going about this. I would like to understand this format.

Some initial research seems to suggest the format includes information about the actual EEPROM.

How can one convert a bin to e2p EEPROM file format?

(No shopping or buying recommendation or programming software for a PC as per rules please.)

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

It's a file format proprietary to Ponyprog. The latest info should be in the (open-source and free) Ponyprog source code, which you can download and interpret.

From here is some e2p header information:

//=========================================================================//
//                                                                         //
//  PonyProg - Serial Device Programmer                                    //
//                                                                         //
//  Copyright (C) 1997-2019   Claudio Lanconelli                           //
//                                                                         //
//  http://ponyprog.sourceforge.net                                        //
//                                                                         //
//-------------------------------------------------------------------------//
//                                                                         //
// This program is free software; you can redistribute it and/or           //
// modify it under the terms of the GNU  General Public License            //
// as published by the Free Software Foundation; either version2 of        //
// the License, or (at your option) any later version.                     //
//                                                                         //
// This program is distributed in the hope that it will be useful,         //
// but WITHOUT ANY WARRANTY; without even the implied warranty of          //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       //
// General Public License for more details.                                //
//                                                                         //
// You should have received a copy of the GNU  General Public License      //
// along with this program (see LICENSE);     if not, write to the         //
// Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //
//                                                                         //
//=========================================================================//
// Header structure for .E2P files

#ifndef _E2PHEAD_H
#define _EP2HEAD_H

#include <QString>
#include <QtCore>

#include "types.h"

#define E2P_ID_SIZE     8
#define E2P_STRID_SIZE  28
#define E2P_COMM_SIZE   86

#define E2P_FVERSION    0x02

#ifdef Q_OS_WIN32
#pragma pack(push,1)
#endif

// Header dei file
struct e2pHeader
{
    char fileID[E2P_ID_SIZE];
    uint8_t e2pFuseBits;
    uint8_t e2pLockBits;
    uint32_t e2pType;
    int32_t e2pSize;
    uint8_t flags;          //rollOver, splitted
    uint16_t e2pExtFuseBits;
    uint16_t e2pExtLockBits;
    uint8_t fversion;       //file version
    uint16_t split_size_Low;        //used by splitted devices
    char e2pStringID[E2P_STRID_SIZE];
    uint32_t e2pProgBits;
    char e2pComment[E2P_COMM_SIZE];
    uint16_t split_size_High;
    uint16_t pad;
    uint16_t e2pCrc;
    uint16_t headCrc;
} PACK;

#ifdef Q_OS_WIN32
#pragma pack(pop)
#endif

I imagine you could most easily convert file format by opening the file in Ponyprog on one of the supported platforms, possibly supplying any missing information, then saving it in the new format, but I've not tried that.

\$\endgroup\$
1
  • \$\begingroup\$ I'll look into that if not that header offers the information I seek, thanks. \$\endgroup\$
    – onepound
    Commented Sep 6 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.