LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating Microprocessor SDK code with existing VxWorks project

Our company has some custom hardware running VxWorks on PPC processors. It is kind of analogus to the single board RIOs. There is a standard application 'framework' written in C++ by our C++ guys. The hardware can take on different tasks by programming some state machine code to integrate into the framework.

 

1) Would it be possible to you the Microprocessor SDK to create those state machines?

2) Would I use the code generation option and hand the C code the the C++ guys to compile with the framework?

3) Is the code created by the  Code Generation Only target too generic, i.e. would it need to be massaged before integrating with the other VxWorks code?

4) Would it be possible to take one of the supplied VxWorks targets and modify it to only spit out the VxWorks optimized C code without trying to call the VxWorks toolchain?

 

Sorry for all the questions. I'm not familiar with doing embedded stuff. It would just be a real advantage for us if we could use LabVIEW and the Statechart Module to start customizing our hardware.


Thanks,
Pat

0 Kudos
Message 1 of 4
(6,559 Views)

Hi Pat,

 

1. If your top level application is a C++ application, it would make more sense for you to use the C Code Generation only target and plug the C code it into the  main app.

2. The C code that you generate using the C code gen target can be generic but if it has any labVIEW specific datatypes/structures, you will need to compile the runtime library for your target as well. You should be able to use the example targets in the Micrprocessor SDK to do this.

3. When you use the C code generation only target, set "Generate Library Interface" option to create a C library like interface to your VI. This lets you build it into a shared object like a library.

 

Let me know have any more questions,


Thank you,

Jaidev 

Senior Product Manager
National Instruments
0 Kudos
Message 2 of 4
(6,541 Views)

Thanks!

 

For #2, what I was wondering is if the C code generated for the Code Generation Only target is different from the C code generated by the VxWorks targets. Or are all the differences handled by the runtime library? If it is handled by the library, I should be able to 'steal' the runtime library code from one of the supplied VxWorks targets, right?

 

Pat

0 Kudos
Message 3 of 4
(6,536 Views)

Hi Pat,

 

Libraries have to fit both the OS and the target architecture. Also different compilers can have different rules for generating libraries. The best way to port would to build the library using your own compiler (the one you use for the rest of the application). You have the source code since you already have the Microprocessor SDK. I think you can customize the makefiles in here to build you library: C:\Program Files\National Instruments\LabVIEW 8.6\Targets\NI\Embedded\vxworks\cRIO\build

 

You will need the runtime library and the analysis library depending on what you have in your model.

 

Thanks,

Jaidev 

 

Senior Product Manager
National Instruments
0 Kudos
Message 4 of 4
(6,524 Views)