1. Method of generating respective instruction compaction schemes for subsets of instructions to be processed by a programmable processor, comprising: a) receiving at least one input code sample representative for software to be executed on the programmable processor, the input code comprising a plurality of instructions defining a first set of instructions (S 1 ), b) initializing a set of removed instructions as empty (S 3 ), c) determining the most compact representation of the first set of instructions (S 4 ) d) comparing the size of said most compact representation with a threshold value (S 5 ), e) carrying out operations e1 to e3 if the size is larger than said threshold value, e1) determining which instruction of the first set of instructions has a highest coding cost (S 6 ), e2) removing said instruction having the highest coding cost from the first set of instructions and (S 7 ), e3) adding said instruction to the set of removed instructions (S 8 ), f) repeating operations b-f, wherein the first set of instructions is formed by the set of removed instructions (S 9 , S 10 ).