Author Topic: Free AVR simultor on linux  (Read 8249 times)

0 Members and 1 Guest are viewing this topic.

Offline wraper

  • Supporter
  • ****
  • Posts: 16864
  • Country: lv
Re: Free AVR simultor on linux
« Reply #25 on: September 15, 2017, 11:04:35 am »
Hint: When other post before you, the forum engine will notify you and instead to allow you to send your post, it will list few latest post...
So you are REQUIRED to read that, and if there is anything resembling, you MUST shut up and delete all what you wrote? Hint: while you read that, often 3 more posts will appear.
 

Offline sasaTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 168
  • Country: 00
  • Hobbyist in electronic
Re: Free AVR simultor on linux
« Reply #26 on: September 15, 2017, 11:12:08 am »
So you are REQUIRED to read that, and if there is anything resembling, you MUST shut up and delete all what you wrote? Hint: while you read that, often 3 more posts will appear.

Correct it at least, you did not wrote a novel! Certainly I did wrote that I do not know and your confirming was pointless, as the rest.

Please focus on subject, I do not have much time to argue about nonsense, except to focus on solution.
The 30+ years professional desktop software designer and software engineer
 

Offline sasaTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 168
  • Country: 00
  • Hobbyist in electronic
Re: Free AVR simultor on linux
« Reply #27 on: September 15, 2017, 12:22:13 pm »
I use simavr with avr-gdb.

https://github.com/buserror/simavr

Alexander.

Thank you, Alexander.

This at least compiled without problems. The first example did not produce make VCD trace file.
Code: [Select]
./simavr/run_avr tests/atmega88_example.axf
Loaded 1722 .text at address 0x0
Loaded 114 .data
Loaded 4 .eeprom
Read from eeprom 0xdeadbeef -- should be 0xdeadbeef..
Read from eeprom 0xcafef00d -- should be 0xcafef00d..

Probably this version require using some options or similar, but at least commit in git repository is actually only few hours ago. If possible to simulate and capture at least UART, it would be good enough. Though, character LCD showing can be emulated is more than fine.
The 30+ years professional desktop software designer and software engineer
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Free AVR simultor on linux
« Reply #28 on: September 15, 2017, 08:27:26 pm »
After several more missing libs it actually starts to compile and after long time end with strange error:
"
In file included from gtest-1.6.0/include/gtest/internal/gtest-port.h:197:0,
                 from gtest-1.6.0/include/gtest/internal/gtest-internal.h:40,
                 from gtest-1.6.0/include/gtest/gtest.h:57,
                 from session_001/unittest001.cpp:4:
/usr/include/c++/6/sstream:300:7: error: ‘struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs’ redeclared with different access
       struct __xfer_bufptrs
       ^~~~~~
"
Try defining _GLIBCXX_USE_CXX11_ABI to 0.

Offline sasaTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 168
  • Country: 00
  • Hobbyist in electronic
Re: Free AVR simultor on linux
« Reply #29 on: September 18, 2017, 05:51:23 pm »
Try defining _GLIBCXX_USE_CXX11_ABI to 0.

Thank you. I have force compilation with, however, results are the same...

As far as I briefly searched for similar bugs, probably GCC version header/lib code conflicts and as such will probably compiled fine with 4.x or other than latest version (6.5). Anyway, regression is always a burden...

Only possible solution I see is to find DVDs with some old linux distro have older GCC and try to compile...
Regardless on results, I will put in TODO list to make my own AVR simulator from ground when free time allow...

Thank you again for suggestion.
The 30+ years professional desktop software designer and software engineer
 

Offline eugenenine

  • Frequent Contributor
  • **
  • Posts: 865
  • Country: us
Re: Free AVR simultor on linux
« Reply #30 on: September 18, 2017, 05:59:22 pm »
I always though simulation was for while you wanted for the parts you ordered to arrive :)

Mainly i just wanted to tag the thread so I could download later
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Free AVR simultor on linux
« Reply #31 on: September 18, 2017, 07:36:44 pm »
Quote
Only possible solution I see is to find DVDs with some old linux distro have older GCC and try to compile...
Regardless on results, I will put in TODO list to make my own AVR simulator from ground when free time allow...

It's gotta be easier to figure out what's wrong with the existing implementation that used to work, than to start from scratch.
Also, older versions of gcc are still available, and it's not difficult to have more than one version present on a system...
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Free AVR simultor on linux
« Reply #32 on: September 18, 2017, 08:13:30 pm »
Also, older versions of gcc are still available, and it's not difficult to have more than one version present on a system...

it won't work
glibc, ecosystem
a lot of dependencies
 

Offline sasaTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 168
  • Country: 00
  • Hobbyist in electronic
Re: Free AVR simultor on linux
« Reply #33 on: September 18, 2017, 09:37:48 pm »
It's gotta be easier to figure out what's wrong with the existing implementation that used to work, than to start from scratch.

Never is easier to drill through the mountain, than building on the clean flat surface... :)

If you are experience programmer, you would know that very well - digging through other source is sometime real nightmare. If you know how or better had experience with similar task, it is only matter of free time to make your own solution.

On linux that is particularly difficult as anyone use some specific libs and crash is inevitable in one moment...

Quote
Also, older versions of gcc are still available, and it's not difficult to have more than one version present on a system...

As already mentioned - that is not possible.
« Last Edit: September 18, 2017, 10:47:15 pm by sasa »
The 30+ years professional desktop software designer and software engineer
 

Offline dsl

  • Newbie
  • Posts: 2
  • Country: ki
    • MCUSim is a digital simulator of the 8-bit microcontrollers.
Re: Free AVR simultor on linux
« Reply #34 on: February 23, 2018, 11:46:03 pm »
Hey, guys.

If there is still an interest in simulator for Atmel AVR 8-bits MCUs,
I'd like to suggest one: MCUSim (https://github.com/dsalychev/mcusim). It's
programmed in ANSI C under New BSD license and still in development, but
instruction set interpretator, MCU initialization, basic timers for ATmega8A,
GDB RSP interface and VCD dumps are there.

Personally, I compiled it under macOS, FreeBSD, NetBSD and
elementary OS (GNU/Linux) succsessfully. I'm working on this small project
(https://github.com/dsalychev/xling/blob/master/hardware/images/xling-0.1.12-render.png)
and using simulator to track any mistakes in two-wire interface of LCD display.

I'm spending my spare time on design and programming, and if you're
ready to help or suggest anything, please, feel free to ask.
Open source simulator for microcontrollers - mcusim.org
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf