Crate stm32cubeprogrammer_sys

Source
Expand description

This crate provides low level bindings to the STM32CubeProgrammer API. The bindings are generated using bindgen and use the libloading crate to support dynamic loading of the CubeProgrammer API.

Re-exports§

pub use libloading;

Structs§

CubeProgrammer_API
bankSector
\struct bankSector. \brief This stucture indicates the sectors parameters.
bank_C
\struct bank_C \brief Get option bytes banks internal descriptions. \note STLINK and Bootloader interfaces have different addresses to access to option bytes registres.
bitCoefficient_C
\struct bitCoefficient_C. \brief This stucture indicates the coefficients to access to the adequate option bit.
bitValue_C
\struct bitValue_C. \brief This stucture describes the option Bit value.
bit_C
\struct bit_C. \brief This stucture will be filled by values which characterize the device’s option bytes. \note See product reference manual for more details.
canConnectParameters
\struct canConnectParameters \brief Specify the CAN connect parameters. \note Not all configurations are supported by STM32 Bootloader, such as CAN type is STANDARD and the filter should be always activated. \note Recommended CAN parameters : br=125000, mode=0, ide=0, rtr=0, fifo=0, fm=0, fs=1, fe=1, fbn=0
category_C
\struct category_C \brief Get option bytes banks categories descriptions.
debugConnectParameters
\struct debugConnectParameters \brief Get device characterization and specify connection parameters through ST-LINK interface.
deviceBank
\struct deviceBank. \brief This stucture defines the memory sectors for each bank.
deviceSector
\struct deviceSector \brief Get device sectors basic informations.
dfuConnectParameters
\struct dfuConnectParameters \brief Specify the USB DFU connect parameters.
dfuDeviceInfo
\struct dfuDeviceInfo \brief Get DFU device informations .
displayCallBacks
\struct displayCallBacks \brief Functions must be implemented to personalize the display of messages.
externalLoader
\struct externalLoader \brief Get external Loader parameters to launch the process of programming an external flash memory.
externalStorageInfo
\struct externalStorageInfo \brief Get external storage informations useful for external Loader.
fileData_C
\struct FileData_C \brief Get file required informations.
frequencies
\struct frequencies \brief Get supported frequencies for JTAG and SWD ineterfaces.
generalInf
\struct GeneralInf \brief Get device general informations.
i2cConnectParameters
\struct i2cConnectParameters \brief Specify the I2C connect parameters. \warning The Bootloader Slave address varies depending on the device (see AN2606). \note Not all configurations are supported by STM32 Bootloader, such as address in 7 bits form, analog filter: ENABLE, digital filter: DISABLE. \note Recommended I2C parameters : add=0x??, br=400, sm=1, am=0, af=1, df=0, dnf=0, rt=0, ft=0
peripheral_C
\struct peripheral_C \brief Get peripheral option bytes general informations.
segmentData_C
spiConnectParameters
\struct spiConnectParameters \brief Specify the SPI connect parameters. \note Recommended SPI parameters : baudrate=375, crcPol=7, direction=0, cpha=0, cpol=0, crc=0, firstBit=1, frameFormat=0, dataSize=1, mode=1, nss=1, nssPulse=1, delay=1
storageStructure
\struct storageStructure. \brief This stucture describes sotrage characterization.
usartConnectParameters
\struct usartConnectParameters \brief Specify the USART connect parameters.

Constants§

FLASH_BASE_ADDRESS
Standard base address of STM32 flash memory
PATH_API_LIBRARY_RELATIVE
PATH_LOADER_DIR_RELATIVE
RWE_ACCESS
RW_ACCESS
R_ACCESS
SRAM2A_BASE_ADDRESS_STM32WB1X
Base address of SRAM2A stm32wb1x (shared RAM containing FUS info)
SRAM2A_BASE_ADDRESS_STM32WB5X
Base address of SRAM2A stm32wb5x (shared RAM containing FUS info)
SRAM_BASE_ADDRESS
Standard base address of STM32 RAM
W_ACCESS
cubeProgrammerError_CUBEPROGRAMMER_ERROR_CHANGE_FREQ
Changing frequency problem
cubeProgrammerError_CUBEPROGRAMMER_ERROR_CONNECTION
Device connection error
cubeProgrammerError_CUBEPROGRAMMER_ERROR_ERASE_MEM
Memory erase failure
cubeProgrammerError_CUBEPROGRAMMER_ERROR_INTERFACE_NOT_SUPPORTED
Interface not supported or unimplemented on this plateform
cubeProgrammerError_CUBEPROGRAMMER_ERROR_NOT_CONNECTED
Device not connected
cubeProgrammerError_CUBEPROGRAMMER_ERROR_NOT_SUPPORTED
Operation not supported or unimplemented on this interface
cubeProgrammerError_CUBEPROGRAMMER_ERROR_NO_DEVICE
Device not found
cubeProgrammerError_CUBEPROGRAMMER_ERROR_NO_FILE
No such file
cubeProgrammerError_CUBEPROGRAMMER_ERROR_NO_MEM
Insufficient memory
cubeProgrammerError_CUBEPROGRAMMER_ERROR_NO_SECURITY
Refresh required
cubeProgrammerError_CUBEPROGRAMMER_ERROR_OTHER
Other error
cubeProgrammerError_CUBEPROGRAMMER_ERROR_RDP_ENABLED
RDP Enabled error
cubeProgrammerError_CUBEPROGRAMMER_ERROR_READ_MEM
Memory read failure
cubeProgrammerError_CUBEPROGRAMMER_ERROR_REFRESH_REQUIRED
Refresh required
cubeProgrammerError_CUBEPROGRAMMER_ERROR_UNSUPPORTED_FILE_FORMAT
File format not supported for this kind of device
cubeProgrammerError_CUBEPROGRAMMER_ERROR_WRITE_MEM
Memory write failure
cubeProgrammerError_CUBEPROGRAMMER_ERROR_WRONG_PARAM
Wrong parameters
cubeProgrammerError_CUBEPROGRAMMER_NO_ERROR
Success (no error)
cubeProgrammerVerbosityLevel_CUBEPROGRAMMER_NO_PROGRESS_BAR
no progress bar is printed in the output of the library
cubeProgrammerVerbosityLevel_CUBEPROGRAMMER_VER_LEVEL_DEBUG
debug and informational messages are printed
cubeProgrammerVerbosityLevel_CUBEPROGRAMMER_VER_LEVEL_NONE
no messages ever printed by the library
cubeProgrammerVerbosityLevel_CUBEPROGRAMMER_VER_LEVEL_ONE
warning, error and success messages are printed (default)
cubeProgrammerVerbosityLevel_CUBEPROGRAMMER_VER_LEVEL_TWO
error roots informational messages are printed
debugConnectMode_HOTPLUG_MODE
< Connect with hotplug mode, this option allows the user to connect to the target without halt or reset.
debugConnectMode_NORMAL_MODE
< Connect with normal mode, the target is reset then halted while the type of reset is selected using the debugResetMode.
debugConnectMode_POWER_DOWN_MODE
< Connect with power down mode.
debugConnectMode_PRE_RESET_MODE
< Connect with pre reset mode.
debugConnectMode_UNDER_RESET_MODE
< Connect with under reset mode, option allows the user to connect to the target using a reset vector catch before executing any instruction.
debugConnectMode_hwRstPulse_MODE
< Connect with hwRstPulse mode.
debugPort_JTAG
< JTAG debug port.
debugPort_SWD
< SWD debug port.
debugResetMode_CORE_RESET
< Apply a reset by the internal core peripheral.
debugResetMode_HARDWARE_RESET
< Apply a reset by the hardware.
debugResetMode_SOFTWARE_RESET
< Apply a reset by the software.
flashSize_Flash_Size_1KB
flashSize_Flash_Size_256KB
flashSize_Flash_Size_512KB
targetInterfaceType_CAN_INTERFACE
< CAN used as connection interface.
targetInterfaceType_I2C_INTERFACE
< I2C used as connection interface.
targetInterfaceType_JLINK_INTERFACE
< JLINK used as connection interface.
targetInterfaceType_SPI_INTERFACE
< SPI used as connection interface.
targetInterfaceType_STLINK_INTERFACE
< STLINK used as connection interface.
targetInterfaceType_USART_INTERFACE
< USART used as connection interface.
targetInterfaceType_USB_INTERFACE
< USB DFU used as connection interface.
usartFlowControl_HARDWARE
< Hardware flow control : RTS/CTS.
usartFlowControl_OFF
< No flow control.
usartFlowControl_SOFTWARE
< Software flow control : Transmission is started and stopped by sending special characters.
usartParity_EVEN
< Even parity bit.
usartParity_NONE
< No check parity.
usartParity_ODD
< Odd parity bit.
wbFunctionArguments_DO_NOT_VERIFY_DOWLOAD_FILE
wbFunctionArguments_FIRST_INSTALL_ACTIVE
wbFunctionArguments_FIRST_INSTALL_NOT_ACTIVE
wbFunctionArguments_START_STACK_ACTIVE
wbFunctionArguments_START_STACK_NOT_ACTIVE
wbFunctionArguments_VERIFY_FILE_DOWLOAD_FILE

Type Aliases§

cubeProgrammerError
\enum cubeProgrammerError \brief List of errors that can be occured.
cubeProgrammerVerbosityLevel
\enum cubeProgrammerVerbosityLevel \brief List of verbosity levels.
debugConnectMode
\enum debugConnectMode \brief Choose the appropriate mode for connection.
debugPort
\enum debugPort \brief Select the debug port interface for connection.
debugResetMode
\enum debugResetMode \brief Choose the way to apply a system reset.
flashSize
int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
int_least8_t
int_least16_t
int_least32_t
int_least64_t
intmax_t
targetInterfaceType
\enum targetInterfaceType \brief Indicates the supported interfaces.
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
uint_least8_t
uint_least16_t
uint_least32_t
uint_least64_t
uintmax_t
usartFlowControl
\enum usartFlowControl \brief UART Flow Control is a method for devices to communicate with each other over UART without the risk of losing data.
usartParity
\enum usartParity \brief The parity bit in the data frame of the USART communication tells the receiving device if there is any error in the data bits.
wbFunctionArguments