3 Replies Latest reply on Dec 2, 2013 1:21 PM by userc_42906

    Compiling with SDCC with code larger than 16k

      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.