Hi Raphael,
I just arrived in this company that has a lot of ATmega32 legacy code, and I
try to include some unit testing environment, that's why I'm so
interested in simulavr. I won't need gdb either for that part.
I think, I will look for my multicore simulation example and prepare it
to insert it into examples directory. So you get a example, how I have
made it.
By the way, do you mind telling me what tool you are using for your unit
testing on AVR ?
Not a special tool. I just use unittest framework which comes with
python and write some helper classes to handle simulation target, run
and set breakpoint, measure time and so one, see tests in regress
directory for example.
I read lots of docs lately (many year in software engineering, but
totally new to AVR world) and I can only see two solutions for the "testing
mode" :
- isolate unit tested C code so that it can be compiled for i386 and
can be run with available C unit testing frameworks
- develop (could not find any) a tiny C framework that can be embedded
inside the AVR and tests the code in real conditions. That framework
would give feedback
to the system sending report trough virtual simulavr port
Yes, thats my way too. At first, I develop code and write some tests to
test C code on normal PC platform. E.g. test functions to be sure, that
algorithm is correct. Then I build the target for AVR and write tests
similar to tests on PC platform. Sometimes it's a good idea to write a
test wrapper for a function, e.g. define some vars for function
parameters, define a variable for result values, call the function in a
loop and set a breakpoint to beginning of this function, set values for
parameters, run till next break and check return value. At last I check
overall functionality, for example send something by UART RX and wait
for response. And if you encapsulate all into unit tests, you'll get a
regression test for all of your functionality, which you can repeat
every time you want.
cu, Thomas
_______________________________________________
Simulavr-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/simulavr-devel