Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simulating target on PC

Tags:

vxworks

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.

like image 573
Alex Avatar asked Apr 30 '13 13:04

Alex


2 Answers

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.

like image 166
ollo Avatar answered Sep 22 '22 10:09

ollo


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.

like image 26
Harald Hansen Avatar answered Sep 22 '22 10:09

Harald Hansen