Hi,
working with MQX 3.5 when I use a pointer to a struct like VMCF5225_GPT_STRUCT_PTR or VMCF5225_RNG_STRUCT_PTR or VMCF5225_PWM_STRUCT_PTR there is a problem. Inside the file mcf5225.h some structs are declared with mcf5225.. but after there is MCF5225 in uppercase.
typedef struct mcf5225_gpt_struct
{
uchar GPTIOS; // GPT IC/OC Select Register
.......
uchar filler[0xFFE0];
} MCF5225_GPT_STRUCT, _PTR_ MCF5225_GPT_STRUCT_PTR;
typedef volatile struct MCF5225_gpt_struct _PTR_ VMCF5225_GPT_STRUCT_PTR; // <-- here MCF5225 is uppercase
typedef struct mcf5225_rng_struct
{
uint_32 RNGCR; // Random Number Generator Control Register
...
uint_32 RNGOUT; // Random Number Generator Output Register
uchar filler[0xFFEC];
} MCF5225_RNG_STRUCT, _PTR_ MCF5225_RNG_STRUCT_PTR;
typedef volatile struct MCF5225_rng_struct _PTR_ VMCF5225_RNG_STRUCT_PTR; // <-- here MCF5225 is uppercase
typedef struct mcf5225_pwm_struct
{
uchar PWME; // PWM Enable Register
...
uchar PWMSDN; // PWM Shutdown Register
uchar filler[0xFFDB];
} MCF5225_PWM_STRUCT, _PTR_ MCF5225_PWM_STRUCT_PTR;
typedef volatile struct MCF5225_pwm_struct _PTR_ VMCF5225_PWM_STRUCT_PTR; // <-- here MCF5225 is uppercase
Solved! Go to Solution.
Hello,
I use MCF52259 with MQX3.5
There is another bug in the file mcf5225.h
In MCF5225_STRUCT the filler11 (after FCAN) is 0xFFCA.
This is wrong and must be equal to 0xFFCC.
This is not a problem with CodeWarrior because Struct Alignment = 32bits.
But it made me problems when I compiled the application with m68k-elf-gcc.
MQX Kernel+RTCS worked but not USB (all components after FCAN have bad address).
June 21, 2010 is the targeted release of FSLMQX3.6 which coincides with FTF Orlando (http://www.Freescale.com/FTF).
Regards,
David
Thanks, the new MQX release when will be online?
Thank you for report, fixed.