Skip to content

Support for compilers without 64-bit integers #607

@THQ-WIFA

Description

@THQ-WIFA

Is your feature request related to a problem? Please describe.
I have an (old) compiler/architecture that does not provide support for 64-bit integers.
I.e., int64_t and uint64_t are not provided.

Describe the solution you'd like
I would like to introduce the configuration option TRICE_64_BIT_SUPPORT that defaults to 1, but can be explicitly set to 0 in triceConfig.h.

Describe alternatives you've considered
I tried to check for a related C-standard-provided macro from stdint.h like UINT64_MAX, but apparently, you cant't rely on #ifdef to check that. (At least for me, my C++ compiler accepts UINT32_MAX and provides the correct value. Yet, the condition #ifdef UINT32_MAX is not matched.)

Additional context
Relevant code:

  • All variations of trice64(...) in triceOn.h and trice.c
  • aDouble(...) in trice.h (due to uint64_t usage)
  • #include "trice64.h" in trice.h
  • triceConfig.h where the default definition has to reside.
    Note that trice64[...].c/.h are considered irrelevant. These should not be included/compiled when 64 bits are not supported.

Proposal
I will provide an appropriate pull request soon.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions