Initial snapshot: Aliro applet, harness, Nucleo NFC10A1 reader port
Three components, all bench-validated to varying depths: - applet/: CSA Aliro v1.0 Java Card applet for J3R180. AUTH0 + AUTH1 expedited-standard flow end-to-end green via PC/SC bench reader (aliro-bench-test). Userland AES-256-GCM and HMAC-SHA-256 layered on top of J3R180's primitives because the card lacks both natively. P-256 curve params seeded explicitly per J3R180's quirk. - harness/: Python orchestrator (aliro-trustgen, aliro-personalize, aliro-bench-test) for trust-bundle generation, card personalization via PersonalizationApplet, and PC/SC AUTH0+AUTH1 transactions. 126 pytest cases passing. - reader/STM32CubeExpansion_ALIRO_V1_0_0/: ST X-CUBE-ALIRO V1.0.0 with our NFC10A1 port (NUCLEO-U545RE-Q + X-NUCLEO-NFC10A1, ST25R200 shared with NFC09A1). nfc10-only/ project, NFC10A1 BSP shim, ALIRO_TRUST_OVERRIDE include into vendor's provisioning.c, and an ALIRO_APDU_TRACE wrapper around demoTransceiveBlocking. Boots, detects the J3R180, completes SELECT + AUTH0; AUTH1 currently fails with RFAL ERR_PROTO (0xB) — under investigation, see docs/plans/2026-04-20-nucleo-nfc10a1-port.md and bench-notes/. Excluded: x-cube-aliro.zip vendor archive, harness/.venv, build dirs, generated aliro_trust.h (contains private reader scalar), all PEMs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
This software component is provided to you as part of a software package and
|
||||
applicable license terms are in the Package_license file. If you received this
|
||||
software component outside of a package or without applicable license terms,
|
||||
the terms of the BSD-3-Clause license shall apply.
|
||||
You may obtain a copy of the BSD-3-Clause at:
|
||||
https://opensource.org/licenses/BSD-3-Clause
|
||||
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Release Notes for X-CUBE-NFC9 Projects</title>
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../../../_htmresc/mini-st.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="icon" type="image/x-icon" href="../../../_htmresc/favicon.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-lg-4">
|
||||
<center>
|
||||
<h1 id="release-notes-for-x-cube-nfc7-projects">Release Notes for X-CUBE-NFC9 BSP</h1>
|
||||
<p>Copyright © 2022 STMicroelectronics<br />
|
||||
</p>
|
||||
<a href="https://www.st.com" class="logo"><img src="../../../_htmresc/st_logo_2020.png" alt="ST logo" /></a>
|
||||
</center>
|
||||
<h1 id="purpose">Purpose</h1>
|
||||
<p>The X-CUBE-NFC9 software package is an expansion for STM32Cube. This software provides drivers running on STM32 for ST25R100 device.</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-lg-8">
|
||||
<h1 id="update-history">Update History</h1>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1" checked aria-hidden="true"> <label for="collapse-section1" aria-hidden="true">V1.0.0 / March 19th 2024</label>
|
||||
<div>
|
||||
<h2 id="main-changes">Main Changes</h2>
|
||||
<h3 id="maintenance-release">First Release</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th style="text-align: left;">Headline</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">First official release of BSP for X-NUCLEO-NFC09A1</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="sticky">
|
||||
<div class="columns">
|
||||
<div class="column" style="width:95%;">
|
||||
<p>For complete documentation on <strong>X-CUBE-NFC9</strong> , visit: <a href="https://www.st.com/en/embedded-software/x-cube-nfc7.html">www.st.com</a></p>
|
||||
</div><div class="column" style="width:5%;">
|
||||
<p><abbr title="Based on template cx566953 version 2.0">Info</abbr></p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,144 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file : nfc09a1.c
|
||||
* @author : MMY Application Team
|
||||
* @brief : This file provides NFC09A1 specific functions
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2023 STMicroelectronics.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under terms that can be found in the LICENSE file
|
||||
* in the root directory of this software component.
|
||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "nfc09a1.h"
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup NFC09A1
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
/* Private defines -----------------------------------------------------------*/
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/** @defgroup NFC09A1_Private_Variables
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** Array including all led pin and port information */
|
||||
static NFC09A1_Led_TypeDef NFC09A1_Led[6] = { { NFC09A1_LED1_PIN, NFC09A1_LED1_PIN_PORT } ,
|
||||
{ NFC09A1_LED2_PIN, NFC09A1_LED2_PIN_PORT } ,
|
||||
{ NFC09A1_LED3_PIN, NFC09A1_LED3_PIN_PORT } ,
|
||||
{ NFC09A1_LED4_PIN, NFC09A1_LED4_PIN_PORT } ,
|
||||
{ NFC09A1_LED5_PIN, NFC09A1_LED5_PIN_PORT } ,
|
||||
{ NFC09A1_LED6_PIN, NFC09A1_LED6_PIN_PORT } };
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* External variables --------------------------------------------------------*/
|
||||
/* Functions Definition ------------------------------------------------------*/
|
||||
/** @defgroup NFC09A1_Private_Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief This function initialize the GPIO to manage the Leds
|
||||
* through GPIO
|
||||
* @param None
|
||||
* @return None
|
||||
*/
|
||||
void NFC09A1_LED_Init(void)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
uint8_t led;
|
||||
|
||||
/* Enable all GPIO port clock for the Led pins */
|
||||
NFC09A1_ALLLED_GPIO_CLK_ENABLE();
|
||||
|
||||
/* Configure GPIO for all Led pins */
|
||||
for (led = 0; led < (sizeof(NFC09A1_Led) / sizeof(NFC09A1_Led_TypeDef)); led++)
|
||||
{
|
||||
GPIO_InitStruct.Pin = NFC09A1_Led[led].NFC09A1_LED_PIN;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(NFC09A1_Led[led].NFC09A1_LED_PIN_PORT, &GPIO_InitStruct);
|
||||
|
||||
/* Configure Led pin Output Level as off */
|
||||
HAL_GPIO_WritePin(NFC09A1_Led[led].NFC09A1_LED_PIN_PORT, NFC09A1_Led[led].NFC09A1_LED_PIN, GPIO_PIN_RESET);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DeInit LEDs.
|
||||
* @note Led DeInit does not disable the GPIO clock nor disable the Mfx
|
||||
* @param[in] Led : LED to be de-init.
|
||||
* @return None
|
||||
*/
|
||||
void NFC09A1_LED_DeInit(const NFC09A1_Led_E led)
|
||||
{
|
||||
GPIO_InitTypeDef gpio_init_structure;
|
||||
|
||||
/* Turn off LED */
|
||||
HAL_GPIO_WritePin(NFC09A1_Led[led].NFC09A1_LED_PIN_PORT, NFC09A1_Led[led].NFC09A1_LED_PIN, GPIO_PIN_RESET);
|
||||
/* DeInit the GPIO_LED pin */
|
||||
gpio_init_structure.Pin = NFC09A1_Led[led].NFC09A1_LED_PIN;
|
||||
HAL_GPIO_DeInit(NFC09A1_Led[led].NFC09A1_LED_PIN_PORT, gpio_init_structure.Pin);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function light on selected Led
|
||||
* @param[in] led : Led to be lit on
|
||||
* @return None
|
||||
*/
|
||||
void NFC09A1_LED_ON(const NFC09A1_Led_E led)
|
||||
{
|
||||
HAL_GPIO_WritePin(NFC09A1_Led[led].NFC09A1_LED_PIN_PORT, NFC09A1_Led[led].NFC09A1_LED_PIN, GPIO_PIN_SET);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function light off selected Led
|
||||
* @param[in] led : Led to be lit off
|
||||
* @return None
|
||||
*/
|
||||
void NFC09A1_LED_OFF(const NFC09A1_Led_E led)
|
||||
{
|
||||
HAL_GPIO_WritePin(NFC09A1_Led[led].NFC09A1_LED_PIN_PORT, NFC09A1_Led[led].NFC09A1_LED_PIN, GPIO_PIN_RESET);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Toggles the selected LED
|
||||
* @param[in] led : Specifies the Led to be toggled
|
||||
* @return None
|
||||
*/
|
||||
void NFC09A1_LED_Toggle(const NFC09A1_Led_E led)
|
||||
{
|
||||
HAL_GPIO_TogglePin(NFC09A1_Led[led].NFC09A1_LED_PIN_PORT, NFC09A1_Led[led].NFC09A1_LED_PIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file : nfc09a1.h
|
||||
* @author : MMY Application Team
|
||||
* @brief : This file contains definitions for the NFC09A1.c
|
||||
* board specific functions.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2023 STMicroelectronics.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under terms that can be found in the LICENSE file
|
||||
* in the root directory of this software component.
|
||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef NFC09A1_H
|
||||
#define NFC09A1_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "rfal_platform.h"
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup NFC09A1
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/** @defgroup NFC09A1_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief NFC09A1 Led enumerator definition
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
TF_LED = 0, /*!< Led Type F */
|
||||
TB_LED, /*!< Led Type B */
|
||||
TA_LED, /*!< Led Type A */
|
||||
TV_LED, /*!< Led Type V */
|
||||
AP2P_LED, /*!< Led Type P2P */
|
||||
TX_LED /*!< Led Field */
|
||||
}NFC09A1_Led_E;
|
||||
|
||||
/**
|
||||
* @brief NFC09A1 Led structure definition
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint16_t NFC09A1_LED_PIN;
|
||||
GPIO_TypeDef * NFC09A1_LED_PIN_PORT;
|
||||
}NFC09A1_Led_TypeDef;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported variables --------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
/** @defgroup NFC09A1_Exported_Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
void NFC09A1_LED_Init(void);
|
||||
void NFC09A1_LED_DeInit(const NFC09A1_Led_E led);
|
||||
void NFC09A1_LED_ON(const NFC09A1_Led_E led);
|
||||
void NFC09A1_LED_OFF(const NFC09A1_Led_E led);
|
||||
void NFC09A1_LED_Toggle(const NFC09A1_Led_E led);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* NFC09A1_H */
|
||||
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file : nfc09a1_conf_template.h
|
||||
* @author : MMY Application Team
|
||||
* @brief : This file contains definitions for the NFC6 components bus interfaces
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2023 STMicroelectronics.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under terms that can be found in the LICENSE file
|
||||
* in the root directory of this software component.
|
||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef NFC09A1_CONF_H_
|
||||
#define NFC09A1_CONF_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32l4xx_hal.h"
|
||||
|
||||
#if 0 /* Code not compiled, reserved for Doxygen */
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup NFC09A1
|
||||
* @{
|
||||
*/
|
||||
#endif /* MISRAC2012 4.4 : Avoid a section of code seems to be commented out */
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
#if 0 /* Code not compiled, reserved for Doxygen */
|
||||
/** @defgroup NFC09A1_Exported_Constants
|
||||
* @{
|
||||
*/
|
||||
#endif /* MISRAC2012 4.4 : Avoid a section of code seems to be commented out */
|
||||
|
||||
#define NFC09A1_LED1_PIN_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
#define NFC09A1_LED2_PIN_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
#define NFC09A1_LED3_PIN_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
#define NFC09A1_LED4_PIN_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE();
|
||||
#define NFC09A1_LED5_PIN_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE();
|
||||
#define NFC09A1_LED6_PIN_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
#define NFC09A1_LED1_PIN_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE();
|
||||
#define NFC09A1_LED2_PIN_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE();
|
||||
#define NFC09A1_LED3_PIN_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE();
|
||||
#define NFC09A1_LED4_PIN_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE();
|
||||
#define NFC09A1_LED5_PIN_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE();
|
||||
#define NFC09A1_LED6_PIN_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE();
|
||||
#define NFC09A1_LED1_PIN GPIO_PIN_1
|
||||
#define NFC09A1_LED1_PIN_PORT GPIOA
|
||||
#define NFC09A1_LED2_PIN GPIO_PIN_4
|
||||
#define NFC09A1_LED2_PIN_PORT GPIOA
|
||||
#define NFC09A1_LED3_PIN GPIO_PIN_0
|
||||
#define NFC09A1_LED3_PIN_PORT GPIOB
|
||||
#define NFC09A1_LED4_PIN GPIO_PIN_1
|
||||
#define NFC09A1_LED4_PIN_PORT GPIOC
|
||||
#define NFC09A1_LED5_PIN GPIO_PIN_0
|
||||
#define NFC09A1_LED5_PIN_PORT GPIOC
|
||||
#define NFC09A1_LED6_PIN GPIO_PIN_8
|
||||
#define NFC09A1_LED6_PIN_PORT GPIOA
|
||||
#if 0 /* Code not compiled, reserved for Doxygen */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#endif /* MISRAC2012 4.4 : Avoid a section of code seems to be commented out */
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#if 0 /* Code not compiled, reserved for Doxygen */
|
||||
/** @defgroup NFC09A1_Exported_Macro
|
||||
* @{
|
||||
*/
|
||||
#endif /* MISRAC2012 4.4 : Avoid a section of code seems to be commented out */
|
||||
|
||||
#define NFC09A1_ALLLED_GPIO_CLK_ENABLE() do{__HAL_RCC_GPIOA_CLK_ENABLE(); \
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE(); \
|
||||
__HAL_RCC_GPIOC_CLK_ENABLE(); \
|
||||
}while(0)
|
||||
|
||||
#define NFC09A1_ALLLED_GPIO_CLK_DISABLE() do{__HAL_RCC_GPIOA_CLK_DISABLE(); \
|
||||
__HAL_RCC_GPIOB_CLK_DISABLE(); \
|
||||
__HAL_RCC_GPIOC_CLK_DISABLE(); \
|
||||
}while(0)
|
||||
#if 0 /* Code not compiled, reserved for Doxygen */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#endif /* MISRAC2012 4.4 : Avoid a section of code seems to be commented out */
|
||||
/* Exported variables --------------------------------------------------------*/
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
#if 0 /* Code not compiled, reserved for Doxygen */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#endif /* MISRAC2012 4.4 : Avoid a section of code seems to be commented out */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* NFC09A1_CONF_H_ */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user