Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pror4 bga + panel #20

Merged
merged 3 commits into from
Jun 22, 2021
Merged

Pror4 bga + panel #20

merged 3 commits into from
Jun 22, 2021

Conversation

kliment
Copy link
Collaborator

@kliment kliment commented Jun 16, 2021

No description provided.

szszszsz added a commit to Nitrokey/nitrokey-pro-firmware that referenced this pull request Jun 18, 2021
Adds better hardware configuration, contained in platform_config.h.
If the firmware detects different hardware revision that it was built
for, it enters the bootloader mode.
Contains other improvements and discoveries, most important listed below.
This firmware was tested on both HW rev 3 and 4.

Tested on Fedora Linux against:
- libnitrokey test suite (libnitrokey v3.6-15-g871a1c9)
- GNUK test suite (Nitrokey Start: RTM.10-20-g64f8671)
- GnuPG 2.2.20 manual tests
- OpenSC 0.20 manual tests

Connected: Nitrokey/nitrokey-pro-hardware#20
Fixes #82

Squashed commit of the following:

    Blink debug LEDs in the development build

    Boot to the bootloader if flashed firmware does not suit to the hardware

    Correct compiler flags
    The -fdata-sections flag influences .text sections from the core drivers,
    which renders the CCID interface not working, and possibly introduced some other issues,
    despite having --gc-sections enabled only for the debug build.
    The -ffunction-sections flag seems to work fine otherwise. Leaving only for the debug builds for now.

    Debug: prepare test firmware with boot stages LED signalization
    Stage 1: boot start, before smart card configuration, no LED
    Stage 2: starting smart card configuration, awaiting for ATR, red LED blinking
    Stage 3: after smart card configuration, awaiting for USB configuration and connected state, blue/green LED flashes constantly
    Stage 4: after USB configration, boot process complete, blue/green LED blinking

    Debug: add ocd helpers for the development

    Introduce debug build with BUILD_DEBUG=1 switch
    Removing unused code sections results in a linking error, hence part of the code has to be discarded.
    To be confirmed, whether this changes the runtime behavior for the release version, and enable there as well.
    GC of the unused code is required for the development build, which does not fit the flash size otherwise.

    Mentioned error message:
    /gcc-arm-none-eabi-8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../ar
    m-none-eabi/bin/ld: section .ARM.exidx LMA [000000000800b9cc,000000000800b9d3] overlaps section .data LMA [00000000080
    0b9cc,000000000800c02b]
@kliment kliment changed the base branch from master to rev4 June 22, 2021 09:06
@kliment kliment merged commit 6bfbde9 into Nitrokey:rev4 Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant