Naming changes between S12 and S12X - rant

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Naming changes between S12 and S12X - rant

1,230 Views
adiroot
Contributor I

/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

Labels (1)
Tags (1)
0 Kudos
Reply
4 Replies

611 Views
Lundin
Senior Contributor IV

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.

 

0 Kudos
Reply

611 Views
bigmac
Specialist III

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

 

0 Kudos
Reply

611 Views
adiroot
Contributor I

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.

0 Kudos
Reply

611 Views
rocco
Senior Contributor II

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.

0 Kudos
Reply