Pre-processor error

Questions about the BASICtools and MakeItC
Post Reply
C_hater
Posts: 9
Joined: Wed Sep 02, 2020 8:55 am
Location: Regensburg, Germany

Pre-processor error

Post 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?

regards
C-hater
Attachments
snapshot of error message.png
snapshot of error message.png (52.99 KiB) Viewed 1473 times



basicchip
Posts: 1029
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Pre-processor error

Post 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?

basicchip
Posts: 1029
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Pre-processor error

Post by basicchip »

OK I did duplicate it on a "virgin" system, looking into it now.

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

C_hater
Posts: 9
Joined: Wed Sep 02, 2020 8:55 am
Location: Regensburg, Germany

Re: Pre-processor error

Post 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.
Attachments
Blinky Error.png
Blinky Error.png (204.65 KiB) Viewed 1471 times

basicchip
Posts: 1029
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Pre-processor error

Post 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
bugfix.jpg (50.32 KiB) Viewed 1471 times

basicchip
Posts: 1029
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Pre-processor error

Post 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.

basicchip
Posts: 1029
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Pre-processor error

Post 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.

C_hater
Posts: 9
Joined: Wed Sep 02, 2020 8:55 am
Location: Regensburg, Germany

Re: Pre-processor error

Post 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.

basicchip
Posts: 1029
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Pre-processor error

Post 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.

olzeke51
Posts: 394
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

Re: Pre-processor error

Post 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

Post Reply