![]() |
_entry_scn error on building
I am attempting to build Kevin's code with the streamlined camera program and I get an error:
'_entry_scn' type is non-overlay and absolure but occurs in more than one input file. This has come up before as noted in this closed thread: http://www.chiefdelphi.com/forums/sh...ght=_entry_scn but I'm not entirely sure if I know what to do to fix it - as it seems like it shouldn't happen Has anyone else run into this? Thanks |
Re: _entry_scn error on building
Are you compiling Kevin's original code without any changes of your own?
If you've changed any files in the project which ones are they and what did you change? |
Re: _entry_scn error on building
It was entirely Kevin's code. I had not changed a thing.
In the thread that was closed that I mentioned above, the user just tried again with a fresh download of Kevin's code. I downloaded his code again and tried, and it built with no errors. So we're back in business - or rather, we're at step 2 of 1000 - but you get the idea :) That fact that it works now is odd, but not entirely unexpected. |
Re: _entry_scn error on building
Did you try to do a "Rebuild-all"? That is the button next to the build button.
Worked for me :) Try that :D Cheers! |
Re: _entry_scn error on building
That sort of error seems to be common when you change project directories and don't do a "clean" make. It looks like MPLAB keeps some information around about the previous project and tries to link both the old and new object files.
I believe it always goes away if you "build all" instead of just doing a normal fast compile of only the changed files, or if you delete all the intermediate files before compiling. |
Re: _entry_scn error on building
are u sure u arent calling any files like this??
#include camera.c because that can cause a major problem... do it like this instead #include camera.h also i had this problem once... sometimes if u uninstall MPLAB and reinstall it... it sometimes works that waay... |
Re: _entry_scn error on building
This is my problem too, but whatever has been suggested above and in many other places doesn't cure my woes. I've even taken the code from a "good" code" subdirectory to a 2nd computer and matched up all the options side by side. Everything matches (except see below for $(INCDIR)).
As Alan Anderson says, I copied a subdirectory of good code to another directory. After all, you want to be able to fall back to good code if you mess up the newer code. If this can't be done MPLAB is a bit useless. I've always done "Build All", and as Alan suggests, I've tried the "Clean". The only difference is the Include Path $(INCDIR) -- the good code had none in "Build Options" General. With none in the "bad" code, I get C:\CODE\0601-SHOOTER\2007-01-14 TEST\camera.c:30:Error [1027] unable to locate 'stdio.h' Adding a path C:\mcc18\h to $(INCDIR) gets me thru all the Executing's and stops at MPLINK with Error - section '_entry_scn' type is non-overlay and absolute but occurs in more than one input file. I suspect this is the problem, somehow duplicating includes, but how else does one locate stdio.h? From the microchip.com forum (via Google), I've found this (lets see if I can do quotes): Quote:
Any suggestions? Roger. PS-- At least I'm not getting an error regarding "Generate_Pwms(pwm13,pwm14,pwm15,pwm16);"! |
Re: _entry_scn error on building
1 Attachment(s)
Build all and look at the last line before MPLINK in the output window, is it similar/identical to the following:
Quote:
Quote:
NOTE: The ifi provided linker file is different from the default linker file that comes from Microchip - the ifi version has the c018i.o reference commented out. If the line is missing the '//', add them in and rebuild all. If the linker file is ok, take a close look at the "Executing... mplink..." line in the build output window. Is the project picking up the linker file from the project directory or from the Microchip default directory? Referencing the wrong one will cause the problem. I changed my linker file by uncommenting the "FILES c018i.o" line as follows to force the error in my project: Quote:
Quote:
So the error message is indicating that somewhere in the link procedure it is encountering multiple modules that are defining the _entry_scn, but it only wants one definition. See section 2.9.1.4 of the C18 user guide under reserved section names for a description of this reserved section. Hopefully you haven't attempted to create another section of this name. If you don't think so, then you didn't. You'd have to add pragma statements defining the section name. I used mplib /t on the libraries, but they look clean. I then looked into the View -> Disassembly Listing of the project and found that this section is declared in ifi_startup.c: Quote:
Quote:
Now, View -> Disassembly Listing (this assumes it now builds without errors). In this file do a View->Find for _entry_scn - scroll up and you will find which file is definining this section. Now at least you know which file is causing the problem and you can figure out how the linker is getting this file. In my example: Quote:
AND DON'T FORGET to remove the #ifdef NEVER...#endif from the ifi_startup.c file when done troubleshooting! Bud |
Re: _entry_scn error on building
Wow! dcbrown thanks for your answer. The "//FILES c018i.o" was the final link to success. I've gotten good builds on the "bad" code, a subdirectory copy of a good code, and even on a separate computer. I never even thought to look in 18f872.lkr, let alone think it was a text-readable file. Next step is PROGRAMMING!
I have only one possible nit to pick, in case others are following along. Quote:
Again, many thanks! Roger. |
Re: _entry_scn error on building
Quote:
Poor choice of english on my part. I'll go back and edit it. What I MEANT to say (really!) was to reference the whole linker-script dialog section which is below the libdir dialog which I referenced earlier. It is confusing the way it is currently written - I'll change it. Bud |
Re: _entry_scn error on building
I knew what you meant to say (I think), but it was mostly in case anyone else had the problem. Besides, I was following the pictures!
|
Re: _entry_scn error on building
Okay, dcbrown (insert #$^#&(*$% smilie here) unfortunately I didn't have access to the robot when I built the code. In the IFIloader, when I open the .HEX code, it pops open with a small window with the message
Quote:
|
Re: _entry_scn error on building
In build output window, what does COFF to HEX file converison look like?
Quote:
In MpLab, File -> Open, select FrcCode.hex. Once open, it should look something like: Quote:
|
Re: _entry_scn error on building
I’m sorry this is taking so long. I thought with the //FILES c018i.o I was free and clear!
Both the MPLAB and IFIloader are from last year’s kit. We’ve loaded this year's disk on other computers, but at the time we only had last years set and ready. Also, the robot code is last years, and we’ve been loading it onto last year’s robot. Right now I’m not with the computer nor robot, but I have my own computer with duplicates of everything. It also tested the code and compiled successfully, just to see if a different computer can do it. Here is the output from the last successful build: Quote:
Here is 18f8722.lkr: Code:
Code:
:020000040000FABuild Options – General: Include Path: C:\mcc18\h Library Path: C:\mcc18\lib (all others blank) Finally, I’ve attached a picture of the MCW list, and one of Build Options – MPLAB C18. -- Well, I would have, except it's not doing what I thought Build Options, MPLAB c18 tab, Use Alternate Settings: -mL -Ou- -Ot- Ob- -Op- -Or- -Od- -Ooa- -nw=2066 -D_FRC_BOARD mcw ~ mcp list: Along with all the C and H files, FRC_library_8722.lib and 18f8722.lkr. One final thing. I took Kevin.org's frc_camera_21.zip files and compiled them successfully, straight out of the box, butgot the same error with IFIloader. The HEX file supplied successfully downloaded. Hopefully this is enough for you. If I have to I can get to the school tonight for more, but I’ll be there tomorrow for sure. The internet is a little flaky there, so it’s a choice of being next to the robot or on the internet. Thanks again for your help! Roger. |
Re: _entry_scn error on building
Nothing obvious to me. I'll need to try a few things on our bots this weekend, but at this point I'm out of ideas.
|
Re: _entry_scn error on building
Well, then I'll go back a couple of steps and try again. I'll go on the computers with this years stuff and see if a clean start helps. Thanks for your help.
|
Re: _entry_scn error on building
Make sure you verify the controller with the ifi download utility before attempting to download - should say FRC in the bottom window bar to the right-ish.
|
| All times are GMT -5. The time now is 20:53. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi