Hello,
Thanks. Yes, as you said, function _i2c_master_set_config() has floating point multiplications and divisions, and the device doesn’t support it, so the project links libgcc, this cause the large code size.So, I went to i2c_master.c ,remove those formulas and calculated baud rate manually and apply it as shown in the attached image.After I have done this, code size came down to 35%(5.8KB) from 70% (12KB). Also, I don't want to go with ASF to make the simple code.
I2C CLOCK 100KHZ:
BAUD + BAUDLOW = fGCLK / FSCL – (fGCLK TRISE) – 10
= 8M/100k – (8M x 215ns) – 10
= 68
Thanks,
Muthu