> > Another question is .... > > I have a commercial FAT12/16/32 file system I would like to implent into the > 2106 it occupies about 40KB of code in an AvR 8bit processor do you have any > idea what that would relate to (in KB) in the LPC ? (disregarding the > compilers optimization) what I mean is ... is 40KB code in an AvR the same > as 40KB code in an LPC ARM ? This may or may not help, its the only 8-bit uP to ARM/Thumb comparison I have to hand. In another lifetime I had to find a way to remove 80%fsd spikes from a flammable gas detector, with less than 200 bytes remaining in the ROM space of an 8051 device. The method I used recorded four history values, and selected the closest to the currently displayed reading as the next value to display. This worked nicely and also clamped a wandering-zero problem. This is obviously a very small example but uses table indexing, loops and 16-bit comparisons. Compiling the function with an early version of Keil's C51 produced a 220 byte lump of code. Three hours work produced hand-optimized assembly code generating 108 bytes of code. Some years later, purely for personal interest I compiled the original C using the ARM SDT200 compiler - 120 bytes of code. Compiling as Thumb code gave 86 bytes of code. Unless you're doing very simple bit or byte copying with no arithmetic and very little decision-making, I would suspect that the ARM, or certainly the Thumb code would be more compact than code for an accumulator-bound 8-bit micro. Peter.
Message
Code size comparison (wasRe: UART, Flash and other Questions?)
2004-04-16 by Peter
Attachments
- No local attachments were found for this message.