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

Cannot debug step by step Avr in SimulIde-1.0.0

2 posters

Go down  Message [Page 1 of 1]

homievk



Hi. I tried to play with the ready-made project m328_7Seg_Counter (OS: Windows 10).
I selected as a compiler Avrasm2 from AVR Studio 4.19 (I have the old version of AVR Studio because new versions are heavy weight)
C:/Program Files (x86)/Atmel/AVR Tools/AvrAssembler/avrasm2/
I clicked Compile, it compiled successfully. Then I clicked Debug, it messaged me "lst file doesn't exist".
I copied-pasted lst file from the previous version SimulIDE_0.4.15-SR10_Win64. Now I cannot debug "step by step", it runs a whole code without stopping.
Wouldn't it better to return to the same compile method as it was made in SimulIDE_0.4.15 by default? You have to select a compiler every time when you create a new project in SimulIde-1.0.0. It's a little annoying. Those who want extra functions could select another compiler and other settings.
Also it would be good to have a special keyboard key to debug "step by step" (F7 for example).

arcachofo

arcachofo

Hi.

I clicked Compile, it compiled successfully. Then I clicked Debug, it messaged me "lst file doesn't exist".
Avrasm2 should generate the list file. Maybe there is some problem.
Can you copy/paste here the complete log when you compile?

You might need to edit the command to match your version.
Command for avrasm2 is defined in this file:
data/codeeditor/compilers/assemblers/avrasm2.xml
Have a look at this file as well:
data/codeeditor/compilers/template.txt


I copied-pasted lst file from the previous version SimulIDE_0.4.15-SR10_Win64.
You need to use the list file generated by your Avrasm2.

Wouldn't it better to return to the compile method as it was made in SimulIDE_0.4.15 by default?
In 0.4.15 you could not compile and debug with avrasm2.
Note that SimulIDE is no longer distributing executables for Avra or any other compiler/assembler.

You have to select a compiler every time when you create a new project in SimulIde-1.0.0. It's a little annoying.
You can add that information as a comment in the very first line of the source code, for example:
Code:
; Compiler: Avrasm2

; Your code next...

;Vectors
;Interrupt vectors
.ORG    0
    rjmp    START ;Reset
.ORG    2
    reti    ;INT0
.ORG    4
    reti    ;INT1
.ORG    6
    reti    ;PCINT0

3Cannot debug step by step Avr in SimulIde-1.0.0 Empty output Sat Mar 18, 2023 12:18 pm

homievk



output when I compile with Avrasm2
=====
Executing:
"C:/Program Files (x86)/Atmel/AVR Tools/AvrAssembler/avrasm2" -fI -o C:/atemporary/SimulIDE_1.0.0-SR0_Win64/SimulIDE_1.0.0-SR0_Win64/examples/Micro/Avr/mega328/m328_7Seg_Counter/gcb_code/m328_7Seg_Counter.hex -W NoRegDef -l C:/atemporary/SimulIDE_1.0.0-SR0_Win64/SimulIDE_1.0.0-SR0_Win64/examples/Micro/Avr/mega328/m328_7Seg_Counter/gcb_code/m328_7Seg_Counter.lst -I "C:/Program Files (x86)/Atmel/AVR Tools/AvrAssembler/avrasm2/" "C:/atemporary/SimulIDE_1.0.0-SR0_Win64/SimulIDE_1.0.0-SR0_Win64/examples/Micro/Avr/mega328/m328_7Seg_Counter/gcb_code/m328_7Seg_Counter.asm"
=====
output when I click Upload
===
FirmWare Uploaded to mega328
C:/atemporary/SimulIDE_1.0.0-SR0_Win64/SimulIDE_1.0.0-SR0_Win64/examples/Micro/Avr/mega328/m328_7Seg_Counter/gcb_code/m328_7Seg_Counter.hex


Warning: lst file doesn't exist:
C:/atemporary/SimulIDE_1.0.0-SR0_Win64/SimulIDE_1.0.0-SR0_Win64/examples/Micro/Avr/mega328/m328_7Seg_Counter/gcb_code/m328_7Seg_Counter.lst
===



Last edited by homievk on Sat Mar 18, 2023 12:25 pm; edited 1 time in total

4Cannot debug step by step Avr in SimulIde-1.0.0 Empty compilers Sat Mar 18, 2023 12:23 pm

homievk



Everything works fine when I compile it with Avra (I copied avra.exe from SimulIDE_0.4.15-SR10_Win64 to my working directory in SimulIDE-1.0.0 and compiled with it) and run my program step by step. It would be good if you posted links where students can download Compilers suitable for SimulIDE-1.0.0. For example I couldn't find avra.exe in Google Search.

arcachofo

arcachofo

output when I compile with Avrasm2
=====
Executing:
"C:/Program Files (x86)/Atmel/AVR Tools/AvrAssembler/avrasm2" -fI -o C:/atemporary/SimulIDE_1.0.0-SR0_Win64/SimulIDE_1.0.0-SR0_Win64/examples/Micro/Avr/mega328/m328_7Seg_Counter/gcb_code/m328_7Seg_Counter.hex -W NoRegDef -l C:/atemporary/SimulIDE_1.0.0-SR0_Win64/SimulIDE_1.0.0-SR0_Win64/examples/Micro/Avr/mega328/m328_7Seg_Counter/gcb_code/m328_7Seg_Counter.lst -I "C:/Program Files (x86)/Atmel/AVR Tools/AvrAssembler/avrasm2/" "C:/atemporary/SimulIDE_1.0.0-SR0_Win64/SimulIDE_1.0.0-SR0_Win64/examples/Micro/Avr/mega328/m328_7Seg_Counter/gcb_code/m328_7Seg_Counter.asm"
Seems that the command is not executed: there is no output from the assembler.

For me it is a problem in the compiler path, the command should be:
"C:/Program Files (x86)/Atmel/AVR Tools/AvrAssembler/avrasm2/avrasm2"
Not:
"C:/Program Files (x86)/Atmel/AVR Tools/AvrAssembler/avrasm2"

And probably in Windows should be:
"C:/Program Files (x86)/Atmel/AVR Tools/AvrAssembler/avrasm2/avrasm2.exe"
If this is the case, you can edit avrasm2.xml file and add the ".exe"

It would be good if you posted links where students can download Compilers suitable for SimulIDE-1.0.0.
The idea is that in Simulide 1.0.0 you can compile anything, so any compiler is suitable for Simulide.
You just need to create (or modify) an xml file describing the steps needed to compile.
Debugging is possible in many cases, but might require some "tweaking".

The list of compilers included are just examples, and in most cases require modification to fit in your system.

For example I couldn't find avra.exe in Google Search.
Some searchs require a bit of work.
In this case, there are files for Windows here:
https://sourceforge.net/projects/avra/files/1.2.3/
Seems that there are not Windows executables for later versions.

In any case you should be able to use Avrasm2 (or any other) in Simulide.

6Cannot debug step by step Avr in SimulIde-1.0.0 Empty Solution Sat Mar 18, 2023 3:08 pm

homievk



I solved my problem by creating a new folder avrasm2 in C:/SimulIDE_1.0.0/examples/Micro/Avr/ and copying avrasm2.exe to there
In my case
Tool path "C:/SimulIDE_1.0.0/examples/Micro/Avr/avrasm2/"
Include path "./"
Thank you for helping me.

arcachofo likes this post

Sponsored content



Back to top  Message [Page 1 of 1]

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