[info] rusEfi simulator

It's all about the code!
Post Reply
User avatar
russian
Site Admin
Posts: 9520
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

rusEfi simulator

Post by russian » Tue Jul 15, 2014 2:38 pm

rusEfi firmware simulator is a way to play with the controller without any hardware! All you need is a Windows computer.

Thank you @ for the screen cast!

[video][/video]

http://rusefi.com/wiki/index.php?title= ... :Simulator
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

jfive
Posts: 20
Joined: Thu Sep 18, 2014 7:24 pm

Re: rusEfi simulator

Post by jfive » Sun Oct 05, 2014 9:17 am

Have you tried the jim stim with one of the units yet?

User avatar
russian
Site Admin
Posts: 9520
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by russian » Sun Oct 05, 2014 1:04 pm

jfive wrote:Have you tried the jim stim with one of the units yet?
Nope - I simply do not have one :)

this topic is about a simulator, not a stimulator. The simulator is a piece of windows software which you use without any hardware whatsoever.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

vincenthw
Posts: 1
Joined: Thu Oct 16, 2014 12:46 pm

Re: rusEfi simulator

Post by vincenthw » Thu Oct 16, 2014 12:56 pm

hello russian,

i have problem with setting up virtual COM/TCP port. i followed the steps given in your video but LAN status is shown error.

i don't know what i did wrong. can you please check the attached figure and help me out?

thanks and regards,

vincent
Attachments
Screenshot 2014-10-16 20.48.52.png
Screenshot 2014-10-16 20.48.52.png (57.7 KiB) Viewed 8248 times

User avatar
russian
Site Admin
Posts: 9520
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by russian » Thu Oct 16, 2014 2:44 pm

vincenthw wrote:i have problem with setting up virtual COM/TCP port.
I wonder if the problem is with the TCP port, the process not running or firewall. I've added some troubleshooting hints into the wiki page
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

subnet
Posts: 13
Joined: Sun Oct 05, 2014 3:26 am

Re: rusEfi simulator

Post by subnet » Sat Oct 18, 2014 4:37 pm

vincenthw wrote:hello russian,

i have problem with setting up virtual COM/TCP port. i followed the steps given in your video but LAN status is shown error.

i don't know what i did wrong. can you please check the attached figure and help me out?

thanks and regards,

vincent
when i was trying to get this working i had some problems as well. it also seems that sometimes it just cuts out after doing something (requiring that you go through the process again) even when telnet is responding, and only a reboot seems to get things back to a usable stage.

so as per instructions i do as follows:

reboot computer (if you've already run it before and are getting this error)
start the simulator (note the com port that you're binding to)
create the com in serial port redirector (com port that you selected in simulator, ip address is localhost, port 29002)

User avatar
rus084
contributor
contributor
Posts: 678
Joined: Sun Dec 01, 2013 1:40 pm
Location: Russia , Stavropol
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by rus084 » Sat Oct 25, 2014 4:52 pm

how i can compile it for linux?

User avatar
russian
Site Admin
Posts: 9520
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by russian » Sat Oct 25, 2014 5:00 pm

Current makefile uses win32 HAL. You would need to compile it with posix chibios HAL which would require the makefile to detect if you run win32 or Unix
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
rus084
contributor
contributor
Posts: 678
Joined: Sun Dec 01, 2013 1:40 pm
Location: Russia , Stavropol
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by rus084 » Sat Oct 25, 2014 6:59 pm

ok , i will try compile for linux (or maybe just use wine?)

User avatar
rus084
contributor
contributor
Posts: 678
Joined: Sun Dec 01, 2013 1:40 pm
Location: Russia , Stavropol
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by rus084 » Sat Oct 25, 2014 7:50 pm

demo from Chibios for Posix-GCC is compiling (need to install gcc-multilib library)
why i have this errors?
i cledated "include ${CHIBIOS}/os/hal/platforms/Posix/platform.mk" in makefile , else compiler demand windows.h library (but i dont make for windows because i add this include)

Code: Select all

komp@komp-desktop:/media/komp/ACCA670ACA66CFDE/Users/админ/code/win32_functional
_tests$ make
Compiling chcore.c
In file included from ../firmware/chibios/os/kernel/include/ch.h:113:0,
                 from ../firmware/chibios/os/ports/GCC/SIMIA32/chcore.c:35:
../firmware/chibios/os/ports/GCC/SIMIA32/chcore.h:239:3: error: ‘fastcall’ attribute ignored [-Werror=attributes]
   __attribute__((fastcall)) void port_switch(Thread *ntp, Thread *otp);
   ^
../firmware/chibios/os/ports/GCC/SIMIA32/chcore.h:240:3: error: ‘fastcall’ attribute ignored [-Werror=attributes]
   __attribute__((fastcall)) void port_halt(void);
   ^
../firmware/chibios/os/ports/GCC/SIMIA32/chcore.h:242:60: error: ‘cdecl’ attribute ignored [-Werror=attributes]
                                                            void *p);
                                                            ^
../firmware/chibios/os/ports/GCC/SIMIA32/chcore.c:75:1: error: ‘fastcall’ attribute ignored [-Werror=attributes]
 void port_halt(void) {
 ^
../firmware/chibios/os/ports/GCC/SIMIA32/chcore.c:86:1: error: ‘cdecl’ attribute ignored [-Werror=attributes]
 void _port_thread_start(msg_t (*pf)(void *), void *p) {
 ^
cc1: all warnings being treated as errors
make: *** [build/obj/chcore.o] Ошибка 1


User avatar
russian
Site Admin
Posts: 9520
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by russian » Mon May 30, 2016 8:16 pm

Is that a 100% original ChibiOS demo failing for you? this case you have a chance to ask on ChibiOS forum.

You say Posix which sounds unix but folder name is SIMIA32 which sounds windows, unless I am wrong. Is this all right?

As an option try editing some Makefile and say -Wno-error=attributes just to ignore this error
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
rus084
contributor
contributor
Posts: 678
Joined: Sun Dec 01, 2013 1:40 pm
Location: Russia , Stavropol
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by rus084 » Mon May 30, 2016 8:51 pm

i can compile ChibiOS_2.6.7/demos/Posix-GCC and it works , demo uses SIMIA32 too .

if i use -Wno-error=attributes , attributes errors are fixed , but i get new errors
../firmware/chibios/os/ports/GCC/SIMIA32/chcore.c:48: Error: operand type mismatch for `push'

User avatar
russian
Site Admin
Posts: 9520
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by russian » Mon May 30, 2016 8:54 pm

So ChibiOS demo compiles fine but rusEfi simulator does not compile on Unix?

You would need to take the unix demo Makefile and change it to compile rusEfi simulator. Then you would need to apply all the changes one by one until you find which part of the Makefile is not right. I doubt anyone would tell you something more specific than "your Makefile is wrong"
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
rus084
contributor
contributor
Posts: 678
Joined: Sun Dec 01, 2013 1:40 pm
Location: Russia , Stavropol
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by rus084 » Mon May 30, 2016 10:00 pm

YEAH!!!

Code: Select all

root@dmitriy-Aspire-V5-571G:/rusefi/win32_functional_tests# ./build/rusefi_simulator
ChibiOS/RT simulator (Linux)

Full Duplex Channel SD1 listening on port 29001
Full Duplex Channel SD2 listening on port 29002
Shell service started on SD1, SD2
  - Listening for connections on SD1
  - Listening for connections on SD2
Running version:
TODO
Warning: NaN injection pulse


i use root because i compilling in chroot

what fixed:
my system is 64bit , chibios only for 32bit . need "-m32" option for compiler



why we dont use "make -j5" option when compilling ?
on my laptop its 126% faster .
34s when just "make" and 15s when "make -j5"

User avatar
russian
Site Admin
Posts: 9520
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by russian » Mon May 30, 2016 10:29 pm

Thank you @ the same Makefile now works on unix! todo: rename "win32_functional_tests" to "simulator"
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
rus084
contributor
contributor
Posts: 678
Joined: Sun Dec 01, 2013 1:40 pm
Location: Russia , Stavropol
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by rus084 » Tue May 31, 2016 8:59 pm

i ported rusefi simulator for arm-linux architecture and run it via chroot in android

chibios port is here https://github.com/rus084/chibios-arm-simulator
Attachments
3AE6NCb.png
3AE6NCb.png (306.94 KiB) Viewed 6713 times

User avatar
russian
Site Admin
Posts: 9520
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: rusEfi simulator

Post by russian » Mon Apr 10, 2017 2:49 pm

russian wrote:todo: rename "win32_functional_tests" to "simulator"
And this is done now.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

Post Reply