Simulating target on PC
Asked Answered
S

2

12

I'm doing a project in C language that runs on a target with vxWorks operating system. I would like to run my code on PC also for two reasons:

  1. The HW of the target is not available yet, and i want to start testing my SW.
  2. Even when the target will be ready it will be easier for me perform testing and simulations on a PC.

Is there some interesting way to do it?

Thanks.

Stonewall answered 30/4, 2013 at 13:40 Comment(1)
Normally you can use simulator target (vxsim) for this. Also if your target is x86 compatible you can network-boot your PC to vxworks but a chance is that the kernel does not have right configuration/drivers to run correctly on your PC. I was able once also run a vxworks kernel inside VirtualBox machine. But anyway, vxsim is a recommended way to go.Tavia
L
9

You have three choices:

  1. Use the VxWorks Simulator (vxsim) - it's part of the Workbench and can be accessed like a real target
    • Pros:
      • Easy to to use
      • Integrated into workbench
      • Debug functionality and good control of the system
      • Doesn't need any further hardware
      • Documentation (check Wind River VxWorks Simulator User's Guide)
    • Cons:
      • Not the real target system (but this is a con for all points here)
  2. Use a x86 machine and boot eg. through ftp
    • Pros:
      • You can test booting via network and network
    • Cons:
      • The system may lack of drivers
      • Possible you have to change kernel
      • Debug is not as good as vxsim
      • The difference to your target may be realy big
  3. Use a Virtual Maschine
    • Pros:
      • Runs on same pc - no further hardware required
      • Possible to test several bootloaders
    • Cons:
      • Not possible to simulate the target cpu etc.
      • A VM is not the best way for VxWorks testing

As Archie, I recommend you the VxWorks Simulator too.

Landeros answered 7/5, 2013 at 15:32 Comment(1)
Hey, I used the first options. Because i have an RTP and a shared library to test on the VxWorks Simulator i had some trouble to run it on the vxsim. What sovled the problem is a good cheat sheet in workbench: Help->Cheat sheet->Wind River Workbench->Setup a VxWorks RTP with a shared library. Only thing i had to do is to plase my *.so and libc.so.1 in the same location with the RTP.vxe.Stonewall
F
2

A third way is to abstract the HW and OS in a separate layer in your application architecture, and provide both a PC and VxWorks versions of this layer.

This is rather costly, of course, but will have other advantages, i.e. insulation from vendor instability (like when pSos support was stopped years ago...) It might also nudge you in the direction of a nice, layered architecture.

Felicio answered 27/6, 2013 at 12:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.