This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

idata, #pragma, u32/u16

Hi all,

Our code contains:

typedef unsigned int    g_u16_typ; /* from header file */
typedef unsigned long   g_u32_typ;

#pragma NOINIT
g_u16_typ wdog_e_WDTCON_vor_EINIT;
g_u32_typ idata wdog_RAM_Magic;
#pragma INIT

And ofcourse alot of other code. When I run it, it crashes with a software reset (linked to class A/B traps). Sometimes an NMI occurs, sometimes protection faults or alignment errors.

The only thing I need to do, is to change the u32 to u16 for the idata variable.
The variable is read/compared/written in the same source file only, just a few times. Things like wdog_RAM_Magic = 0xBEEF; etc. Nothing fancy.

Q: is it illegal to put u32's (longs) in idata? We're using version 3.12 of the dev-kit but I haven't been able to find anything in the release notes or other doc's.

I'll try to continue with the u16 but I really didn't expect this to happen...

Regards,
Joost Leeuwesteijn

Parents
  • Hi Reinhard,

    The u32 seems to work indeed... I don't have a clue what the problem was :-(

    Yes, we are using 3.12 and I know it's old. It's used for a medical application and our team leader has a "if it ain't broke, don't fix it" attitude. Replacing the compiler, etc would mean we would have to re-test everything, which takes (too much) time, and introduces more risk. He does have a point...

    But I expect we'll switch to a newer compiler eventually.

    Regards,
    Joost Leeuwesteijn

Reply
  • Hi Reinhard,

    The u32 seems to work indeed... I don't have a clue what the problem was :-(

    Yes, we are using 3.12 and I know it's old. It's used for a medical application and our team leader has a "if it ain't broke, don't fix it" attitude. Replacing the compiler, etc would mean we would have to re-test everything, which takes (too much) time, and introduces more risk. He does have a point...

    But I expect we'll switch to a newer compiler eventually.

    Regards,
    Joost Leeuwesteijn

Children
No data