You are here

Compiling with SDCC with code larger than 16k | Cypress Semiconductor

Compiling with SDCC with code larger than 16k

Summary: 3 Replies, Latest post by stevenc on 02 Dec 2013 01:21 PM PST
Verified Answers: 0
Last post
Log in to post new comments.
stevenc's picture
2 posts

I am working on moving a project from using the Keil compiler to SDCC. I have converted all required files to the point that they compile but am unable to get windows to detect the device and I believe this is because the code is larger than 16k.

The device is a CY7C68013A-128AXC  with EA = 0. 

There is a total code memory size of 16027 (0x3E9B) and data size of 11438 (0x2CAE).

I compile with the flags 

-mmcs51 --model-large --code-loc 0x1900 --code-size 0xC6FE --xram-loc 0x4000 --xram-size 0x9FFF.

These values were obtained by looking at the settings used by the project in Keil. The plan is to have code area 0x1900 to 0x3FFF (internal) and 0x4000 to 0xDFFF (external). Data memory located at 0x4000 to 0xDFFF (external).

When I use the provided hex2bix the device is not recognized by the computer. Here are the flags for hex2bix: 

-C 0x41 -F 0xC2 -V <vid> -P <pid> -E -M 0xFFFF -O file.iic file.hex

I tried using the python converter provied by the fx2lib which causes the computer to recognize the device but gives the error "Unknown device". The python script can be found on the Github page. I use these flags with the python script -v <vid> -p <pid>  file.ihx file.iic

Here is my question:

  •  I have read that a bootloader would be needed for files over 16k, can I do something to get the hex2bix bootloader to work or do you have suggestions for a bootloader that should work?

If you have any other suggestions or need additional details, please let me know as I have beeng working on this for quite some time without too much progress.

rskv's picture
Cypress Employee
1134 posts



Please create a tech support case at One of our engineers can help you in the same.



Sai Krishna.


NIKL's picture
Cypress Employee
283 posts

 Even before using hex2bix, can you check if your hex file works by downloading the hex file to ram?

Ws your Keil hex file greater than 16K as well?

you do not really have to define a memory as xdata memory while linking.

In your source files itself, you can define xdata address directly.

You can create a tech support case, so that one of our engineer can have a look at your files.

stevenc's picture
2 posts

 Thanks for the tips. I opened a case and am getting help that way.

Log in to post new comments.