Hi everyone,

thanks for providing simulavr with a Python interface, I would like to use the simulator to evaluate automatically AVR code of my students. Hence, I have a number of elf files and it was my intention to run a script loading one by one and execute some tests. But I failed to reset the simulator and the virtual controller ...

To condense my problem I prepared the following code snippet that should run and
rerun an elf file. For reseting the simulation I added a method

  def ResetSystem(self):
     self.__sc.ResetClock()

in ex_utils.py. When I excute the script

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

import ex_utils

mcu = "atmega32"

sim = ex_utils.SimulavrAdapter()
sim.dmanSingleDeviceApplication()

# Test 1
print "First Run"
dev = sim.loadDevice(mcu, "blinking_LED.elf")
sim.doRun(10000) # Execute an exemplary simulation
sim.ResetSystem() # Reset the simulation system

# Test 2
print "Second Run"
dev = sim.loadDevice(mcu, "blinking_LED.elf")
sim.doRun(10000) # Execute an examplary simulation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I got
â–¶ python evaluationFailure.py
First Run
Second Run

FATAL: file traceval.cpp: line 567: Can't create device name twice, because it's a single device application

What's happened? The syncMembers vector should be empty? Why do we have a
conflict here?

Thanks for your help

Sebastian


--
-------------------------------------------------------------
Junior-Prof. Dr.-Ing. Sebastian Zug
Dept. Embedded Smart Systems (ESS)
Institute for Intelligent Cooperating Systems (IKS)
Otto-von-Guericke-University of Magdeburg
Universitätsplatz 2
39106 Magdeburg
Germany

mail: z...@ivs.cs.uni-magdeburg.de
Tel.: +49 - 391 - 67 - 52632
Fax:  +49 - 391 - 67 - 11161

_______________________________________________
Simulavr-devel mailing list
Simulavr-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/simulavr-devel

Reply via email to