phumeniuk 0 Posted March 12, 2013 Report Share Posted March 12, 2013 Hi, I'm getting an odd linker error that isn't particularly helpful in telling me what it actually is. I've tried googling around, searching the forums and changing a variety of different things and so far nothing has worked. I'm hoping it's just something really obvious. The error is as follows. Executing: "C:\Program Files (x86)\SourceBoost\boostc_pic18.exe" menu.c -O1 -W1 -t 18F4455 BoostC Optimizing C Compiler Version 7.05 (for PIC18 architecture) http://www.sourceboost.com Copyright(C) 2004-2011 Pavel Baranov Copyright(C) 2004-2011 David Hobday Licensed to Brunel University under Site Full License for 100 node(s) Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only menu.c success Executing: "C:\Program Files (x86)\SourceBoost\boostlink_pic.exe" "H:\My Documents\Year2\Group\Main\menu.obj" -O1 -p "WeatherStation" -t 18F4455 -rt 0x0800 BoostLink Optimizing Linker Version 7.05 http://www.sourceboost.com Copyright(C) 2004-2011 Pavel Baranov Copyright(C) 2004-2011 David Hobday Optimisation level:1 Internal Error: Data Type not found id:0x1000016E:0x001:0x0000014F in File: 'H:/My Documents/Year2/Group/Main/menu.obj' failure BUILD SUCCEEDED: Tue Mar 12 11:17:30 2013 Main.zip I've attached the project, if there's anything else you need, please let me know. Quote Link to post Share on other sites
davidb 0 Posted March 13, 2013 Report Share Posted March 13, 2013 Hi, Just had a quick read of your code and without going too deeply there seem to be a number of problems but to get you over your immediate one try using something like: ... unsigned int index = menuButtonScan (); switch(index){ case 0: ... instead of simply: ... switch(menuButtonScan){ case 0: ... as this will not work. You also seem to be calling mainMenu() recursively. Even if your code eventually does what you want you are using a large number of delays which will block your code from doing anything else useful. Sometimes small delays are inevitable but scanning keys, debouncing, driving displays etc. can be done much more effectively and efficiently using simply time slicing for instance. Good luck! davidb Quote Link to post Share on other sites
phumeniuk 0 Posted March 13, 2013 Author Report Share Posted March 13, 2013 Ah, that's brilliant, thank you very, very much! I'm used to Java, so this is a bit of a strange experience for me. The mainMenu is only supposed to be called recursively if the button returning to the main menu is pressed. Which is... sort of what I want to happen. For now at least, until I start implementing the various sensors and trying to get some results to show up. Again thank you so much for your help. Quote Link to post Share on other sites
Reynard 0 Posted March 13, 2013 Report Share Posted March 13, 2013 The bug is in the compiler. David earlier has pointed out the problem. The switch should be calling the function menuButtonScan(). The compiler should have picked this one up instead of confusing the linker. Cheers Reynard Quote Link to post Share on other sites
JorgeF 0 Posted March 13, 2013 Report Share Posted March 13, 2013 Hi By the compiler messages posted, I would suggest that smeone tell the University person who manages the software they should update to the most recent release, 7.11. They are missing several bug fixes by still using version 7.05. Best regards Jorge Quote Link to post Share on other sites
phumeniuk 0 Posted March 14, 2013 Author Report Share Posted March 14, 2013 Thanks guys, I'll pass the message on to the people who can sort that out. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.