View previous topic :: View next topic |
Author |
Message |
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
Posted: Tue Feb 06, 2018 1:28 am Post subject: compile mcs.lib error |
|
|
Hello,
When I try to compile the mcs.lib it shows "errors found" but it does not indicate what is the error.
I need to remark some lines in the _getadc section to remove the double adc read.
I reinstalled the Bascom but even the new install without modifications cannot recompile.
Any other library does compile without errors.
Winows 10 Pro
BascomAvr 2.0.8.1
Any clue?
(BASCOM-AVR version : 2.0.8.1 , Latest : 2.0.8.1 ) |
|
Back to top |
|
|
Printpix52
Joined: 18 Jun 2014 Posts: 282 Location: D.F.
|
Posted: Tue Feb 06, 2018 3:26 am Post subject: |
|
|
Activate error file .... |
|
Back to top |
|
|
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
Posted: Tue Feb 06, 2018 6:16 am Post subject: |
|
|
Thanks!!
But this is not related to Bascom source code compile.
Is about Library compile.
|
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Tue Feb 06, 2018 8:26 am Post subject: Re: compile mcs.lib error |
|
|
Matrixx wrote: | When I try to compile the mcs.lib it shows "errors found" but it does not indicate what is the error. |
Same here, but no matter about the error message, it actually does compile, you would notice by checking date and time of mcs.lbx
Edit:
By checking mcs.err you can find:
Quote: | Error : 215 Line : 173 Unknown ASM mnemonic [$REGS R24] | '$REGS' looks odd, maybe kind of an undocumented, well, also non-working command, it's not recognized from the compiler either.
The associated function [_FLIPBYTE] however seems to be self-contained, uses register r24 as parameter and result, furthermore $REGS does not pop up anywhere else in any other lib, so my guess is: it's simply a comment missing the semicolon in front. Put one there and it's fixed. |
|
Back to top |
|
|
Printpix52
Joined: 18 Jun 2014 Posts: 282 Location: D.F.
|
Posted: Tue Feb 06, 2018 10:49 am Post subject: |
|
|
Mine works well does not mark me wrong ..... |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Tue Feb 06, 2018 2:29 pm Post subject: |
|
|
Printpix52 wrote: | Mine works well does not mark me wrong ..... | Check if you have the $REGS-entry within your mcs.lib. |
|
Back to top |
|
|
Printpix52
Joined: 18 Jun 2014 Posts: 282 Location: D.F.
|
Posted: Tue Feb 06, 2018 9:14 pm Post subject: |
|
|
Hi, I've never worked with bookstores, it's the first time I try them later, I'm going to study. |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
|
Back to top |
|
|
Printpix52
Joined: 18 Jun 2014 Posts: 282 Location: D.F.
|
Posted: Tue Feb 06, 2018 10:04 pm Post subject: |
|
|
There is no error all well, thank you friends! |
|
Back to top |
|
|
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
Posted: Tue Feb 06, 2018 11:29 pm Post subject: |
|
|
ok, I checked the mcs.err and yes it shows:
Quote: | Error : 215 Line : 173 Unknown ASM mnemonic [$REGS R24] , in File : |
Looking at the images , can the mcs.lib be compiled that way too ?? |
|
Back to top |
|
|
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
Posted: Tue Feb 06, 2018 11:32 pm Post subject: |
|
|
Quote: | Same here, but no matter about the error message, it actually does compile, you would notice by checking date and time of mcs.lbx |
Ok, I have checked the mcs.lbx date. So if it compile, it is ok then |
|
Back to top |
|
|
luizabbadia
Joined: 11 Dec 2007 Posts: 112 Location: rio de janeiro
|
Posted: Wed Feb 07, 2018 5:36 pm Post subject: |
|
|
Sorry if I donīt get the point, but why should somebody try to compile a system libray? What am I missing here? Is it any normal routine to follow? Any problem to solve? Sorry I confess I am lost...can somebody explain this, please? Thanks |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Wed Feb 07, 2018 8:21 pm Post subject: |
|
|
luizabbadia wrote: | What am I missing here? |
The compiler uses it per default, try to rename mcs.lbx and compile something, then report back.
You can also compensate by including $lib "mcs.lib" in all of your projects, not sure if that's what you like.
To the TO:
Basically it is not neccessary to edit mcs.lib to change behavior of one function within a project, it is sufficient to copy the [_GETADC] function from mcs.lib, paste it into a text file, which you can rename upon your like to, for example myadc.lib
Adapt the functionality within myadc.lib to your needs and put it into the Bascom lib-directory, then add to your source code:
Be careful not to rename the functions name [_GETADC].
As you've done this, the function [_GETADC] from myadc.lib overrides the one from mcs.lbx.
Benefit is: The standard GetADC() is not altered for any other code, beside for the one in question. |
|
Back to top |
|
|
luizabbadia
Joined: 11 Dec 2007 Posts: 112 Location: rio de janeiro
|
Posted: Thu Feb 08, 2018 1:03 am Post subject: |
|
|
Ok, I did the test and got the same "Error : 215 Line : 173 Unknown ASM mnemonic [$REGS R24] , in File :...." but looking at the file timestamp it was compiled.
What I donīt understand is the effect on the overall behavior.. all programs compile well and I just donīt understand all this movement...but itīs ok...just curious.. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Fri Feb 09, 2018 3:06 pm Post subject: |
|
|
$regs is something new.
It should not be in the released version since the compiler in that version does not support it.
When copying the release files for the 2081 build i forgot to remove this line.
You can best remark the line with a semi colon. Or simply delete it. _________________ Mark |
|
Back to top |
|
|
|