S08/S12 register maps for the C language

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S08/S12 register maps for the C language

2,090 次查看
Lundin
Senior Contributor IV

My requirements for a project are:

 

- I want to use the C language. This is a fairly common programming language defined in ISO 9899:1990.

- I need a register map of all MCU registers for HCS08DZ and HCS12C.

 

Are there any such register maps available anywhere? As the code needs to in the C language, so the register maps supplied with Codewarrior cannot be used. Does anyone know if any other compiler vendor (Cosmic, IAR etc) are using the C language for register maps in their S08/S12 ports?

标签 (1)
标记 (1)
0 项奖励
回复
3 回复数

1,029 次查看
J2MEJediMaster
Specialist I

I did some work  with the Cosmic compiler several years ago for an OSEK project. I recall that they had different header files, but I wound up using CodeWarrior's instead. The Cosmic web site touts their HC12 compiler  as being ANSI standard, but whether that means the header files conform to the standard may be another thing. Sorry I don't have any more info than that.

 

---Tom

0 项奖励
回复

1,029 次查看
Lundin
Senior Contributor IV

I've been in touch with Cosmic. They don't have standards headers either. I'm not certain whether they are using the horrible bit field syntax or not, but they are at least using the '@' symbol. Like Codewarrior they need this to generate debug info of registers.

 

Now why didn't some compiler manufacturer come up with this bright idea:

 

#pragma GENERATE_DEBUG_INFO

#define PORTA (*(volatile unsigned char *)0x0000)

...

#pragma END_DEBUG_INFO

 

There you go compiler people, fully ISO C compliant. How hard was that? Very easy to parse as well, as the format is completely predictable.

 

 

 

 I guess will have to look at alternatives to Freescale because of the lack of C compilers for the MCUs.

0 项奖励
回复

1,029 次查看
kef
Specialist I

Try Imagecraft products. You will find lines like #define PORTA (*(volatile unsigned char *)0x0000) in header files.

0 项奖励
回复