We have a new machine running a new version of the compiler that's having a problem. It's Cx51 v7.20, run from uVision, on top of WinXp Media Center Edition (hey, it was there), plus Cygwin. When the compiler runs, a couple of "send problem report to Microsoft" exception dialogs pop up when compilation reaches a particular couple of files. It's always the same two files, which may be just a matter of when they're reached in the compilation process, or perhaps something about the files themselves. There's nothing wrong with the project or these particular files. We have two other machines (running XP Pro pre- and post-SP2 and C51 v7.05 / v7.09) that work fine on exactly the same input (project files and source). Sound familiar to anyone? Any suggestions on what might be going wrong?
I emailed Brian a new file earlier today. So, for those of you that like to play along at home:
#include <stdlib.h> #include <stdio.h> #define MY_BASE 0xf000 #define MyAddress(offset) (MY_BASE + (offset << 3)) #define PortTable(offset) ((volatile unsigned int *) MyAddress(offset)) #define PortVal PortTable(0xbcd) void cmd (int argc, const char * const argv[]) { unsigned int ui; if (argc > 3) { ui = strtoul (argv[3], NULL, 0); ui = PortVal + 1; // ui = ((volatile unsigned int *) (0xf000 + (0xbcd << 3))); } } void main (void) { cmd (2, NULL); for (;;); }