I attempting to add some code to the main.c file of the kernel provided with the Si8250x Development Kit. When I compile the project in the SiLabs IDE using the Keil C51 tools without my additional code it works. However, when I add my code to the main.c file, a main.obj file is not created when I build the project. This prompts a Fatal Error L210 because there is no main.obj file. When I try to manually add the file to project and then build it, the file is renamed during the process and the same error occurs. Any ideas on how to fix this problem? Thanks
No, it is a simple main with some init stuff to set up some timers, then setting port i/o pins based on the timers. It is a simple program, but I still need the kernel functions for later applications.
Or is the equivalent IDE project option checked...?
Simple check: do you get a main.src?
I am not getting a main.src file, but I am getting a main.#1 file which I'm not sure about. So, main.c compiles without my code and creates a main.obj file. When I copy/paste my code in, I get the fatal error and a main.#1 file is created instead of main.obj.
What is in that file?
Are you using the SiLabs IDE?
The file seems to just be a copy of the source code in main.c
Yes, I am using SiLabs IDE.
I am getting a main.#1 file which I'm not sure about the SILabs editor, if I recall, generates backup files xxx.#1, xxx.#2 when you save the changed file
Erik
So have you asked SiLabs about this?
I figured it out. It was an addressing issue. I was trying to write to a register which hadn't been defined in the .h file. Thanks for the help
there must have been a MAJOR communication problem here, I was trying to write to a register which hadn't been defined in the .h file. nowhere in your posts does it state you got an error during compile.
Indeed - and that would obviously explain why you didn't get an object file!
Was it?
"I was trying to write to a register which hadn't been defined in the .h file."
Surely that would be a symbol definition issue?
You're right. It's my first time using the SiLabs IDE and I didn't realize there was a compile error since the code got to the linker and then displayed the fatal error. I'll make sure to scroll up next time haha
I was trying to write to a register which hadn't been defined in the .h file. if by 'register' you mean SFR, it should be there. just curious, which one?
error c202: undefined identifier
which SFR is missing from the .h?
Sorry, none were missing I had just made an error in my assignments in the code. After changing the operand to a valid SFR it began working.