Skip to content
Snippets Groups Projects
Commit 638bf43d authored by Dominik Loidolt's avatar Dominik Loidolt
Browse files

add some documentation

parent 23ced4e5
No related branches found
No related tags found
1 merge request!11decompression/compression for non-imagette data
......@@ -2,6 +2,19 @@
All notable changes to this project will be documented in this file.
## [Unreleased]
## [0.09] - 30-09-2022
### Added
- decompression/compression for non-imagette data
- functions to create and configure a compression configuration
- add max_used_bits feature
- add max used bit version field to the compression entity
###Changed
- Change the build system form make to meson
- Change DEFAULT_CFG_MODEL and DEFAULT_CFG_DIFF to CMP_DIF_XXX constats
### Fixed
- now the adaptive compression size (ap1_cmp_size, ap2_cmp_size) is calculate when the --rdcu_par option is used
## [0.08] - 19-01-2021
### Added
- Relax the requirements on the input format
......@@ -16,6 +29,9 @@ E.g. "# comment\n ABCD 1 2\n34B 12\n" are interpreted as {0xAB, 0xCD,
### Changed
- update the header definition according to PLATO-UVIE-PL-UM-0001 Draft 6
- changed version_id from 16 to 32 bit in the generic header. Add spare bits to the adaptive imagette header and the non-imagette header, so that the compressed data start address is 4 byte-aligned.
### Fixed
- Fix a bug in the definition in imagette header
### Changed
- Rename cmp_tool_lib.c to cmp_io.c
## [0.07] - 13-12-2021
......
## Installation Instructions
# Installation Instructions
## Getting started
### Install git and python 3.6+
### Install git and python 3.7+
If you're on Linux, you probably already have these. On macOS and Windows, you can use the
[official Python installer](https://www.python.org/downloads/).
[official Python installer](https://www.python.org/downloads).
### Install meson and ninja
Meson 0.56 or newer is required.
You can get meson through the Python package manager or using:
Meson 0.56 or newer is required.
You can get meson through your package manager or using:
```pip3 install meson```
......@@ -21,58 +21,67 @@ binary in your PATH.
### Get the Source Code
We use the version control system git to get a copy of the source code.
We use the version control system [git](https://git-scm.com/downloads) to get a copy of the source code.
```
git clone https://gitlab.phaidra.org/loidoltd15/cmp_tool.git
cd cmp_tool
```
## Build the cmp\_tool
### Build the cmp\_tool for Debugging
### Build the cmp_tool for Debugging
You can build the cmp_tool running:
First, we create the `builddir` directory. Everything we build will be inside this directory.
```
meson builddir
meson setup builddir
```
This will automatically create the `builddir` directory and build **everything** **inside** it.
We change to the build directory and build the cmp_tool:
```
cd builddir
meson compile
meson compile cmp_tool
```
Now you should find the cmp_tool executable in the folder.
Now you should find the cmp\_tool executable in the folder.
### Release Build
If you want to build an optimized release build run:
If you want to create an optimized release version, we can create a build directory for it:
```
meson build_relase_dir --buildtype=release
meson setup build_relase_dir --buildtype=release
cd build_relase_dir
meson compile
meson compile cmp_tool
```
You find the build executable in the `build_relase_dir` directory
### Cross-compiling to native Windows
### Build for Windows
To build the cmp_tool you can use the [Mingw-w64](https://www.mingw-w64.org).
Unfortunately, the cmp_tool does not support the Microsoft MSVC compiler. But with the Mingw-w64 GCC compiler, we can compile the cmp_tool for Windows. For this, you need the [Mingw-w64 tool chain](https://www.mingw-w64.org/downloads/). This also works on Linux and macOS. To compile for Windows, do this:
Unfortunately, the cmp\_tool does not support the Microsoft MSVC compiler. To build the cmp\_tool for Windows you can use the Mingw-w64 GCC compiler.
For this, you need the [Mingw-w64 toolchain](https://www.mingw-w64.org/downloads/). To compile on Windows, do this in the Cygwin64 Terminal:
```
meson setup buiddir_win --cross-file=mingw-w64-64.txt
meson setup buiddir_win --native-file=mingw-w64-64.txt
cd buiddir_win
meson compile
```
### Cross-compile for Windows
Cross-compile for Windows is also possible with the [Mingw-w64 toolchain](https://www.mingw-w64.org/downloads/). To cross-compile for Windows use the following commands:
```
meson setup buiddir_cross_win --cross-file=mingw-w64-64.txt
cd buiddir_cross_win
meson compile
```
## Tests
### External dependencies
To run the unit tests you need the [c unit testing framework](https://sourceforge.net/projects/cunit/).
To run the integration tests you need the [pytest](https://docs.pytest.org/en/7.0.x/index.html) framework. The easiest way to install pytest is with `pip3`:
To run the unit tests you need the [ruby interpreter](https://www.ruby-lang.org/en/documentation/installation/).
To run the cmp\_tool interface test you need the [pytest](https://docs.pytest.org/en/7.0.x/index.html) framework. The easiest way to install pytest is with `pip3`:
```
pip3 install pytest
......
......@@ -7,8 +7,7 @@ project('cmp_tool', 'c',
add_project_arguments('-DDEBUGLEVEL=1', language : 'c')
if (host_machine.system() == 'windows' or host_machine.system() == 'cygwin')
and meson.get_compiler('c').get_id() == 'gcc'
if (host_machine.system() == 'windows' or host_machine.system() == 'cygwin') and meson.get_compiler('c').get_id() == 'gcc'
# by default, MinGW on win32 behaves as if it ignores __attribute__((packed)),
# you need to add -mno-ms-bitfields to make it work as expected.
# See: https://wintermade.it/blog/posts/__attribute__packed-on-windows-is-ignored-with-mingw.html
......
......@@ -2,7 +2,7 @@ int_test_file = files('cmp_tool_integration_test.py')
pytest = find_program('pytest', required : false)
if pytest.found()
test('Integration Test',
test('cmp_tool Interface Test',
pytest,
args : ['--color=yes', '-vvv', int_test_file],
depends : cmp_tool_exe,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment