Hi all,

We use the sdcc with our mcs51 project. But we encountered some problems in 
the code
memory. The generate hex file is too large to burn into the mcu.
After we analyze the .map file, we found something funny:
1. The function use generic pointer is quite large.
2. The function has the int/long 's division/multiplication is very large.
3. And some strange ones, some of our empty functions is also very large, 
the assembly
   statement is only two lines, but the final size in .map file can achieve 
1.5K.

We have used the --stack-auto compiler option.

Here is the mapfile section:
  0C:179D    _scs_set_param
  0C:1812    _scs_reset_param        this one is quite big
  0C:1E67    _scs_slot_protocol

Here is the function:
#define SCS_ERR_UNSUPPORT        0x10
typedef unsigned char     scs_err_t
typedef unsigned char     scs_sid_t
scs_err_t scs_reset_param(scs_sid_t sid)
{
     return SCS_ERR_UNSUPPORT;
}


Can any one tell me why it performs such a strange behavior and many thanks?

Best regards.

Li Xiaojun
*******************************************************
Soliton Network Systems (Shanghai)Co.,Ltd.
TEL:021-63183300-5407
FAX:021-63183300-5555
EMAIL: xiaojun...@soliton.com.cn
WEBSITE: http://www.soliton.com.cn
******************************************************* 


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to