Reduce the size of WRPC
With the new PPSI (used in WRS v6.0), the footprint of WRPC is bigger than the available memory (128KB). There was some work done in this area, this issue is to keep track of it.
The size at the beginning of the WP1b was 139968 Bytes, the size was reduced to 125596 Bytes (by 14372 Bytes) with possible further reduction to 123640 (total reduction by 16328 Bytes) if Single port
, One instance per port
and One foreign master
options are selected in PPSI's config. Additionally, it was identified that the use of RISCV can reduce the footprint by 7844B.
Also following can reduce the size (tested not for the latest commit):
- Use newer compiler for RISCV (10.2.0 instead of 7.3.0), reduction ~1.5KB
- Use Compressed Instructions in RISCV, reduction ~27KB
- Use LTO (Link Time Optimization) for RISCV, reduction ~5KB.
If all of the above are used, the footprint can be reduced by more than 40KB, from ~125KB down to ~85KB (or even less).
The attached file contains the detailed information about size reduction of WRPC.