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