Page 1 of 1
ARMweb and pre processor
Posted: Tue Jan 29, 2013 2:45 am
by YahooArchive
>from the help line
>I am trying to use the SEROUT instruction in the ARMweb, I put the #include
instruction and the compiler marks an error:
>#include #include
>ERROR In Line 7: Expected A Variable
>?? #include
The pre-processor runs on the PC, not the ARMweb, as the ARMweb does not have
access to files on your PC.
So the onchip compiler does not recognize the #include
To use the pre-processor for the ARMweb, you must be compiling on the PC using
BASICtools and the USB serial link to the ARMweb.
Note too that the serial port on the ARMweb is also used for debug messages from
the ARMweb, so there will be extra information going out that port that is NOT
generated directly from your BASIC program.
Re: ARMweb and pre processor
Posted: Wed Jan 30, 2013 1:12 am
by YahooArchive
I'm trying to run a simple Basic program on ARMweb but as the program requires
direct access to an ARM register, my understanding is that I can achieve this
only by running the the BASICTools Preprocessor on a PC and then downloading the
resulting '_temp.out' file to ARMweb ( I don't have a USB Adaptor).
I've tried to do this using BASICTools ver. 4.5, with 'Save Intermediates'
ticked, as indicated in the HELP system and Options/Port set for 'Offline/demo',
but on loading the file, I always get an Application Error pop-up box saying
Error: cannot find channel named "". BASICTools then reports that it is
analyzing the correct file but refuses to run.
I then tried using BASICTools ver. 5.2 and since 'Save Intermediates' is no
longer an option, I've ticked 'ARMweb' on the Control menu. This time I can load
and run the program successfully, but no '_temp.out' file (or even temp
directory) is created in Program files/Coridium, so there's nothing to download
to ARMweb.
I'm a novice, so apologies if I'm missing something obvious but any help would
be much appreciated.
The program is:
#define PINSEL1 *0xE002C004
#define VALUE *0xE006C000
PINSEL1=0x00080000
VALUE=0x0CFF
Re: ARMweb and pre processor
Posted: Wed Jan 30, 2013 1:16 am
by YahooArchive
The pre-processor runs on the PC, so it can be used at compile time in BASICtools.
But the pre-processor is not available to the BASIC compiler that is running on the ARMweb, so you can't use it in BASIC code that is embedded in web pages.
The Show pre-processed option is back
Re: ARMweb and pre processor
Posted: Sun Feb 10, 2013 8:03 pm
by YahooArchive
I am trying to output the Date & Time and ll I get is;
This is // at::
Time-Hour:
Time-Minute:
Time-Second:
Time-Month:
Time-Day:
Time-Year:
when executing the following HTML
Time-Hour:
Time-Minute:
Time-Second:
Time-Month:
Time-Day:
Time-Year:
If I add the PRINT "This is "; MONTH ... statement above to the main program is
works. I have the include on the main program running.
Is this a limitation or bug?
I ahve already created a workarounf by copying the info in the main program to
variables.
Re: ARMweb and pre processor
Posted: Sun Feb 10, 2013 8:06 pm
by YahooArchive
This is not a bug, but how the ARMweb works
When the inside a webpage is processed that code is compiled by
the ARMweb.
The #include in BASICtools is handled by the pre-processor which is running on
the PC. There is no pre-processor running on the ARMweb, and even if there was
one, where would the ARMweb go to get the source for that include file ??
Your work around is one way to do it.
Another is to just read the register directly.
Time minute:
Details on where those registers are in the RTC.bas library or in the LPC2138
user manual.
Re: ARMweb and pre processor
Posted: Sun Feb 10, 2013 8:09 pm
by YahooArchive
Thanks
This is not clear in the docs, It may be implied but a note about the inablity
to use any function that requires an Include in the Webbasic will not work would
help clarify this.
Great device, 98% a breeze to program. 1000% better than in C for quick dev
hardware projects.