Menu

Crashing when run a simulation with an atmega1280,1281,1284,2560

Anonymous
2018-08-24
2018-08-30
  • Anonymous

    Anonymous - 2018-08-24

    when i run a simulation with atmega 1280,1281,1284,2560 the simulation crashes

    with all other devices the simulation works

    asm code :

    start:
    sbi ddrb,0

    loop:
    sbi portb,0
    ldi r16,255
    zur:
    dec r16
    brne zur
    cbi portb,0
    ldi r16,255
    zur1:
    dec r16
    brne zur1
    rjmp loop

     
  • Santiago

    Santiago - 2018-08-25

    Yes, somehow wrong files got in the release.

    In folder:
    SimulIDE_0.2.8/share/simulide/data/avr/

    These files are wrong:
    atmega1280.data
    atmega1281.data
    atmega1284.data
    atmega2560.data

    Attached to this post are correct files.

    Thanks for reporting!

     

    Last edit: Santiago 2018-08-25
  • Anonymous

    Anonymous - 2018-08-25

    many thanks Santiago

     
  • Ronomir

    Ronomir - 2018-08-27

    when run attiny2313 the simulation crashes also

     
  • Santiago

    Santiago - 2018-08-27

    Hi Ronomir.

    I can't reproduce the issue.
    Could you provide files you used?

     
    • Ronomir

      Ronomir - 2018-08-28

      What files are needed?

       
    • Ronomir

      Ronomir - 2018-08-28

      I collect a test pattern using attiny2313. After downloading the firmware when the simulation starts, the program sometimes crashes.

       
  • Santiago

    Santiago - 2018-08-28

    Circuit file and firmware file.
    Anything i can use to reproduce the issue.

     
    • Ronomir

      Ronomir - 2018-08-29

      I send files. The project is just beginning to be developed, new elements will be added. The program terminates abnormally when the simulation starts. This does not always happen, but often.

       
  • Santiago

    Santiago - 2018-08-29

    I can not make it crash, but if i start, stop, start again, simulide gui gets blocked.

    What language/compiler are you using to generate hex file?

     
    • Ronomir

      Ronomir - 2018-08-29

      I used the compiler CodeVisionAVR Evaluation

       
    • Ronomir

      Ronomir - 2018-08-29

      language C

       
    • Ronomir

      Ronomir - 2018-08-29

      Now I checked the simulation of the project again. The simulation is performed normally for the first time. When the simulation is re-enabled, after a few seconds the program freezes and then crashes.

       
  • Santiago

    Santiago - 2018-08-29

    Ok, i found the problem.
    This issue will be solved in next release.

    The only workaround i can think is clearing the attiny General Purpose Working Registers just at the benining of the program.
    But i don't think your compiler lets you clear the attiny General Purpose Working Registers...

    I did a modified version of test.hex that should work, just to test the workaround.

    Thanks for testing and reporting, this issue was really hidden and you provided the perfect case to catch it.

     
    • Ronomir

      Ronomir - 2018-08-29

      Thanks for a quick fix! Now everything works correctly. Was glad to help. Thank you for making this program. I've been looking for something like that for a long time!

       
  • Santiago

    Santiago - 2018-08-29

    Btw.. are you using Linux or Windows?

     
    • Ronomir

      Ronomir - 2018-08-29

      I'm using Windows.

       
  • Santiago

    Santiago - 2018-08-29

    Try this simulide build with the issue solved:
    https://sourceforge.net/projects/simulide/files/SimulIDE_0.2.8/Test/SimulIDE_0.2.8-Test-Win32.zip/download

    Your project should simulate ok with this one.

     
    • Ronomir

      Ronomir - 2018-08-29

      Now everything works correctly!

       

      Last edit: Ronomir 2018-08-29
      • Santiago

        Santiago - 2018-08-29

        Nice!

         
        • Ronomir

          Ronomir - 2018-08-29

          I still can something help?

           
          • Santiago

            Santiago - 2018-08-29

            Testing this version and confirming it works properly is already a good help.
            I'm not sure that the solution didn't break something else...

            If you add more stuff to your project and find simulide is not simulating properly you can report here.

             
            • Ronomir

              Ronomir - 2018-08-29

              I plan more projects with this program. If errors are found, I will inform you.

               
            • Ronomir

              Ronomir - 2018-08-29

              I want to suggest the possibility to expose fuses in microcontrollers AVR.

               
              • Santiago

                Santiago - 2018-08-30

                I will have a look to see how to expose fuses, but i'm not sure...
                I have to think about it.

                Regards.