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§
- Cube
Programmer_ API - bank
Sector - \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.
- canConnect
Parameters - \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.
- debug
Connect Parameters - \struct debugConnectParameters \brief Get device characterization and specify connection parameters through ST-LINK interface.
- device
Bank - \struct deviceBank. \brief This stucture defines the memory sectors for each bank.
- device
Sector - \struct deviceSector \brief Get device sectors basic informations.
- dfuConnect
Parameters - \struct dfuConnectParameters \brief Specify the USB DFU connect parameters.
- dfuDevice
Info - \struct dfuDeviceInfo \brief Get DFU device informations .
- display
Call Backs - \struct displayCallBacks \brief Functions must be implemented to personalize the display of messages.
- external
Loader - \struct externalLoader \brief Get external Loader parameters to launch the process of programming an external flash memory.
- external
Storage Info - \struct externalStorageInfo \brief Get external storage informations useful for external Loader.
- file
Data_ C - \struct FileData_C \brief Get file required informations.
- frequencies
- \struct frequencies \brief Get supported frequencies for JTAG and SWD ineterfaces.
- general
Inf - \struct GeneralInf \brief Get device general informations.
- i2cConnect
Parameters - \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.
- segment
Data_ C - spiConnect
Parameters - \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
- storage
Structure - \struct storageStructure. \brief This stucture describes sotrage characterization.
- usart
Connect Parameters - \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_ STM32W B1X - Base address of SRAM2A stm32wb1x (shared RAM containing FUS info)
- SRAM2A_
BASE_ ADDRESS_ STM32W B5X - Base address of SRAM2A stm32wb5x (shared RAM containing FUS info)
- SRAM_
BASE_ ADDRESS - Standard base address of STM32 RAM
- W_
ACCESS - cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ CHANGE_ FREQ - Changing frequency problem
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ CONNECTION - Device connection error
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ ERASE_ MEM - Memory erase failure
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ INTERFACE_ NOT_ SUPPORTED - Interface not supported or unimplemented on this plateform
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ NOT_ CONNECTED - Device not connected
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ NOT_ SUPPORTED - Operation not supported or unimplemented on this interface
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ NO_ DEVICE - Device not found
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ NO_ FILE - No such file
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ NO_ MEM - Insufficient memory
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ NO_ SECURITY - Refresh required
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ OTHER - Other error
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ RDP_ ENABLED - RDP Enabled error
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ READ_ MEM - Memory read failure
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ REFRESH_ REQUIRED - Refresh required
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ UNSUPPORTED_ FILE_ FORMAT - File format not supported for this kind of device
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ WRITE_ MEM - Memory write failure
- cube
Programmer Error_ CUBEPROGRAMMER_ ERROR_ WRONG_ PARAM - Wrong parameters
- cube
Programmer Error_ CUBEPROGRAMMER_ NO_ ERROR - Success (no error)
- cube
Programmer Verbosity Level_ CUBEPROGRAMMER_ NO_ PROGRESS_ BAR - no progress bar is printed in the output of the library
- cube
Programmer Verbosity Level_ CUBEPROGRAMMER_ VER_ LEVEL_ DEBUG - debug and informational messages are printed
- cube
Programmer Verbosity Level_ CUBEPROGRAMMER_ VER_ LEVEL_ NONE - no messages ever printed by the library
- cube
Programmer Verbosity Level_ CUBEPROGRAMMER_ VER_ LEVEL_ ONE - warning, error and success messages are printed (default)
- cube
Programmer Verbosity Level_ CUBEPROGRAMMER_ VER_ LEVEL_ TWO - error roots informational messages are printed
- debug
Connect Mode_ HOTPLUG_ MODE - < Connect with hotplug mode, this option allows the user to connect to the target without halt or reset.
- debug
Connect Mode_ NORMAL_ MODE - < Connect with normal mode, the target is reset then halted while the type of reset is selected using the debugResetMode.
- debug
Connect Mode_ POWER_ DOWN_ MODE - < Connect with power down mode.
- debug
Connect Mode_ PRE_ RESET_ MODE - < Connect with pre reset mode.
- debug
Connect Mode_ 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.
- debug
Connect Mode_ hwRst Pulse_ MODE - < Connect with hwRstPulse mode.
- debug
Port_ JTAG - < JTAG debug port.
- debug
Port_ SWD - < SWD debug port.
- debug
Reset Mode_ CORE_ RESET - < Apply a reset by the internal core peripheral.
- debug
Reset Mode_ HARDWARE_ RESET - < Apply a reset by the hardware.
- debug
Reset Mode_ SOFTWARE_ RESET - < Apply a reset by the software.
- flash
Size_ Flash_ Size_ 1KB - flash
Size_ Flash_ Size_ 256KB - flash
Size_ Flash_ Size_ 512KB - target
Interface Type_ CAN_ INTERFACE - < CAN used as connection interface.
- target
Interface Type_ I2C_ INTERFACE - < I2C used as connection interface.
- target
Interface Type_ JLINK_ INTERFACE - < JLINK used as connection interface.
- target
Interface Type_ SPI_ INTERFACE - < SPI used as connection interface.
- target
Interface Type_ STLINK_ INTERFACE - < STLINK used as connection interface.
- target
Interface Type_ USART_ INTERFACE - < USART used as connection interface.
- target
Interface Type_ USB_ INTERFACE - < USB DFU used as connection interface.
- usart
Flow Control_ HARDWARE - < Hardware flow control : RTS/CTS.
- usart
Flow Control_ OFF - < No flow control.
- usart
Flow Control_ SOFTWARE - < Software flow control : Transmission is started and stopped by sending special characters.
- usart
Parity_ EVEN - < Even parity bit.
- usart
Parity_ NONE - < No check parity.
- usart
Parity_ ODD - < Odd parity bit.
- wbFunction
Arguments_ DO_ NOT_ VERIFY_ DOWLOAD_ FILE - wbFunction
Arguments_ FIRST_ INSTALL_ ACTIVE - wbFunction
Arguments_ FIRST_ INSTALL_ NOT_ ACTIVE - wbFunction
Arguments_ START_ STACK_ ACTIVE - wbFunction
Arguments_ START_ STACK_ NOT_ ACTIVE - wbFunction
Arguments_ VERIFY_ FILE_ DOWLOAD_ FILE
Type Aliases§
- cube
Programmer Error - \enum cubeProgrammerError \brief List of errors that can be occured.
- cube
Programmer Verbosity Level - \enum cubeProgrammerVerbosityLevel \brief List of verbosity levels.
- debug
Connect Mode - \enum debugConnectMode \brief Choose the appropriate mode for connection.
- debug
Port - \enum debugPort \brief Select the debug port interface for connection.
- debug
Reset Mode - \enum debugResetMode \brief Choose the way to apply a system reset.
- flash
Size - 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 - target
Interface Type - \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 - usart
Flow Control - \enum usartFlowControl \brief UART Flow Control is a method for devices to communicate with each other over UART without the risk of losing data.
- usart
Parity - \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.
- wbFunction
Arguments