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

HAL refactor and added Microchip Harmony SPI HAL support #251

Merged
merged 5 commits into from
Jan 20, 2023

Conversation

dgarske
Copy link
Contributor

@dgarske dgarske commented Jan 9, 2023

  • Add support for Microchip Harmony MPLAB X SPI driver in wolfTPM.
  • HAL refactor and documentation improvements.
    • Move example HAL implementations into new hal directory.
    • Include the example HAL in the library when building.
    • Updated HAL IO documentation.

@dgarske dgarske self-assigned this Jan 9, 2023
@dgarske dgarske changed the title Add support for Microchip Harmony MPLAB X SPI driver in wolfTPM HAL refactor and added Microchip Harmony SPI HAL support Jan 18, 2023
…ntations into new `hal` directory. Include the example HAL in the library when building. Updated HAL IO documentation.
@dgarske dgarske removed their assignment Jan 19, 2023
@jpbland1
Copy link
Contributor

I tried to configure with ./configure --enable-hal and when I ran make I got

john@john-XPS-9320:~/Documents/wolfTPM$ make
make -j17  all-am
make[1]: Entering directory '/home/john/Documents/wolfTPM'
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash '/home/john/Documents/wolfTPM/build-aux/missing' autoheader)
  CC       hal/src_libwolftpm_la-tpm_io.lo
  CC       hal/src_libwolftpm_la-tpm_io_atmel.lo
  CC       hal/src_libwolftpm_la-tpm_io_barebox.lo
  CC       hal/src_libwolftpm_la-tpm_io_linux.lo
  CC       hal/src_libwolftpm_la-tpm_io_infineon.lo
  CC       hal/src_libwolftpm_la-tpm_io_st.lo
  CC       hal/src_libwolftpm_la-tpm_io_microchip.lo
  CC       hal/src_libwolftpm_la-tpm_io_qnx.lo
  CC       hal/src_libwolftpm_la-tpm_io_xilinx.lo
rm -f src/stamp-h1
touch src/config.h.in
cd . && /bin/bash ./config.status src/config.h
hal/tpm_io.c:50:10: fatal error: examples/tpm_io_linux.c: No such file or directory
   50 | #include "examples/tpm_io_linux.c"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:2073: hal/src_libwolftpm_la-tpm_io.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
config.status: creating src/config.h
make[1]: Leaving directory '/home/john/Documents/wolfTPM'
make: *** [Makefile:1406: all] Error 2

I think it needs to be #include "tpm_io_linux.c" since it's been moved to the same hal directory

@dgarske
Copy link
Contributor Author

dgarske commented Jan 20, 2023

I tried to configure with ./configure --enable-hal and when I ran make I got

john@john-XPS-9320:~/Documents/wolfTPM$ make
make -j17  all-am
make[1]: Entering directory '/home/john/Documents/wolfTPM'
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash '/home/john/Documents/wolfTPM/build-aux/missing' autoheader)
  CC       hal/src_libwolftpm_la-tpm_io.lo
  CC       hal/src_libwolftpm_la-tpm_io_atmel.lo
  CC       hal/src_libwolftpm_la-tpm_io_barebox.lo
  CC       hal/src_libwolftpm_la-tpm_io_linux.lo
  CC       hal/src_libwolftpm_la-tpm_io_infineon.lo
  CC       hal/src_libwolftpm_la-tpm_io_st.lo
  CC       hal/src_libwolftpm_la-tpm_io_microchip.lo
  CC       hal/src_libwolftpm_la-tpm_io_qnx.lo
  CC       hal/src_libwolftpm_la-tpm_io_xilinx.lo
rm -f src/stamp-h1
touch src/config.h.in
cd . && /bin/bash ./config.status src/config.h
hal/tpm_io.c:50:10: fatal error: examples/tpm_io_linux.c: No such file or directory
   50 | #include "examples/tpm_io_linux.c"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:2073: hal/src_libwolftpm_la-tpm_io.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
config.status: creating src/config.h
make[1]: Leaving directory '/home/john/Documents/wolfTPM'
make: *** [Makefile:1406: all] Error 2

I think it needs to be #include "tpm_io_linux.c" since it's been moved to the same hal directory

Thanks John B. Fixes pushed. I had previously installed those examples into /usr/local so I wasn't catching them! Reminds me that we need to add some GitHub actions... I've put that on my list for a future PR.

@jpbland1 jpbland1 merged commit b4e439a into wolfSSL:master Jan 20, 2023
dgarske added a commit to dgarske/wolfTPM that referenced this pull request Feb 3, 2023
…P_HARMONY`. Avoids confusion with the TPM 2.0 module ATTPM from Microchip. Now enabled with `WOLFTPM_MICROCHIP` and provides backwards compatibility for `WOLFTPM_MCHP`. The new `WOLFTPM_MICROCHIP` has not been released (was added in PR wolfSSL#251).
@dgarske dgarske deleted the microchip_harmony branch June 28, 2023 23:11
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.

2 participants