fpvgcc


Namefpvgcc JSON
Version 1.1.2 PyPI version JSON
download
home_pagehttps://github.com/ebs-universe/fpv-gcc
SummaryAnalysing code footprint on embedded microcontrollers using GCC generated Map files
upload_time2024-09-07 11:37:38
maintainerNone
docs_urlNone
authorChintalagiri Shashank
requires_python!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7
licenseNone
keywords utilities
VCS
bugtrack_url
requirements six prettytable sphinx sphinx-argparse
Travis-CI
coveralls test coverage No coveralls.
            

.. image:: https://img.shields.io/pypi/v/fpvgcc.svg?logo=pypi
    :target: https://pypi.org/project/fpvgcc

.. image:: https://img.shields.io/pypi/pyversions/fpvgcc.svg?logo=pypi
    :target: https://pypi.org/project/fpvgcc

.. image:: https://img.shields.io/travis/ebs-universe/fpv-gcc.svg?logo=travis
    :target: https://travis-ci.org/ebs-universe/fpv-gcc

.. image:: https://img.shields.io/coveralls/github/ebs-universe/fpv-gcc.svg?logo=coveralls
    :target: https://coveralls.io/github/ebs-universe/fpv-gcc

.. image:: https://img.shields.io/requires/github/ebs-universe/fpv-gcc.svg
    :target: https://requires.io/github/ebs-universe/fpv-gcc/requirements

.. image:: https://img.shields.io/pypi/l/fpvgcc.svg
    :target: https://www.gnu.org/licenses/gpl-3.0.en.html



.. inclusion-marker-do-not-remove

Deprecation Notice
------------------

This (``v1.1.3``) will be the final release of the 1.x series of ``fpvgcc``. 
The tool has evolved to the extent possible within the naive framework 
it was originally built on, and a number of open issues cannot be resolved
without refactoring big chunks of the code. ``fpvgcc v1.1.2`` is essentially 
functional and will remain available in its present form.

Though I have been unable to find time to maintain and build up the tool 
after the original releases, I hope it has been useful to the few people 
who've used it. 

A number of other tools are now available which do a similar job. While I 
have minor qualms about each of those tools, such qualms are mostly 
subjective and aesthetic objections. I am forced to admit that ``fpvgcc`` 
would never have been written if some of those tools had existed at the 
time of its writing.

I am considering starting work on a 2.x series of ``fpvgcc``, which will 
likely be a page one rewrite. The following are the main planned changes:

    - Reduce the number of assumptions made when parsing map files. For example, 
      allow multiple object files with the same name. 
    - Use polars or something suitably performant to store the parsed map 
      information.
    - Add a minimal fastapi interface to be able to provide a GUI using a 
      webview or similar.
    - Remove python 2 support. Minimum python version required will probably 
      be py37 or py38.

I expect it will be some time before 2.x will be usable. If and when 
development starts, it will be available in the v2 branch of this 
repository. When v2.x reaches feature parity with v1.1.2, it will be 
merged in to ``main`` and python packages for fpvgcc 2.x will be published 
to pypi.

Please feel free to write to me at ``shashank at chintal dot in`` if any 
of the following apply to you:

    - you have been using ``fpvgcc`` or are maintaining a public or private 
      fork and have any concerns regarding the deprecation or plans for 2.x
    - you wish to take over the 1.x codebase and keep it functional and 
      available in the future  
    - you have any suggestions for features to include in 2.x 
    - you wish to contribute to the development of 2.x  


Introduction
------------

``fpvgcc`` is a python script/package to help analyse code footprint on
embedded microcontrollers using GCC generated Map files.

This module uses information contained within ``.map`` files generated by
gcc (when invoked with ``-Wl,-Map,out.map``), to provide easily
readable summaries of static memory usage at various levels of the code
hierarchy. This package generates no information that isn't already contained
within the ``.map`` file.

The provided outputs can be used to gain insight into the relative sizes of
included code, and aid in prioritizing static memory optimization for very
low memory platforms. Some provided functionality may also deliver minor
usability improvements to the workflow involved in parsing though generated
assembly listings.


.. warning::
    This package does not attempt to perform any kind of dynamic analysis.
    All memory usage reported refers only to **static** memory usage. This
    means the size of actual functions and global variables which are
    instantiated in the C code itself.

    Anything on the call stack, such as function locals, will **not** be
    accounted for. Similarly, anything in the heap which is allocated at
    runtime using ``malloc`` or similar will **not** be accounted for.

    Due to this, the utility of this module is likely limited to code
    written for highly memory constrained embedded microcontrollers, where
    dynamic memory allocation is anyway avoided when possible.

Known Issues
------------

This script was first written based on the format of mapfiles
generated by ``msp430-elf-gcc, v4.9.1``. Over time, it was modifed to
accept elements found in mapfiles generated by later versions and gcc-based
toolchains for other platforms.

Still, remember that the file parsing was implemented by observing the
content of real mapfiles, and not based on a file format specification.
Even with toolchains it was written to support, there are large sections
of the file that are not actually used. Due to this, the outputs generated
are not always accurate. Various boundary conditions result in minor errors
in size reporting.

The following more serious issues are known. They should be fixed at some
point, but for the moment I've chosen to work around them :

    - Having two C filenames with the same name (or generating the same
      obj name) in your tree will cause parsing to break on some
      platforms / toolchains.


Project Information
-------------------

The latest version of the documentation, including installation, usage, and
API/developer notes can be found at
`ReadTheDocs <https://fpv-gcc.readthedocs.io/en/latest/index.html>`_.

The latest version of the sources can be found at
`GitHub <https://github.com/ebs-universe/fpv-gcc>`_. Please use GitHub's features
to report bugs, request features, or submit pull/merge requests.

The principle author for ``fpvgcc`` is Chintalagiri Shashank. The author can
be contacted if necessary via the information on the
`author's github profile <https://github.com/chintal>`_ . See the AUTHORS file
for a full list of collaborators and/or contributing authors, if any.

``fpvgcc`` is distributed under the terms of the
`GPLv3 license <https://www.gnu.org/licenses/gpl-3.0-standalone.html>`_ .
A copy of the text of the license is included along with the sources.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ebs-universe/fpv-gcc",
    "name": "fpvgcc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7",
    "maintainer_email": null,
    "keywords": "utilities",
    "author": "Chintalagiri Shashank",
    "author_email": "shashank@chintal.in",
    "download_url": "https://files.pythonhosted.org/packages/e5/03/bbe89be88b39606895d567109ba98e0be4bffea36007b3028e131af5b614/fpvgcc-1.1.2.tar.gz",
    "platform": "any",
    "description": "\n\n.. image:: https://img.shields.io/pypi/v/fpvgcc.svg?logo=pypi\n    :target: https://pypi.org/project/fpvgcc\n\n.. image:: https://img.shields.io/pypi/pyversions/fpvgcc.svg?logo=pypi\n    :target: https://pypi.org/project/fpvgcc\n\n.. image:: https://img.shields.io/travis/ebs-universe/fpv-gcc.svg?logo=travis\n    :target: https://travis-ci.org/ebs-universe/fpv-gcc\n\n.. image:: https://img.shields.io/coveralls/github/ebs-universe/fpv-gcc.svg?logo=coveralls\n    :target: https://coveralls.io/github/ebs-universe/fpv-gcc\n\n.. image:: https://img.shields.io/requires/github/ebs-universe/fpv-gcc.svg\n    :target: https://requires.io/github/ebs-universe/fpv-gcc/requirements\n\n.. image:: https://img.shields.io/pypi/l/fpvgcc.svg\n    :target: https://www.gnu.org/licenses/gpl-3.0.en.html\n\n\n\n.. inclusion-marker-do-not-remove\n\nDeprecation Notice\n------------------\n\nThis (``v1.1.3``) will be the final release of the 1.x series of ``fpvgcc``. \nThe tool has evolved to the extent possible within the naive framework \nit was originally built on, and a number of open issues cannot be resolved\nwithout refactoring big chunks of the code. ``fpvgcc v1.1.2`` is essentially \nfunctional and will remain available in its present form.\n\nThough I have been unable to find time to maintain and build up the tool \nafter the original releases, I hope it has been useful to the few people \nwho've used it. \n\nA number of other tools are now available which do a similar job. While I \nhave minor qualms about each of those tools, such qualms are mostly \nsubjective and aesthetic objections. I am forced to admit that ``fpvgcc`` \nwould never have been written if some of those tools had existed at the \ntime of its writing.\n\nI am considering starting work on a 2.x series of ``fpvgcc``, which will \nlikely be a page one rewrite. The following are the main planned changes:\n\n    - Reduce the number of assumptions made when parsing map files. For example, \n      allow multiple object files with the same name. \n    - Use polars or something suitably performant to store the parsed map \n      information.\n    - Add a minimal fastapi interface to be able to provide a GUI using a \n      webview or similar.\n    - Remove python 2 support. Minimum python version required will probably \n      be py37 or py38.\n\nI expect it will be some time before 2.x will be usable. If and when \ndevelopment starts, it will be available in the v2 branch of this \nrepository. When v2.x reaches feature parity with v1.1.2, it will be \nmerged in to ``main`` and python packages for fpvgcc 2.x will be published \nto pypi.\n\nPlease feel free to write to me at ``shashank at chintal dot in`` if any \nof the following apply to you:\n\n    - you have been using ``fpvgcc`` or are maintaining a public or private \n      fork and have any concerns regarding the deprecation or plans for 2.x\n    - you wish to take over the 1.x codebase and keep it functional and \n      available in the future  \n    - you have any suggestions for features to include in 2.x \n    - you wish to contribute to the development of 2.x  \n\n\nIntroduction\n------------\n\n``fpvgcc`` is a python script/package to help analyse code footprint on\nembedded microcontrollers using GCC generated Map files.\n\nThis module uses information contained within ``.map`` files generated by\ngcc (when invoked with ``-Wl,-Map,out.map``), to provide easily\nreadable summaries of static memory usage at various levels of the code\nhierarchy. This package generates no information that isn't already contained\nwithin the ``.map`` file.\n\nThe provided outputs can be used to gain insight into the relative sizes of\nincluded code, and aid in prioritizing static memory optimization for very\nlow memory platforms. Some provided functionality may also deliver minor\nusability improvements to the workflow involved in parsing though generated\nassembly listings.\n\n\n.. warning::\n    This package does not attempt to perform any kind of dynamic analysis.\n    All memory usage reported refers only to **static** memory usage. This\n    means the size of actual functions and global variables which are\n    instantiated in the C code itself.\n\n    Anything on the call stack, such as function locals, will **not** be\n    accounted for. Similarly, anything in the heap which is allocated at\n    runtime using ``malloc`` or similar will **not** be accounted for.\n\n    Due to this, the utility of this module is likely limited to code\n    written for highly memory constrained embedded microcontrollers, where\n    dynamic memory allocation is anyway avoided when possible.\n\nKnown Issues\n------------\n\nThis script was first written based on the format of mapfiles\ngenerated by ``msp430-elf-gcc, v4.9.1``. Over time, it was modifed to\naccept elements found in mapfiles generated by later versions and gcc-based\ntoolchains for other platforms.\n\nStill, remember that the file parsing was implemented by observing the\ncontent of real mapfiles, and not based on a file format specification.\nEven with toolchains it was written to support, there are large sections\nof the file that are not actually used. Due to this, the outputs generated\nare not always accurate. Various boundary conditions result in minor errors\nin size reporting.\n\nThe following more serious issues are known. They should be fixed at some\npoint, but for the moment I've chosen to work around them :\n\n    - Having two C filenames with the same name (or generating the same\n      obj name) in your tree will cause parsing to break on some\n      platforms / toolchains.\n\n\nProject Information\n-------------------\n\nThe latest version of the documentation, including installation, usage, and\nAPI/developer notes can be found at\n`ReadTheDocs <https://fpv-gcc.readthedocs.io/en/latest/index.html>`_.\n\nThe latest version of the sources can be found at\n`GitHub <https://github.com/ebs-universe/fpv-gcc>`_. Please use GitHub's features\nto report bugs, request features, or submit pull/merge requests.\n\nThe principle author for ``fpvgcc`` is Chintalagiri Shashank. The author can\nbe contacted if necessary via the information on the\n`author's github profile <https://github.com/chintal>`_ . See the AUTHORS file\nfor a full list of collaborators and/or contributing authors, if any.\n\n``fpvgcc`` is distributed under the terms of the\n`GPLv3 license <https://www.gnu.org/licenses/gpl-3.0-standalone.html>`_ .\nA copy of the text of the license is included along with the sources.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Analysing code footprint on embedded microcontrollers using GCC generated Map files",
    "version": "1.1.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/ebs-universe/fpv-gcc/issues",
        "Documentation": "https://fpvgcc.readthedocs.io/en/latest",
        "Homepage": "https://github.com/ebs-universe/fpv-gcc",
        "Source Repository": "https://github.com/ebs-universe/fpv-gcc"
    },
    "split_keywords": [
        "utilities"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e503bbe89be88b39606895d567109ba98e0be4bffea36007b3028e131af5b614",
                "md5": "833223b2117609ff434f38f237a9a96a",
                "sha256": "942c1a5f0d21fa8202a5fadb053f0464de1daf5d2edd2b107b2c399e267d3c5a"
            },
            "downloads": -1,
            "filename": "fpvgcc-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "833223b2117609ff434f38f237a9a96a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7",
            "size": 211452,
            "upload_time": "2024-09-07T11:37:38",
            "upload_time_iso_8601": "2024-09-07T11:37:38.879146Z",
            "url": "https://files.pythonhosted.org/packages/e5/03/bbe89be88b39606895d567109ba98e0be4bffea36007b3028e131af5b614/fpvgcc-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-07 11:37:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ebs-universe",
    "github_project": "fpv-gcc",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "six",
            "specs": []
        },
        {
            "name": "prettytable",
            "specs": []
        },
        {
            "name": "sphinx",
            "specs": []
        },
        {
            "name": "sphinx-argparse",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "fpvgcc"
}
        
Elapsed time: 0.35652s