|
SYSCON1 sfr not definedNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Steve Brown Posted 29-May-2001 10:36 Toolset C166 |  SYSCON1 sfr not defined Steve Brown We are using c166 compiler version 4.05. When we add the line
sfr SYSCON1 = 0xF1DC;
to the include file which "should" already have it defined, we get
error C155: 'SYSCON1': invalid base address.
How do we access this sfr without an error?
Thanks | | Read-Only Author Jon Ward Posted 29-May-2001 11:05 Toolset C166 |  RE: SYSCON1 sfr not defined Jon Ward We are using c166 compiler version 4.05. When we add the line
sfr SYSCON1 = 0xF1DC;
to the include file which "should" already have it defined, we get
error C155: 'SYSCON1': invalid base address.
How do we access this sfr without an error?
The SYSCON1 register is not included in EVERY C16x/ST10 chip. It is only included in header files for chips with this register. In the \keil\c166\inc directory, there should be a file named, C167CS.H. This file includes the definition for SYSCON1. There have been header file changes since V4.05, so you may want to check http://www.keil.com/update for the latest C16x tool updates.
As for the error message, the C16x is a chip with two different architectures (the C166 and the C167/1/3/4/5). The C166 is the oroginal part, The C167 is an upgraded architecture with new instructions and expanded SFR address spaces. There is a compiler switch (MOD167) that enables the enhanced features of the C167/1/3/4/5 which includes the extended SFR address space. So, including the MOD167 directive will fix the error message you are receiving. Take a look at the following knowledgebase article for more details:
http://www.keil.com/support/docs/285.htm
If you are using uVision2, you should NOT be having this problem unless you selected the wrong chip when you created your project.
Jon
| | Read-Only Author Steve Brown Posted 29-May-2001 11:39 Toolset C166 |  RE: SYSCON1 sfr not defined Steve Brown Thanks to Jon for the reply.
However, we are using uVision2 V2.05, and have included the MOD167 directive. We are using the c161csjx.h include file to build software for an Infineon C161JC controller, which uses this register for power moding. I believe there may be an unreported problem here, is there any other way to access this sfr for this chip? | | Read-Only Author Jon Ward Posted 29-May-2001 18:40 Toolset C166 |  RE: SYSCON1 sfr not defined Jon Ward Are you using a PK166 or a PK161?
Jon
| | Read-Only Author Steve Brown Posted 30-May-2001 06:29 Toolset C166 |  RE: SYSCON1 sfr not defined Steve Brown Pk161 | | Read-Only Author Jon Ward Posted 30-May-2001 11:31 Toolset C166 |  RE: SYSCON1 sfr not defined Jon Ward Hmmmm,
When Infineon launched the C161, they asked us to make a low-cost, restricted kit that was limited in the SFR space.
As the 161 became more popular, they started adding more SFRs and this caused the compiler to break.
I'm certain this is corrected in the latest release. Download the latest update from http://www.keil.com/update and that should fix the problem.
Jon
| |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|