Other Parts Discussed in Thread: HALCOGEN
Hi,
I'm followig the "NHET getting started" but cannot compile the required code.
My . het program compile flawless using "hetp.exe -no -hc32":
L00: CNT{next = L01, reg = A, max = 624}
L01: MCMP{next = L00,
reg = A,
en_pin_action = ON,
hr_lr=HIGH,
pin = CC0,
action = PULSEHI,
order = REG_GE_DATA,
data = 0x1D4,
hr_data = 0x60
}
That's generated .h:
#ifndef __PWM_test_h
#define __PWM_test_h
#define HET_L00_0 (e_HETPROGRAM0_UN.Program0_ST.L00_0)
#define pHET_L00_0 0
#define HET_L01_0 (e_HETPROGRAM0_UN.Program0_ST.L01_0)
#define pHET_L01_0 1
typedef union
{
HET_MEMORY Memory0_PST[2];
struct
{
CNT_INSTRUCTION L00_0;
MCMP_INSTRUCTION L01_0;
} Program0_ST;
} HETPROGRAM0_UN;
extern volatile HETPROGRAM0_UN e_HETPROGRAM0_UN;
extern const HET_MEMORY HET_INIT0_PST[2];
#endif
And that's .c:
//#include "std_het.h"
#include "std_nhet.h" // FIXME
HET_MEMORY const HET_INIT0_PST[2] =
{
/* L00_0 */
{
0x00002C20,
0x00000270,
0x00000000,
0x00000000
},
/* L01_0 */
{
0x00000000,
0x00404058,
0x0000EA60,
0x00000000
}
};
As you can see I've corrected "std_het" with std_nhet" here. Can this be done other than by hand?
When I include .h in my sys_main.c and add .c to compilation these errors are generated:
"C:/Documents and Settings/guest0/Documenti/workspace_CSSv5/TMS570HDK_NHET_PWM_EXAMPLE/NHET/PWM_test.h", line 14: error #20: identifier "HET_MEMORY" is undefined
"C:/Documents and Settings/guest0/Documenti/workspace_CSSv5/TMS570HDK_NHET_PWM_EXAMPLE/NHET/PWM_test.h", line 17: error #20: identifier "CNT_INSTRUCTION" is undefined
>> Compilation failure
"C:/Documents and Settings/guest0/Documenti/workspace_CSSv5/TMS570HDK_NHET_PWM_EXAMPLE/NHET/PWM_test.h", line 18: error #20: identifier "MCMP_INSTRUCTION" is undefined
"C:/Documents and Settings/guest0/Documenti/workspace_CSSv5/TMS570HDK_NHET_PWM_EXAMPLE/NHET/PWM_test.h", line 25: error #20: identifier "HET_MEMORY" is undefined
And seems right because the -c does not include nothing so I cannot know where the above defines should be defined.
Do I miss something?
Thank you