/rant
We're porting from the S12 to the S12X. And guess what - the register names have changed. Subtly, but significantly enough to cause hours of labor of senseless programming. It also means that sharing files is going to be a lot more difficult.
So what kind of control does Freescale assert over its programmers? Can just any programmer rename DDRK_DDK4 to DDRK_DDRK4? Or does it need to get approved by the Board of Wasting Other Companies Time?
Shame on you Freescale.
/rant
When Freescale says something is "code compatible" they are speaking of the CPU core op codes. Never of the register map, memory or peripherals. The S12 family isn't even code compatible among itself, subtle things like for example the MODRR register does completely different things between S12 derivates. Memory mapping will be completely different, and so on.
And yes, they need to make pointless name changes to registers and bits so that porting between families will be as painful as possible.
Hello, and welcome to the forum.
I guess that when a new family of devices is developed by Freescale, some register naming changes will be inevitable. However, in this case the register name is identical, and only the bit names have altered, and these are really contrived names that do not specifically appear in the datasheet.
Since the two device families are quite similar, the Freescale supplied header file for the newer device should have contained a list of 'aliases' to maintain basic compatibility with the earlier device, and avoid the problem you have encountered.
// Aliases:
...
#define DDRK_DDK4 DDRK_DDRK4
...
.
Regards,
Mac
Thanks for your reply.
I understand that the S12X has registers that are different than the S12 - that is truly expected. However, when registers at the same address with the same fuctions get a name change, I get upset.
Port K is not the only register that's changed. PORTA, PORTB, and other have suffered meaningless name changes to get them to conform to some newer standard.
PORTA_BIT0 is now PORTA_PA0
ditto for port B and port E.
PTH_PTH3 is now PTIH_PTIH3, etc
ditto for port J
list goes on
Gained = nothing. Lost = time.
Hi Adiroot,
The Board of Wasting Other Companies Time has been around for a long time.
[rant]
Since the eighties, I have been complaining about the seemingly arbitrary changes to the syntax every time Motorola came out with a new assembler. Comment characters changed, the rules for labels changed, and the pseudo-ops would all change. We have had to rewrite all of our macros numerous times for a new syntax, and each "advance" seemed to loose functionality, which we would then have to figure out how to recover.
[/rant]
Fortunately, Freescale has not changed the assembler since the Motorola days, so the assembler syntax has been stable lately.