handmade-simulator support fpr AT90CAN128 ?

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I know, AS6.1 has no simulator support for the AT90CAN-family.

But sometimes it would be nice to have this feature.

In AS5, I had some basic simulator support. I simply copied some files in the "simulatior"-directory an renamed it. As a far as I remember, I took the ATMEGA128 copied/renamed them - and voila - ist worked, of course without CAN-Mailbox, but the code was up and running.

The same procedure did not work in AS6.1; I was able to choose SIMLUATOR as a debugger, and the debugging seemed to start, but then I got an error message.

Any ideas for that ? Or is AS4 an alternative ? Can I use the files compiled for /in AS6 within AS4 ?

I program like a man:
COPY CON: > firmware.hex

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The reason this doesn't work (I presume you copied and renamed ATmega128_Simulator.xml, renamed it, and edited it) is that the device signature reported by the simulator model will be that of the ATmega128, while Studio expects that of the AT90CAN128. I am not certain, but believe perhaps AS5 did not perform the signature check when using the simulator. You can verify this theory by means of using the programming dialog (that will give a better diagnostic than trying to debug).

Armed with this knowledge, you probably are able to figure out how to work around this problem as well (hint: the expected signature is in devices/AT90CAN128l.xml). Beware that hacks like this voids the warranty :-)

Use of AS6 compiled object files in AS4: If using AVR Assembler: Yes. If using GCC, probably, depending on GCC version. If using IAR, I don't know.

- roland