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

TYPE GEN: TYPE TOO COMPLEX

This is the error message I get. The projext is for the NXP P80C51MC2. The code size is around 400K bytes. This occurs after I add another instance of a structure to the code. I have about 450 instances of this structure. I can take out one of them and the problem goes away. This project is several years old and we add code to it on occasion. The error occurs during the compile of the C file that includes the header file with the structures. I have tried splitting the header file up, but that did not help. Any ideas?

I am using Keil 8.05a on Win2000.

Parents
  • In theory, you can process the header with another compiler (a normal 32-bit gcc compiler for example) and create a pre-chewed hex-dump of raw data for the Keil linker to add in.

    The 32-bit program could then create an array of 434 offsets into the data which can be typecast into pointers to the structures.

    Not the slightest portable, but it wouldn't take more than a couple of hours to a day to write such a program and it shouldn't be too hard to modify your code to not use the individual objects, but instead typecast from a pointer to the bick magick block of data together with an offset from the lookup table.

    The gcc compiler will not run into troubles and with a bit of cleverness when preprocessing the data, you may even manage to shrink the information slightly.

    I really can't see why you need 132 pointers in the c file after such an approach.

Reply
  • In theory, you can process the header with another compiler (a normal 32-bit gcc compiler for example) and create a pre-chewed hex-dump of raw data for the Keil linker to add in.

    The 32-bit program could then create an array of 434 offsets into the data which can be typecast into pointers to the structures.

    Not the slightest portable, but it wouldn't take more than a couple of hours to a day to write such a program and it shouldn't be too hard to modify your code to not use the individual objects, but instead typecast from a pointer to the bick magick block of data together with an offset from the lookup table.

    The gcc compiler will not run into troubles and with a bit of cleverness when preprocessing the data, you may even manage to shrink the information slightly.

    I really can't see why you need 132 pointers in the c file after such an approach.

Children
No data