Page 1 of 1

Pre-processor error

Posted: Wed Sep 02, 2020 9:44 am
by C_hater
Hi, i just have installed the Basic Tools IDE for working with Arduino Zero. I try to use it with a WeMos SAMD21 Arduino M0 clone ( no seperate debug USB port ). Bossa flashed the SAMD21G.bin correctly to the offset address 0x2000.
Connection to PC is established properly via COM4
But: When testing the IDE with a simple "Hello World" program typed in with the inline editor I always get the message: Pre-compiler error but no details to further investigate. Doing the same "offline" running on the PC emulator is no problem.
A snapshot of the error message is attached.

Any explanation?


Re: Pre-processor error

Posted: Wed Sep 02, 2020 4:06 pm
by basicchip
Trying to duplicate your error, but have not been able to yet.

What version of Windows?

Is it running in 64 bit mode?

Re: Pre-processor error

Posted: Wed Sep 02, 2020 4:12 pm
by basicchip
OK I did duplicate it on a "virgin" system, looking into it now.

Can you compile the Blinky.bas example (under Tools)

Re: Pre-processor error

Posted: Wed Sep 02, 2020 5:30 pm
by C_hater
Hi basicchip, thanks for your engagement!
I'm running Windows64.
Blinky returns also with a pre-processor error( see new picture) at least this time with some more details. I opened Blinky.bas with Notepad.
So Blinky.bas obviously (example dated from 2012) does not contain a definition of the Arduino controller Atmel’s SAMD21G18.
My futher investigation revealed:
BASICtools for Arduino includes automaticly the file SAMD21.bas in the compilation process .This file contains the preprocessor definition of that ATMEL controller but in the definition file of the pins (at the bottom of the file) it does not refer to the Arduino Zero ( only the MKRZero but that is not my board ).
But can this cause the pre-processor error message? I had tried to tell BASICtools that I have a MKRZero ( under Options-Board-Arduino Zero-MKRZero) and besides the pin where the board LED is linked to there should be in the case of the Blinky program no difference between an ARDUINO Zero ( or the clone I use ) and the Arduino MKR Zero. At least I see no reason why the preprocessor should wave the flag...
Now I'm stuck again.

Re: Pre-processor error

Posted: Wed Sep 02, 2020 5:33 pm
by basicchip
For some reason the pointer to the BASIC libraries is not getting set by the installer, still looking into why

But you can set it manually in the Tools menu, and that setting will be remembered. They are in your user/documents/coridium/BASIClib directory
bugfix.jpg (50.32 KiB) Viewed 1018 times

Re: Pre-processor error

Posted: Wed Sep 02, 2020 6:25 pm
by basicchip
Looks like Windows update has struck again, the installer commands to write pointers for Coridium into the registry are not happening. So I am working on a workaround.

Re: Pre-processor error

Posted: Wed Sep 02, 2020 9:05 pm
by basicchip
Thank you for the report, the installer has been fixed to not rely on the Windows registry to find the BASIC libraries and Example directory.

Re: Pre-processor error

Posted: Thu Sep 03, 2020 7:44 am
by C_hater
Ok, installed your workaround update and it works!!
Assume that you are not the only one to have issues with the latest Windows update ;-)
So I can now start exploring the 32bit Controller world.

regards C_hater

P.S. Interesting: my AVAST Virus scanner has now totaly blocked your new setup file. ( Told it had to sent it in the AVAST lab for further investigation ) May be you will get some user relpys on that issue in future.

Re: Pre-processor error

Posted: Thu Sep 03, 2020 5:43 pm
by basicchip
As part of trying to fix it I updated the NSIS installer that I use, though that did not help.

I checked the SetupBASIC.exe against the virus total website, and it reported 1 detection out of 64 virus scanners. My own virus scanner thinks its OK.

And there are some reports of false positive detection related to NSIS installers in google searches. I am sure it is a false positive.

Re: Pre-processor error

Posted: Sun Sep 13, 2020 1:21 pm
by olzeke51
Hello C_hater, - welcome to the group.
A while back a new user asked for some general tips on getting going.
I wrote a post to him, it is the sixth post on his topic
viewtopic.php?f=4&t=1395&p=4488&sid=14d ... 79fc#p4488
Hope you are having fun. the 32bit world is very different than my 8-bit heritage,
and it catches me every now and then.
Gary Olzeke51
PS. login and look for a PM