Page 1 of 1

Faster and Smaller...

Posted: Wed May 18, 2011 11:01 am
by Giovanni
Hi,

Just a note about a recent development, I committed on subversion an improvement to the ARMv7-M port (Cortex-M3) that allows two modes: Advanced and Compact.

The Advanced mode is the existing port, the Compact mode handles priorities differently and saves code space into the port_lock() and port_unlock() macros. The result is a more compact (500-600 bytes saved on a total of about 5.5K) and faster kernel.
The drawback is that the Compact mode does not support fast interrupts, it must be said that fast interrupts handling is an advanced but rarely used feature. The compact mode saves 2bytes of code space for each chSysLock() and chSysUnlock() in the code, so the improvement is not limited to the kernel but to the HAL and application code as well.

It has only been implemented for GCC so far but it will be added to the IAR and RVCT ports soon.

Giovanni