Skip to main content

A tooling for flashable parameter data container generation

Project description

ParGen - A tool for Flashable Parameter Container Creation

ParGen is an embedded development tool for generation of parameters values that can be stored in flash memory and maintained independent from the application. It allows to alter/update parameter values without recompilations.

Concept and Planned Features

Concept

  • Read input from a schema validated XML file
  • Generate C-Source stubs for embedding into the application source amd testing environments
  • Generate Intel Hex files for flashing with a programmer
  • Generate GNU linker include file for mapping the parameter to absolute addresses
  • Generate A2L fragments for accessing the parameters from AUTOSAR test environments

Installing Python Dependencies

An example configuration is in the 'example' folder. To run it make sure to have all dependencies from requirements.txt installed. Run the following inside the checked out sandbox folder:

MacOS/Linux

python3 -m venv .venv
source .venv/bin/activate

Windows

python -m venv .venv
.venv\Scripts\activate.bat (or Activate.ps1 for powershell)

Create a Development Editable Install

An editable install is needed for running the unittests and development of the package itself. It installs the package in the local virtual environment, but uses the python files form the src folder.

python3 -m pip install -e .

Build a Installation Package

An installable wheel file can be created using the build package and the following commands:

python3 -m pip install --upgrade build
python3 -m build

The wheel file will be generated in the dist folder:

ls dist
flashcontainer-0.0.1-py3-none-any.whl   flashcontainer-0.0.1.tar.gz

The parameter generator tool can then by called on cmdline using

$ pargen -h
usage: pargen [-h] [--version] [--ihex IHEX] [--csrc CSRC] [--gld GLD] file

A tool for generating flashable parameter container.

positional arguments:
    file         XML parameter definition file

options:
    -h, --help   show this help message and exit
    --version    show program's version number and exit
    --ihex IHEX  Generate intelhex file with given name.
    --csrc CSRC  Generate c/c++ header and source file using given basename.
     --gld GLD    Generate GNU linker include file for parameter symbol generation.    

Running the Example

Go to the folder example and run the "run.bat" or "run.sh" script. It should create the following output:

pargen 0.0.1 : A tool for generating flashable parameter container.
copyright (c) 2022 haju.schulz@online.de

Generating intelhex file example.hex
Generating C-files param.[ch]
Generating GNU Linker script example.ld
Done.

The tools parses the example.xml parameter definition file and converts it into

  • Intel hex files for flashing
  • C/H files for accessing the parameter in applications (H-File) and unittests (C-File)
  • GNU Linker script for generating parameter symbols at the flash adresses

Issues, Ideas And Bugs

If you have further ideas or you found some bugs, great! Create an issue or if you are able and willing to fix it by yourself, clone the repository and create a pull request.

License

The whole source code is published under the BSD 3-Clause License. Consider also the different licenses of used third party libraries too!

Contribution

We welcome contribution, but unless you explicitly state otherwise: Any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without anyadditional terms or conditions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flashcontainer-0.0.3.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

flashcontainer-0.0.3-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file flashcontainer-0.0.3.tar.gz.

File metadata

  • Download URL: flashcontainer-0.0.3.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for flashcontainer-0.0.3.tar.gz
Algorithm Hash digest
SHA256 06a30c7e1349bcd656a2ed210b9c19e9203232aec7ea35ea39df6a3e907bcd18
MD5 ee55dfa00bd08a9e847c52bd4a81796d
BLAKE2b-256 2a5b4f85ec54a552f8386362f49f37c6d35ea30a43c69fd5ed37bb0623d2ae30

See more details on using hashes here.

File details

Details for the file flashcontainer-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for flashcontainer-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c253f48dab7c437287e6be7d1483c6894bcff3822cbb249ea74f50c8310ef626
MD5 dea1ba4ab3eeb9dd24fb90b45e7218bf
BLAKE2b-256 878433cf87f49e49a3b4b5576991332ef04b6579a029a9200cd66b621311834d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page