News:

;) This forum is the property of Proton software developers

Main Menu

Proton compiler ASM Error

Started by masmry12, Jun 10, 2021, 11:36 PM

Previous topic - Next topic

masmry12

Dear fellows,

I'm new to proton and recently I got a project that is written in Basic in Proton compiler. I've tried to compile the code but it seems there are some errors regarding the
Symbol not previously defiend while all the symbols mentioned in the error included in the folder. I was just wondering Does anyone have any idea how to fix this problem? I;ve attached the errors in the images below.

John Drew

That's a really big program. Now you have a list of the missing symbols go looking in each of the files. If you can't find a definition you'll have to create it. I suspect you have a file missing that contains those definitions.
John

Giuseppe

It could be a missing include where the definitions are contained

RGV250

#3
Hi,
The all look like device symbols, have you looked in the PPI or Defs file, not sure which one.

Bob

top204

#4
Those are the bit names of SFRs, which have been removed from the compilers for about a year now, and was discussed on the forum at the time.

Your code has assembler within it that uses the bit names, so the SFR bit names will need to be declared within the program itself as Symbols.

This had to be done because users were declaring the bit names in the BASIC progam as the full SFR.Bit, more and more regularly, which got transferred to the assembler code and caused failures. For example:

Symbol GIE = INTCON.7

That would get transferred to the assembler code, so if the compiler used a mnemonic such as: Bcf INTCON,GIE, the assembler would actually see: Bcf INTCON,INTCON,7 and cause an error, or worse, the newer assembler executables do not always recognise the incorrect bit name so the program has strange anomalies in it at run time because the assembler executable sometimes uses the SFR's address instead of the bit number.

The compiler now adds the characters 'PP_' to the SFR bit names it uses, and the standard bit names are not created in the assembler code. So the bit name cannot be so easily changed.

If assembler mnemonics are used within the BASIC program itself, and not wrapped in Asm-EndAsm, it is better to use the $defines that are in all the devices .def files. The code in the first thread would then be:

Bsf EECON1bits_EEPGD
Bcf EECON1bits_CFGS
Bsf EECON1bits_WREN


These will never be changed in future compiler versions because they cannot be re-defined by a user as easily, so they are safe.