arm-trusted-firmware/plat/st/common/include/stm32cubeprogrammer.h
Patrick Delaunay afad5214a7 feat(plat/st): add STM32CubeProgrammer support on USB
Add a file to support over USB the STMicroelectronics tool
STM32CubeProgrammer in BL2 for STM32MP15x platform.

This tools is based on DFU stack.

Change-Id: I48a8f772cb0e9b8be24c06847f724f0470c0f917
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-10-29 16:43:49 +02:00

28 lines
572 B
C

/*
* Copyright (c) 2021, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef STM32CUBEPROGRAMMER_H
#define STM32CUBEPROGRAMMER_H
#include <stdint.h>
#include <usb_dfu.h>
/* Phase definition */
#define PHASE_FLASHLAYOUT 0U
#define PHASE_SSBL 3U
#define PHASE_CMD 0xF1U
#define PHASE_RESET 0xFFU
/* Functions provided by plat */
uint8_t usb_dfu_get_phase(uint8_t alt);
int stm32cubeprog_usb_load(struct usb_handle *usb_core_handle,
uintptr_t ssbl_base,
size_t ssbl_len);
#endif /* STM32CUBEPROGRAMMER_H */