Hi, I am porting my code from compiler C51 ver6.23 and BL51 to the new compiler and linker , C51 ver 7.00 and LX51 ver3.30 . This was to take advantage of the optimisation features of the LX51's linker code packing. The code when compiled and linked while disabling the Linker code packing works just fine. But once I enable the linker code packing the executable doesn't function properly on the target hardware. I feel some corruption of my data is occurring. Just by using this feature I could straight away reduce the code size by 3%. Any suggestions on how I could debug this?? And another problem I faced is untill I decalare my PDATA variables as static PDATA the LX51 linker doesn't put them into PDATA Segment...!! Thanks, -Binu
Hi, Thanks for the suggestions! Dafydd, My target code memory is only 48.484K, anything lower than the current optimisation of 9 I get code a overflow. Andrew, I have not tried the simulator, by using the simulator how can I find the problem? could you be more specific? I know the program is crashing on invoking some specific function through key-board. thanks, -Binu
"I have not tried the simulator, by using the simulator how can I find the problem? could you be more specific?" If it works in the simulator, but fails in the target, this suggests that the problem lies in your hardware. Unless you have a full ICE, you get much better debugging capabilities in the simulator - call trace, etc You can can usually run under much more controlled conditions in the simulator. "I know the program is crashing on invoking some specific function through key-board." Can you put a breakpoint on the call to that function, then step through and see where it all goes pear-shaped?