Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > hex2bix

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



hex2bix
Moderator:
RSKV

Post Reply
Follow this topic



hex2bix

gabriel posted on 16 Nov 2010 12:16 PM PST
Member
8 Forum Posts

I've been trying to get some answers, and you may know how hard is to find them.

This topic is related to hex2bix utility.

Few things that I found out about doing it. If your code is larger that the internal memory, it will have to reside outside, and you need to convert you hex file with the -E option instead of -I. I guess -E stands for external and -I for internal. If you use -E of course your code is large, so you will need to specify -M as for memory I think. They never say if the number you should put there is in decimal or hexadecimal, they just say it is 8k default. Well 8k default is ambigous and doesn't tell you the format. I found out that when hex2bix gives you the error: Input image too bog for output file size, it also gives you a addr = 0x???? and len. So his addr number is in hexadecimal format, and it is the address in bits. So in my case it was addr = 0x4aec. Now 8K is 0x2000 in hex, that is 8kbits now this address is well beyond that default. So I set my -M to 0x8000 and it worked.

Of course you need to know that -V and -P need to go there as well.

Now here is what I don't know, I'm using GPIF and the frameworks, there are a lot of variables defined as xdata, does this mean that the firmware is loades to external ram? external as of off-chip. I mean this because the file sizes are different, my .hex file is 8983bytes and the resultant .iic file is 3431bytes. So why is this BIG difference? What is really copied to program memory? How can I know? I have no idea if I am using external (off-chip) memory or not.  How to check this?

I can load my firmware (hex file) with the USB Control Center and with the EZ-USB Control Panel. Also with the USB Control Center I burned the eeprom with my iic file and it is also running.

Can someone at cypress explain this? How do I know if my firmware is running from on chip or off chio ram?

Thanks in advance.

Gabriel Camiro

 




Re: hex2bix

onlyfelix posted on 30 Nov 2010 07:56 AM PST

1 Forum Post

Hi I am a student from china .I use AN2131 in an application,and have some questions which are familiar with yours .My program's code size is more than 8K ,so I must use external memory.I use the command line options type as"c:\Cypress\USB\Bin\Hex2bix.exe  -m 0x8000 -e -o QandA.iic   QandA.hex  ",but the keil can not compile.I don't konw why,would you tell me how to use"-e"in hex2bit? thank you in advance.



Re: hex2bix

aasi posted on 25 Feb 2011 12:56 AM PST
Cypress Employee
1090 Forum Posts

Gabriel,

There is a part of memory in EZ-USB which though internal to the chip is considered external memory. These are addressed xdata. The difference in size between hex file and iic file is due to lesser overhead in the iic file.

onlyfelix,

Let us know the error message that you are getting so that we can figure out the issue.

Regards,

Anand



Re: hex2bix

NTUC posted on 24 Apr 2012 11:22 PM PST
Senior Member
11 Forum Posts

Hi , I am very new to cypress USB development and I encounter problem in using hex2bix utility .I got error message as " Input image too big for output file size Addr = 0x3046 ,len =0x10 .Please help me to figure out for m setting

 



Re: hex2bix

Gayathri posted on 25 Apr 2012 11:37 PM PST
Cypress Employee
428 Forum Posts

 Hi,

 

Try this:

C;\Cypress\USB\bin\hex2bix.exe  -m 0x8000  -i  -f   0xC2  <O/P file name>.iic  <I/P file name>.hex

 

Regards,

Gayathri



Re: hex2bix

NTUC posted on 25 Apr 2012 02:30 AM PST
Senior Member
11 Forum Posts

Hi ,

      Thanks  a lot .It works !

With regards,

 

 



Re: missing funtion

NTUC posted on 25 Apr 2012 06:25 PM PST
Senior Member
11 Forum Posts

Hi,

I have some issue when I compile the source code  having warning such as " UNRESOLVED EXTERNAL SYMBOL " for  EZUSB_RESUME ,EZUSB_SUSP  functions .I don't know how to configure the product ID and Vendor ID ( PID and VID ) for my development as well .Please help .

Thanks,

with regards

 



Re: hex2bix

Gayathri posted on 27 Apr 2012 11:47 PM PST
Cypress Employee
428 Forum Posts

 Hi,

 

Are they just warnings? That is, does it stops from building the hex file successfully? 

 

In order to odify the VID/PID, please change the corresponding values in dscr.a51 file. Please refer the comments as to know which field corresponds to VID/PID.

 

Regards,

Gayathri



Re: hex2bix

NTUC posted on 30 Apr 2012 01:44 AM PST
Senior Member
11 Forum Posts

Hi ,

They are just warning and I can generate hex file even though I have alot of warning .However ,Once I overwrite the firmware , USB is not reconized anymore .Is it because of mismatching the PID/VID with driver ? I can configure the PID and VID now.

Thanks,

With regards,

phyo

 



Re: hex2bix

Gayathri posted on 01 May 2012 11:24 AM PST
Cypress Employee
428 Forum Posts

Hi,


 


You have to add the entry corresponding to the VID/PID of your firmware, in your inf file. Please refer section "Modification of demonstration inf file" www.cypress.com/?docID=22323.



Regards,

Gayathri



Re: hex2bix

NTUC posted on 03 May 2012 02:06 AM PST
Senior Member
11 Forum Posts

Hi,

 Thanks for your information .Currently I'm using VID as 0B404H ,PID as 0410H and Product version as 0000H.I think these are the sample setting for Cypress Driver .Am I right? If so , Do I need to change the entry value if I want to change own VID and PID ?If so how should I change entry value .Please give me some examples .Thanks in advance.

With regards,

 



EEPROM with password protected

NTUC posted on 10 May 2012 11:35 PM PST
Senior Member
11 Forum Posts

Hi ,

      I have some question regarding with EEPROM .I have encountered the error " EEPROM is missing " when I tried to install the driver .What is the possible problem ? It boot-loads the EEPROM content into internal RAM as I used (0xC2 ) once I generate the .iic file .

Please advise,

Thanks in advance.



Re: hex2bix

PRJI posted on 11 May 2012 11:44 PM PST
Cypress Employee
333 Forum Posts

 



 


   Following is the procedure for downloading iic file onto EEPROM. 


1-Connect the CY3684 board to PC with EEPROM ENABLE switch in “No EEPROM” position. Now the board enumerates with the default internal descriptor. Use CyUSB.inf to bind with the device. For help with binding the driver,see “Matching Devices to the Driver” section of CyUSB.pdf http://www.cypress.com/?docID=26658.  


2-Open CyConsole utility. Go to  Start  >  All ProgramsCypress USB > CyConsole EZ-USB.


3-On DVK set SW1 to large EEPROM and SW2 to EEPROM position. Download the compiled iic file  to EEPROM by clicking the Lg EEPROM tab and selecting the path where the iic file is located. When the download is complete reset DVK, it prompts for a driver.


4- Add new VID/PID (one used in dscr.asm file) to CyUSB.inf and then bind it with the device. 


When did you get the error EEPROM is missing, while installing or downloading firmware? Where was it displayed?


Thanks


Prajith


 



Hi,




Re: hex2bix

Gayathri posted on 11 May 2012 11:44 PM PST
Cypress Employee
428 Forum Posts

 Hi,

 

Where is this " EEPROM is missing" message being reported? i.e. what is the exact error being seen and at what stage? 

 I believe you programed EEPRO successfully and also changed the inf by adding VID/PID corresponding to the one in firmware. Now after all these, when you are trying to bind the driver, what is seen? Please detail.

 

Regards,

Gayathri



Re: hex2bix

NTUC posted on 11 May 2012 01:45 AM PST
Senior Member
11 Forum Posts

Hi ,

    yes I have successfully combined the EEPROM program and I got seen this error when I tried to install the driver .Please advise.

Thanks in advance



Re: hex2bix

Gayathri posted on 11 May 2012 03:14 AM PST
Cypress Employee
428 Forum Posts

 Hi Sachin,

 

Can you attach a screenshot of the error message when it is being shown.

 

Regards,

Gayathri



Re: hex2bix

fisherman posted on 11 May 2012 02:41 PM PST

1 Forum Post

hex2bix -i seems to have a limit of 1K bytes for a code segment (CSEG at xxxxH) is this true?  I use hex2bix to create a .bix file and my code segment looks correct (correct location and complete data).  I use hex2bix -i to create a .iic file and it has the code segment in a different location also there is  4 unexpected bytes 1K bytes into the code segment.  Any ideas?



Re: hex2bix

PRJI posted on 15 May 2012 04:51 AM PST
Cypress Employee
333 Forum Posts

 Hi,

  Please try –e instead of –i to generate the .iic file in the hex2bix command line utility.

Thanks

Prajith



Bulk/ Out Endpoint can't find error

NTUC posted on 28 May 2012 07:46 PM PST
Senior Member
11 Forum Posts

Hi ,

        I have problem with receiving data from USB device and the error is as "BulkEndPoint not found <Address - 86 >".I already define the endpoints IN/ OUT and Control .Please see attached .I'm trying to send and receive data  to and from device and seems like sending is ok and receiving data from device got error and can't receive .Please help me .

Hex2bix setting is as follow .

c:\cypress\usb\bin\hex2bix -i -f 0xC2 -v 0x04B4 -P 0x1004 -M 0x4000 -o fw.iic fw.hex

Thanks,

 



Re: hex2bix

Gayathri posted on 30 May 2012 10:39 PM PST
Cypress Employee
428 Forum Posts

 Hi,

 

The error related to Endpoints has got nohting to do with the hex2bix utility. Can you please specify as to when you saw the particular "BulkEndpoint not found" error. Please see whether your endpoint configuration (in descriptor file, dscr.a51, as well as in TD_INIT() is done correctly). One thing that I noted from the figure that you attached, is that EP1 IN an EP1 OUT is showing its size as 512 Bytes in CyConsole, which is incorrect. EP1 IN and EP1 OUT are 64 Byte buffers. Please correct your configuration. The endpoint onfiguration should be one among the 12 possible configurations as is shown in the section "1.17 EZ-USB Endpoint Buffers" in EZUSB TRM (http://www.cypress.com/?rID=38232).

 

Regards,

Gayathri



Endpoint not found

NTUC posted on 30 May 2012 12:10 AM PST
Senior Member
11 Forum Posts

Hi ,

        I encountered that problem once I tried to write and read the data from the USB device and now it seems ok because I armed the endpoint 6 by configuring in void TD_init(void) function as EP6BCL=0x80 .However I don't know how to configure the endpoint 1 IN/Oout to be size 64 Kbyte .The setting in my descriptor for endpoint 1 is as follow:

Endpoint Descriptor

 db     7        ;; Descriptor Length

db     5         ;; Descriptor type

db  01H      ;; Endpoint number and direction

db  2        ;; Bulk end point

db 00H     ;; Minimum packet size ( LSB)

db  02H   ;; Maximum packet size ( MSB)

db  0 ;; Interface descriptor string index

In void TD_init(void) function I configured the endpoint 1 setting as EP1OUTCFG=0xA0 and EP1INCFG=0xA0 as well .I understand that setting is using default value .Is it correct ?

Thanks,



Re: hex2bix

Gayathri posted on 30 May 2012 03:38 AM PST
Cypress Employee
428 Forum Posts

 Hi,

 

Although the physical size of the EP1 endpoint buffer is 64 bytes, it is reported as a 512 byte buffer for high speed alternate setting 1. This maintains compatibility with the USB specification, which allows only 512 byte bulk endpoints. If you use this EP, do not send/receive EP1 packets larger than 64 bytes. I thought, we must specify the value as 64 itself in the descriptor. Now, I realize that it is okay to mention that as 512 in descriptor, but the actual buffer size would be only 64 bytes. Sorry for confusing you. but please ensure that you would be sending only 64 bytes of data at a time. Hope your EP6 data trasnfer issue is now solved. 

 

Regards,

Gayathri



Re: hex2bix

NTUC posted on 30 May 2012 06:38 PM PST
Senior Member
11 Forum Posts

Hi ,

      I would like to know how to set the bcdDevice value in which portion .Please see the attached .Currently my bcdDevice value is 0x0001 and I want to change it to 0x0000.

Thanks,

With regards,

phyo



Re: hex2bix

Gayathri posted on 01 Jun 2012 12:51 AM PST
Cypress Employee
428 Forum Posts

 Hi,

 

You can change the bcdDevice value in dscr.a51 file. In that, under "DeviceDscr: " please check for the comment "Product version ID". It is the field after Vendor ID (VID) and Product ID(PID). Please change the value corresponding to "Product Version ID".

 

Regards,

Gayathri



Re: hex2bix

NTUC posted on 01 Jun 2012 02:31 AM PST
Senior Member
11 Forum Posts

Hi,

Thanks.It changed now .

With regards






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20