VMLAB is refusing to complete a compile for lack of an EPROM file *.eep.
I lack any use for EPROM memory in a simple exercise I'm coding. So, what kind of dummy file can I use to satisfy the assembler?
VMLAB is refusing to complete a compile for lack of an EPROM file *.eep.
I lack any use for EPROM memory in a simple exercise I'm coding. So, what kind of dummy file can I use to satisfy the assembler?
Just add:
#includechar ee_var EEMEM = 'A';
to your program (I believe you use GCC?) and a one byte .eep file will be created when the project is built.
I should have mentioned it's an assembler exercise.
I tried just naming an empty file, test.eep. The assember still complained.
The assember still complained.
It would be hard for the assembler to complain about a missing .EEP file, as it is an output that >>it<< creates.
Put an entry into .ESEG
If this is an assembler exercise, explain the reference to "VMLAB compile".
I'm using what ever assembler VMLAB uses automatically. I have WinAVR installed with GCC too.
I've been clicking on the build icon. Then getting a compilation not complete eep file missing message. Here's what I'm using:
; ****************************************************** ; BASIC .ASM template file for AVR ; ****************************************************** .include "C:\VMLAB\include\Tn22def.inc" ; Define here the variables .def I =r16 .def J =r17 .def K =r18 .def ONE =r19 .def LIM =r20 .ESEG eevar: .DW 0xFF .CSEG ; Define here Reset and interrupt vectors, if any reset: rjmp start reti ; Addr $01 reti ; Addr $02 reti ; Addr $03 reti ; Addr $04 reti ; Addr $05 reti ; Addr $06 Use 'rjmp myVector' reti ; Addr $07 to define a interrupt vector reti ; Addr $08 reti ; Addr $09 reti ; Addr $0A reti ; Addr $0B This is just an example reti ; Addr $0C Not all MCUs have the same reti ; Addr $0D number of interrupt vectors reti ; Addr $0E reti ; Addr $0F reti ; Addr $10 ; Program starts here after Reset start: LDI I, 0x00 ; Initialize counter I to zero LDI J, 0x00 ; Initialize counter J to zero LDI K, 0x00 ; Initialize counter K to zero LDI ONE, 0x01 ; Initialize increment to 1 LDI LIM, 0x03 ; Initialize limit to 255 start_1: CP I, LIM BRLO end_1 ADD I, ONE start_2: CP J, LIM BRLO end_2 ADD J, ONE start_3: CP K, LIM BRLO end_3 ADD K, ONE RJMP start_3 end_3: RJMP start_2 end_2: RJMP start_1 end_1:
Whoops, I just caught that the branches should be on equal rather than on lo. :)
Oh, and the ADDs could be INCs, then I could get rid of the ONE register.
***
The last time I coded assember, computers were the size of refrigerators and large freezers, IBM 360s etc.
The ESEG statement seems to have resulted in the creation of the *.eep file.
Although the build is still not complete for some un-reported reason.
Building process not completed!
Is all it says without any exclaimation marks in the build window.
Here's a screen shot of the message window.
It says the project file is OK, and code has no errs inside the window, but that the code is not OK at the bottom.
...but it says test6.hex is up to date, so maybe that's why it says the build did not complete.
Try deleting test6.hex and then rebuilding
Same thing happens.
I found it.
I put a RJMP at the end back to start. It cold just as well be to end_3, since I only want this to run once.
Apparent VMLAB want to insure continuous operation.
I'll be happy when I get past these initial blunders. :)
It's nifty how VMLAM refuses to let the program dead end. This runs as expected. Even without the ESEG statements it works.
; ****************************************************** ; BASIC .ASM template file for AVR ; ****************************************************** .include "C:\VMLAB\include\Tn22def.inc" ; Define here the variables .def I =r16 .def J =r17 .def K =r18 .def LIM =r19 .def ZERO =r20 .ESEG eevar: .DW 0xFFFF .CSEG ; Define here Reset and interrupt vectors, if any reset: rjmp start reti ; Addr $01 reti ; Addr $02 reti ; Addr $03 reti ; Addr $04 reti ; Addr $05 reti ; Addr $06 Use 'rjmp myVector' reti ; Addr $07 to define a interrupt vector reti ; Addr $08 reti ; Addr $09 reti ; Addr $0A reti ; Addr $0B This is just an example reti ; Addr $0C Not all MCUs have the same reti ; Addr $0D number of interrupt vectors reti ; Addr $0E reti ; Addr $0F reti ; Addr $10 ; Program starts here after Reset start: LDI I, 0x00 ; Initialize counter I to zero LDI J, 0x00 ; Initialize counter J to zero LDI K, 0x00 ; Initialize counter K to zero LDI LIM, 0xFF ; Initialize limit LDI ZERO, 0X00 ; Initialize re-initialization start_1: CP I, LIM BREQ end_1 INC I start_2: CP J, LIM BREQ end_2 INC J start_3: CP K, LIM BREQ end_3 INC K RJMP start_3 end_3: MOV K, ZERO RJMP start_2 end_2: MOV J, ZERO RJMP start_1 end_1: MOV I, ZERO RJMP start_1