Don't allow framework for the wrong platform to be used

Replacement for #665 

Haven't tested on the device yet.

@jpsim @tgoyne