Konrad Ciuraj

CodeWarrior V8.0 and 56f8367EVM board

Discussion created by Konrad Ciuraj on Jan 26, 2007
Latest reply on Sep 18, 2007 by Gordon Finlay
Hi all, I am a student using CodeWarrior V8.0 and 56f8367EVM board to interface with the DS18S20 digital temperature sensor from Dallas Semiconductor. I am a first time user of CodeWarrior and am having trouble with a few aspects. The first problem I would like to address is using a Function in C code. I am able to define the Function prototype prior to Processor Expert initialization under the designated variable definition area, as shown in the default code generated by CodeWarrior (see NOTE 1. at end of message). Now when I try to write the function under the Write your code here area, I get expression syntax error as shown in NOTE 2. Does this mean that I have to write all the Functions prior to Processor Expert initialization along with the prototype?

As I was not able to perform function calls I turned to assembly using the jump to subroutine function JSR and RTS the commands were written in the /* Write your code here */ area and performed the jump. This solved one problem but now I had another, because every time the assembly code JSR and RTS is called all my variable values that were declared under /* Write your local variable definition here */ get completely changed to random numbers. So I tried the BRA instead of the JSR instruction which stopped unwanted changing of the variables but the Return from subroutine instruction still changed them. The variable locations as shown in the debuger start at 0x00000114 Hex. I know that for the 8052 assembly code there is an instruction ORG that declares where the program code should start, so that we don't overwrite the interrupt vectors located below 30H in the program code memory. I understand that CodeWarrior has substantially more initialization code, now my question is does my program code get written over some of this code space thus changing my variables. Is there an instruction like the one for the 8052 ORG that I should use or does CodeWarrior allocate everything automatically?

One last question in regards to PC Master or Free Master. I understand that there is a plugin for CodeWarrior to allow me to use Free Master. The Scope and Recorder would greatly ease my trouble shooting as I am able to establish sensor presence but can't get the reading from it so I have record the timing to see if there maybe any issues there. Not to mention some the other grate features like web control that I would like to experiance. I don't have the RS 232 cable but I can easily configure my own cable if anyone may know the pin-out used. I did read something about FreeMaster now using SCI instead of RS 232 so I am unsure of which direction to go. Once a cable is installed how do I start the FreeMaster software?

I know that I have a lot of questions, but if anyone can help me out with one or two them, know of any tutorials, walkthroughs or just point me in the right direction I would be very grateful.
Thanks In Advance.


/* Write your local variable definition here */

/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
/*** End of Processor Expert internal initialization. ***/

/* Write your code here */


C/C++ Error 10141

function defined 'inline' after being called

A function was declared inline after it had already been called.

int func( int x );
class cA {
int i;
cA() { i = func( 3); }
inline int func( int x ) { return x + 1; }


Declare the function prototype to be inline