I have 3 projects that I am porting from an old uV4 toolset to newer uV5 toolset. In all cases the new code is 5% to 10% larger and this is causing some issues. As far as I can see, all the settings match. Is there something I am missing here, or is this a known issue with the newer tools?? Some of my projects are VERY tight for space.
Example: Old then New
C51: BROWSE DEBUG OBJECTEXTEND PRINT(.\lst\*.lst) TABS (3)A51: SET (SMALL) DEBUG PRINT(.\lst\*.lst) EPProgram Size: data=54.0 xdata=945 code=6164IDE-Version: µVision V4.72.9.0Tool Version Numbers:Toolchain: PK51 Prof. Developers Kit Version: 9.52.0.0Toolchain Path: C:\Keil\C51\BINC Compiler: C51.Exe V9.52.0.0Assembler: A51.Exe V8.02bLinker/Locator: BL51.Exe V6.22Librarian: LIB51.Exe V4.29Hex Converter: OH51.Exe V2.7.0.0CPU DLL: S8051.DLL V3.91.0.0Dialog DLL: DCYG.DLL V2.72.0.0
C51: OPTIMIZE (8,SPEED) BROWSE DEBUG OBJECTEXTEND PRINT(.\lst\*.lst) TABS (3)A51: SET (SMALL) DEBUG PRINT(.\lst\*.lst) EPProgram Size: data=54.0 xdata=945 code=6405IDE-Version: µVision V5.25.3.0Tool Version Numbers:Toolchain: PK51 Prof. Developers Kit for SiLabs Version: 9.59.0.0Toolchain Path: C:\Keil_v5\C51\BINC Compiler: C51.exe V9.59.0.0Assembler: A51.exe V8.2.7.0Linker/Locator: BL51.exe V6.22.2.0Librarian: LIB51.exe V4.30.1.0Hex Converter: OH51.exe V2.7.0.0CPU DLL: S8051.DLL V3.122.0.0Dialog DLL: DCYG.DLL V2.75.0.0
Good Question. I would say that many things are a little larger. :-) StartUp and constant data is the same, as one would expect. Here are some function side-by-side comparisons. "N" lines are the newer compiler. I wonder if some optimization is getting ignored or something.
Edit: fixed first line indent CODE 00AEH 0048H UNIT ?PR?LOADEP1INFIFO?USBLIB N CODE 1437H 0056H UNIT ?PR?LOADEP1INFIFO?USBLIB CODE 0118H 04E1H UNIT ?PR?HOSTCMDEXEC?HOSTCMD N CODE 0118H 053DH UNIT ?PR?HOSTCMDEXEC?HOSTCMD CODE 05F9H 020BH UNIT ?PR?HANDLE_SETUP?USBINT N CODE 0655H 020CH UNIT ?PR?HANDLE_SETUP?USBINT CODE 0804H 016FH UNIT ?PR?GET_DESCRIPTOR?USBLIB N CODE 0861H 0178H UNIT ?PR?GET_DESCRIPTOR?USBLIB CODE 0973H 00E7H UNIT ?PR?MAIN?MAIN N CODE 09D9H 00E8H UNIT ?PR?MAIN?MAIN CODE 0A5AH 00CEH UNIT ?PR?GET_STATUS?USBLIB N CODE 0AC1H 00D7H UNIT ?PR?GET_STATUS?USBLIB CODE 0B28H 00B2H UNIT ?CO?USBDESCR N CODE 0B98H 00B2H UNIT ?CO?USBDESCR CODE 0BDAH 00ABH UNIT ?C_C51STARTUP N CODE 0C4AH 00ABH UNIT ?C_C51STARTUP CODE 0C85H 00AAH UNIT ?PR?_FLASHWRITEBLOCK?FLASH N CODE 0CF5H 00AAH UNIT ?PR?_FLASHWRITEBLOCK?FLASH CODE 0D2FH 00A4H UNIT ?C?LIB_CODE N CODE 0E47H 00A4H UNIT ?C?LIB_CODE CODE 0DD3H 0098H UNIT ?PR?USB0_ISR?USBINT N CODE 101FH 0098H UNIT ?PR?USB0_ISR?USBINT CODE 0E6BH 0095H UNIT ?PR?CLEAR_FEATURE?USBLIB N CODE 0EEBH 009AH UNIT ?PR?CLEAR_FEATURE?USBLIB CODE 0F00H 0095H UNIT ?PR?SET_FEATURE?USBLIB N CODE 0F85H 009AH UNIT ?PR?SET_FEATURE?USBLIB
Grant B said:I wonder if some optimization is getting ignored or something.
That would be the kind of thing I'd be looking at.
Maybe the definitions of the optimisations have changed, or some other default has changed ...