Originally posted by WheresWaldo JCPentax on DPReview gave a very marketing oriented answer to why you won't see code ported over mentioning that the processors are different and some other internal hardware is different also. Technically speaking I highly doubt that Pentax software engineers write in machine code and I doubt even more that the Prime II and Prime I processors are so different that the code base is not compatible, but rather that the Prime II has an instruction set that is a superset of the original Prime processor. Look at AMD and Intel who have much more experinece building processors (not just CPUs) than anyone in the world, each iteration is built on the one before and wider data paths do not mean a completely new instruction set.
ARM systems (common in the embedded world) are a bit different; they have a more modular design. There's the core CPU, various standard optional components, and the ability to add non-standard coprocessors with a standard path for accessing them in the instruction set.
What tends to happen is that intensive tasks, such as compression algorithms, get built in hardware which are added to the system as coprocessors. (Sometimes as actual separate ASICs, but due to the way ARM is licensed, it's common for everything to exist on the same physical chip.) Some assembly-level work is then required to access them, even if it's just a relatively small change to the compile toolset.
Apart from that, internal hardware differences are a big deal in the embedded world, since you often aren't working at the same high level of abstraction as your average OS on PC hardware. Of course you design software with some level of abstraction just for personal sanity, but every now and then a major change needs to be made which will touch a lot of code, even if you aren't working at the machine code level.
I don't know anything about the PRIME internals or the firmware architecture, but there very well may be solid technical reasons why the code doesn't work across revisions, as opposed to the company just not wanting to spend time updating the older models.