tags:

views:

658

answers:

2

In a vxWorks Real-Time process, you can pass environment variables as one of the parameter of the main routine.

How do you use the environment variables in the kernel context?

A: 

Vxworks environment variable support is provided by the envLib.

use putenv("VAR=value") to set the value of the environment variable.

use char* var = getenv("VAR") to retrieve the value.

Benoit
That was a pretty quick answer to your own question!
LeopardSkinPillBoxHat
+2  A: 

Call this directly from the VxWorks shell:

putenv "<VARIABLE NAME>=<VALUE>"

replace with your environment variable name and with the value you want to set it to.

LeopardSkinPillBoxHat