For integrators looking to build just libXMODEM with dependencies met by integrators build environment.
sudo apt-get install build-essential socat lrzsz minicom ant openjdk-8-jdk git libgtest-dev cmake repo
git clone [email protected]:ek9852/xmodem.git
cd xmodem
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../installdirectory
make install -j8
For developers looking to extend, bug fix, build, and test libXMODEM with dependencies and test infrastructure included in the source tree. The complete source tree grabs third party repos, standalone command line application code, serial port lib, and gtest.
- Follow instructions to install git-repo http://source.android.com/source/downloading.html#installing-repo
brew install ant git Caskroom/versions/java7 socat lrzsz minicom
sudo apt-get install build-essential socat lrzsz minicom ant git repo openjdk-8-jdk
mkdir xmodem
cd xmodem
repo init -m xmodem.xml -u git://github.com/ek9852/xmodem.git
repo sync
ant all_app
ant all_lib
ant app
or
cd build.app
make
TBD
- It is required that the library be built first.
ant tests
Open a terminal
ant tests_system
All transitions are covered via unit tests.
All transitions are NOT YET covered via unit tests.
-
/source - libxmodem source directory
- xmodem.h - common header (transmitter and receiver)
- xmodem.c - common implementation (transmitter and receiver)
- xmodem_receiver.h - receiver side header
- xmodem_receiver.c - receiver side implementation
- xmodem_transmitter.h - transmitter side header
- xmodem_transmitter.c - transmitter side implementation
-
/app - application level source directory
- CMakeLists.txt - cmake build configuration for the commandline app
- main.cpp - main application source code file
- serialport.cpp - thin abstraction for asio serialport
- serialport.h - header for thin abstraction for asio serialport
-
/tests
- CMakeLists.txt - cmake build configuration for the test runner
- test.cpp - libxmodem test implementation
- XModemTests.cpp - gtest test suite (implementation is in header)
- XModemTests.h - gtest test suite definition and SetUp() TearDown() implementation
-
/tests.tmp - temporary folder for test files and virtual serial port nodes
-
/
- build.xml - ant build configuration for aggregate project (only used for standalone dev purposes not integration). Allows for easy development in Linux, OSX, and Windows
- CMakeLists.txt - libxmodem cmake build configuration, used for integrators who wish to clone just the libxmodem source tree without using git-repo for aggregation.
- README.md - this file
- xmodem.xml - git-repo manifest definition to aggregate all project dependencies for libxmodem development purposes
- .gitignore - definitions of files and directories to be ignored by git
- /asio - boost asynchronous IO standalone implementation
- /cmake - latest cmake build tool - tip of master branch
- /docopt - library for commandline switches
- /gtest - google test library
- build - libxmodem library build directory
- build.app - application build directory
- build.docopt - libdocopt build directory
- build.tests - unit test runner build directory
- build.gtest - google test build directory
nanoXmodem:
Usage:
x --port=<port> --receive --file=<filename> [--baud=<baudrate>]
x --port=<port> --transmit --file=<filename> [--baud=<baudrate>]
x --enumerate
x (-h | --help)
x --version
Options:
-h --help Show this screen.
--version Show version.
--port=<comport> Path to comport.
--baud=<baudrate> Baudrate [default: 115200].
--receive Start transfer as receiver.
--transmit Start file transmission.
--enumerate Enumerate list of available ports.
--file=<filename> File to send.