We have been working on the product on both K22 and K20 controller. We are developing an static library (archive) for K22. Now other than controller family, functionality and every other feature are identical for K22 and K20 product.
So the query is,
- If we are taking K20 with exactly same memory specs (512Kb, 128Kb ram, clock frequency) of that of K22, Can we link this static library directly to K20 device ?
- Can we run executable created for K22 on K20 device ?
Hello,
both the K22 and K20 are ARM Cortex-M4 devices. As long as you are only using Cortex-M4 features, the code is compatible. I assume you are using the K22 with floating point unit? In that case be aware that the K20 does not have this, and mixing libraries will be problematic if FPU is used. The other thing is: if you are using device specific peripherals (UART/SPI/etc): they are similar, but not the same.
I hope this helps,
Erich