Marke
Electrical
- Oct 20, 2001
- 1,212
I was recently in a discussion with a group of younger engineers who have a problem with code space in a micro.
The code including I2C and serial communications is all written in C and the code space limitation is a major problem for upgrading the product.
I suggested that I would rewrite the stable parts of the code (now well proven) in assembler to produce faster and tighter code as I have done many times over the years. - works well for me, takes a bit longer, but the algorithm and interface are proven at this point.
I was surprised with the reaction that I got, basically, while this approach may have been true in my day, modern C compliers produced smaller code than assembler, so my suggestion would not work.
This is news to me, and to others that I have spoken to.
Any comments?
Mark Empson
Advanced Motor Control Ltd
The code including I2C and serial communications is all written in C and the code space limitation is a major problem for upgrading the product.
I suggested that I would rewrite the stable parts of the code (now well proven) in assembler to produce faster and tighter code as I have done many times over the years. - works well for me, takes a bit longer, but the algorithm and interface are proven at this point.
I was surprised with the reaction that I got, basically, while this approach may have been true in my day, modern C compliers produced smaller code than assembler, so my suggestion would not work.
This is news to me, and to others that I have spoken to.
Any comments?
Mark Empson
Advanced Motor Control Ltd