The Barracuda App Server Source Code Library is on GitHub. The GitHub repository includes two examples: the Mako Server and Xedge (firmware version). The Mako Server can be built for VxWorks 7 and up. Xedge can be built for VxWorks 5.5 and up. For VxWorks, we recommend using Xedge.
Contact Real Time Logic if you have any questions or need help compiling the C source code.
Start by fetching the two required repos and build the Xedge resource file.
# Fetch the Barracuda App Server git clone https://github.com/RealTimeLogic/BAS.git # Fetch the Barracuda App Server's resources git clone https://github.com/RealTimeLogic/BAS-Resources.git # Go to the build directory cd BAS-Resources/build/ # Run the build script. If on Windows, use Xedge.cmd # When prompted, initially select n for OPC-UA, l for large cacert.shark, # and n for compressing the files . Xedge.sh # The ZIP file is converted to a C array by the build script; # copy this to the Xedge directory cp XedgeZip.c ../../BAS/examples/xedge/ cd ../../BAS
The file XedgeZip.c embodies Xedge's resources transformed into a C file. You can uncover this file's resources and detailed build instructions in the BAS-Resources Repository.
The following command shows how to compile Xedge
wr-cc -o examples/xedge/xedge -static -fmerge-all-constants -O3 -Os\ -DBA_FILESIZE64 -DBA_HAS_ANSI_IO -DBA_POSIX -DLUA_NUMBER_INTEGER=0\ -Iinc -Iinc/arch/VxWorks -Iinc/arch/NET/Posix\ src/BAS.c\ examples/HostInit/Main.c examples/HostInit/HostInit.c\ src/arch/VxWorks/ThreadLib.c src/arch/NET/generic/SoDisp.c src/DiskIo/posix/BaFile.c\ examples/xedge/src/xedge.c examples/xedge/src/led.c\ examples/xedge/XedgeZip.c -lnet
You can now copy and run examples/xedge/xedge on VxWorks.
The following example shows how to compile the Mako Server for VxWorks 7:
wr-cc -o examples/MakoServer/mako -static -fmerge-all-constants -O3 -Os\ -DUSE_EMBEDDED_ZIP=0 -DBA_FILESIZE64 -DBA_HAS_ANSI_IO -DMAKO -DUSE_SQL=0\ -DLUA_NUMBER_INTEGER=0\ -Iinc -Iinc/arch/VxWorks -Iinc/arch/NET/Posix\ src/BAS.c\ src/arch/VxWorks/ThreadLib.c src/arch/NET/generic/SoDisp.c src/DiskIo/posix/BaFile.c\ examples/MakoServer/src/MakoMain.c\ -lnet
In addition to the above compilation command, you need to build the accompanying mako.zip resource file.
VxWorks is a high-level POSIX-compliant operating system, meaning several open-source servers can be modified and compiled to run on it. If you're wondering how the Barracuda App Server compares to these alternatives, the closest comparison would be with Node.js. We've provided a detailed comparison between Node.js and the Barracuda App Server. For more information, see Node.js vs. Barracuda App Server.