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

Problem linking C object files, generating HEX file

Hi,
First off, please pardon my ignorance since I am new to the subject.

I've been handed over a group of source code files (.c, .h, ...) written in C and a compiler IC96 (DOS 5.0 <046-N> iC-95 Compiler V2.3). These files had been compiled, linked and used to generate a HEX file (to flash some chip) without errors.

That was a couple of years ago. The source codes are still compiled without errors. But linking the compiled objects give errors. I don't understand the nature of the linker enough but by trials and errors, I'm under impression that the linker throws errors because there are more objects or the total in size than the linker can handle (I was able to link a few objects but not all of them).

1. Would someone please share any documentations regarding this compiler or linker? the .hlp files come with the iC96 compiler don't have anything on the linker.

2. The mentioned script to link the objs is below. Can you please help explain what the RAM and ROM attributes do in this script?

3. If I want to re-use the source codes with a new/better/more recent compiler to ultimately get the HEX file, what would be your recommendation? Please note that cost is the most important factor. We are a very small company and trying to salvage an old program.

Thank you kindly for your help.

/*-------LINKING SCRIPT--------*/

rl96 12345.obj, cstart.obj, alpha.obj, alphasup.obj, init_isr.obj, util.obj, lcd.obj, led_key.obj, lower_s.obj, alphacom.obj, c:\ic96\lib\c96.lib to alpha RAM(1Ah-0FFh,8000h-9FFFh(alpha)) ROM(2000h-207Fh,2080h-7FFFh(cstart)) ixref

Parents
  • On the notes regarding my experiments with the number of objects the linker can handle, I had combined all of the source codes into one big .h & .c file, for example, called "bigAlpha". bigAlpha was compiled ok. It built a HEX file without error too. But when the tech used the HEX file to flash the chip, it appeared to be empty, no programs on the chip.

Reply
  • On the notes regarding my experiments with the number of objects the linker can handle, I had combined all of the source codes into one big .h & .c file, for example, called "bigAlpha". bigAlpha was compiled ok. It built a HEX file without error too. But when the tech used the HEX file to flash the chip, it appeared to be empty, no programs on the chip.

Children
No data