Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Syntax of the AVRA compiler

2 posters

Go down  Message [Page 1 of 1]

1Syntax of the AVRA compiler Empty Syntax of the AVRA compiler Sat Oct 01, 2022 2:35 pm

KerimF

KerimF

I am new to avra compiler which is used by SimulIDE.

Compiling a code written for avrasm2 (of Atmel Studio) gave warning of many syntax errors.

In vain, I tried searching on the internet for a file that shows the avra syntax. Does such a file exist but I missed it?

Thank you in advance for any comment.

Edited:
Perhaps I have to add:
.INCLUDE "m8pdef.inc"
But AVRA doesn't find it no matter where I put a copy of it.



Last edited by KerimF on Sat Oct 01, 2022 3:11 pm; edited 1 time in total

2Syntax of the AVRA compiler Empty Re: Syntax of the AVRA compiler Sat Oct 01, 2022 2:49 pm

arcachofo

arcachofo

Hi.

here is some info: https://github.com/Ro5bert/avra

Compiling a code written for avrasm2 (of Atmel Studio) gave warning of many syntax errors
In general one thing is a warning and another thing is an error.

3Syntax of the AVRA compiler Empty Re: Syntax of the AVRA compiler Sat Oct 01, 2022 3:15 pm

KerimF

KerimF

arcachofo wrote:Hi.

here is some info: https://github.com/Ro5bert/avra

Compiling a code written for avrasm2 (of Atmel Studio) gave warning of many syntax errors
In general one thing is a warning and another thing is an error.


Thank you for replying.
Do I need including "m8pdef.inc"?
The MCU is set as ATmega8.

Edited:
m8pdef.inc should be m8def.inc Embarassed

4Syntax of the AVRA compiler Empty Re: Syntax of the AVRA compiler Sat Oct 01, 2022 3:45 pm

KerimF

KerimF

Pass 1...

D:/SimulIDE_0.4.15-SR10_Win32/bin/m8def.inc(44) : PRAGMA directives currently ignored
D:/SimulIDE_0.4.15-SR10_Win32/bin/m8def.inc(48) : PRAGMA directives currently ignored
D:/SimulIDE_0.4.15-SR10_Win32/bin/m8def.inc(53) : PRAGMA directives currently ignored
D:/SimulIDE_0.4.15-SR10_Win32/bin/m8def.inc(690) : PRAGMA directives currently ignored
D:/SimulIDE_0.4.15-SR10_Win32/bin/m8def.inc(691) : PRAGMA directives currently ignored
D:/SimulIDE_0.4.15-SR10_Win32/bin/m8def.inc(692) : PRAGMA directives currently ignored
D:/SimulIDE_0.4.15-SR10_Win32/bin/m8def.inc(693) : PRAGMA directives currently ignored
D:/SimulIDE_0.4.15-SR10_Win32/bin/m8def.inc(734) : PRAGMA directives currently ignored
D:/SimulIDE_0.4.15-SR10_Win32/bin/REG_5BD_10.asm(22) : Error   : Found no label/variable/constant named
D:/SimulIDE_0.4.15-SR10_Win32/bin/REG_5BD_10.asm(23) : Error   : Found no label/variable/constant named
D:/SimulIDE_0.4.15-SR10_Win32/bin/REG_5BD_10.asm(387) : Error   : Illegal operator '_'
D:/SimulIDE_0.4.15-SR10_Win32/bin/REG_5BD_10.asm(390) : Error   : Illegal operator '_'
D:/SimulIDE_0.4.15-SR10_Win32/bin/REG_5BD_10.asm(391) : Error   : Illegal operator '_'
D:/SimulIDE_0.4.15-SR10_Win32/bin/REG_5BD_10.asm(396) : Error   : Illegal operator '_'
D:/SimulIDE_0.4.15-SR10_Win32/bin/REG_5BD_10.asm(397) : Error   : Illegal operator '_'
D:/SimulIDE_0.4.15-SR10_Win32/bin/REG_5BD_10.asm(399) : Error   : Illegal operator '_'
D:/SimulIDE_0.4.15-SR10_Win32/bin/REG_5BD_10.asm(400) : Error   : Illegal operator '_'
D:/SimulIDE_0.4.15-SR10_Win32/bin/REG_5BD_10.asm(401) : Error   : Illegal operator '_'
D:/SimulIDE_0.4.15-SR10_Win32/bin/REG_5BD_10.asm(401) : Maximum error count reached. Exiting...

======================

22 #define sourceP   "REG_5BD_10_02___"   ; of Project
23 #define sourceB   "A02_6K_125_10___"   ; for Boards

I guess #define doesn't accept a string
or
perhaps '_' is also not allowed in a constant string

======================

387 #define RLY_port PORTC

'_' not allowed

======================

389 .equ ANDouts = 0b00_0_0_0_0_11 ;  off  off  off  off   off  reset
390 ;------------------------------;  RLY1,RLY2,RLY3,RLY4, RLY5
391 ; [AND]
392 .equ DO_cutR = 0b00_0_0_0_0_11 ;   -    -    -    -    off , overV  input

Here, it seems the lines given by the debugger are somehow shifted from the real ones

======================

I will get rid of '_' and see if there are more syntax errors (or warnings)

5Syntax of the AVRA compiler Empty Re: Syntax of the AVRA compiler Sat Oct 01, 2022 4:30 pm

KerimF

KerimF

The '_' errors are gone.

For flags, I used writing the following syntax:
#define B_bootMd r25,0        ; for SBRC and SBRS commands
#define F_bootMd r25,0x01   ; for CBR and SBR commands

Such a definition generates an error.

Is it possible, for example, to let the avra compiler replace B_bootMd with r25,0 using another way?

Thank you.

Edited:
Note:  /* and  */ to comment a paragraph are not recognized by avra.
Does this mean the character ‘;’ only could be used for comments?

6Syntax of the AVRA compiler Empty Re: Syntax of the AVRA compiler Sun Oct 02, 2022 2:30 pm

arcachofo

arcachofo

Note that avra is almost compatible with AVRASM32 not AVRASM2:
https://github.com/Ro5bert/avra
AVRA is an assembler for Atmel AVR microcontrollers, and it is almost compatible with Atmel's own assembler, AVRASM32.

7Syntax of the AVRA compiler Empty Re: Syntax of the AVRA compiler Sun Oct 02, 2022 3:30 pm

arcachofo

arcachofo

I forgot to mention that in version 1.0.0 you can configure and use almost any compiler/assembler.
For debugging it must generate a .lst file.

Some info here:
https://simulide.forumotion.com/t316-new-custom-compilers

8Syntax of the AVRA compiler Empty Re: Syntax of the AVRA compiler Sun Oct 02, 2022 3:53 pm

KerimF

KerimF

arcachofo wrote:I forgot to mention that in version 1.0.0 you can configure and use  almost any compiler/assembler.
For debugging it must generate a .lst file.

Some info here:
https://simulide.forumotion.com/t316-new-custom-compilers

Thank you for the hint.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum