View previous topic :: View next topic |
Author |
Message |
Ev3658
Joined: 30 Nov 2014 Posts: 32
|
Posted: Mon Nov 29, 2021 9:14 pm Post subject: compilation error: Rainbow |
|
|
Doesn't compile the example.
Microcontroller: m128def
Bascom version: 2.0.8.4
Compiler error:
Code: | Error : 303 Line : 42 #ELSE, #ELSEIF, OR #ENDIF without #IF , in File ... |
Used code:
Code: | $regfile = "m128def.dat"
$crystal = 16000000
$hwstack = 80
$swstack = 80
$framesize = 80
Config Rainbow = 1 , Rb0_len = 8 , Rb0_port = Portb , Rb0_pin = 3
' ^ connected to pin 0
' ^------------ connected to portB
' ^-------------------------- 8 leds on stripe
' ^------------------------------------- 1 channel
'Global Color-variables
Dim Color(3) as Byte
R alias Color(_base) : G alias Color(_base + 1) : B alias Color(_base + 2)
'CONST
const numLeds=8
'----[MAIN]---------------------------------------------------------------------
Dim n as Byte
RB_SelectChannel 0 ' select first channel
R = 50 : G = 0 : B = 100 ' define a color
RB_SetColor 0 , color(1) ' update leds
RB_Send
Do
For n = 1 to Numleds-1
rb_Shiftright 0 , Numleds 'shift to the right all leds except the last one
Waitms 100
RB_Send
Next
For n = 1 to Numleds-1
rb_Shiftleft 0 , Numleds 'shift to the left all leds except the last one
Waitms 100
RB_Send
Next
waitms 500 'wait a bit
Loop
|
Initialization problem :oops:
(BASCOM-AVR version : 2.0.8.4 ) |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Mon Nov 29, 2021 9:46 pm Post subject: |
|
|
In my 2084 attached code compiles just fine. Maybe you open Rainbow library in Bascom without setting "Dont reformat extension LIB DAT RPT" then try to reinstal Bascom for overwrite the library or copy it from previous version.
Or maybe this is some "path" issue... I always use underscore instead of spaces. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
|
Back to top |
|
|
Ev3658
Joined: 30 Nov 2014 Posts: 32
|
Posted: Mon Nov 29, 2021 10:28 pm Post subject: |
|
|
Windows 10 is to blame for everything 99.9%
I have been installing Bascom since 2016 and after upgrading to 2.0.8.4 on Windows 10, this is causing the glitches.
There was a glitch in the compiler, but after updating Windows 10 and reinstalling Bascom AVR, it disappeared. Now this issue with #ENDIF sure is also related to Windows 10
I beg your pardon, I will try now somehow by the method of a shaman and voodoo to conjure |
|
Back to top |
|
|
Ev3658
Joined: 30 Nov 2014 Posts: 32
|
Posted: Tue Nov 30, 2021 2:00 pm Post subject: |
|
|
Glitch fixed via update 2.0.8.3
Launched with administrator rights 2.0.8.3
Launched the update
Installed in another folder "C: \ MCS \ BASCAVR2084-2"
On file 2.0.8.4 in Win10, set compatibility with Windows 7 + launch with administrator rights
Launched it and the error disappeared.
Thanks for Bascom AVR !!!! Thanks! |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Nov 30, 2021 2:04 pm Post subject: |
|
|
i dont get it. i test each version in windows 10. and all samples are compiled. but yes, you need to install with admin rights. and the first run should be with admin rights too. after that you can use it as a normal user. _________________ Mark |
|
Back to top |
|
|
|