mirror of https://github.com/wolfSSL/wolfBoot.git
Fixes for external SPI build options.
parent
0deaef8c00
commit
6ed1e5ca5f
|
@ -36,6 +36,8 @@
|
|||
#include <stdint.h>
|
||||
|
||||
uint16_t spi_flash_probe(void);
|
||||
void spi_release(void);
|
||||
|
||||
void spi_flash_sector_erase(uint32_t address);
|
||||
int spi_flash_read(uint32_t address, void *data, int len);
|
||||
int spi_flash_write(uint32_t address, const void *data, int len);
|
||||
|
@ -43,6 +45,7 @@ int spi_flash_write(uint32_t address, const void *data, int len);
|
|||
#else
|
||||
|
||||
#define spi_flash_probe() do{}while(0)
|
||||
#define spi_release() do{}while(0)
|
||||
|
||||
#endif /* SPI_FLASH */
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ static int wolfBoot_verify_signature(uint8_t *hash, uint8_t *sig)
|
|||
}
|
||||
#endif /* WOLFBOOT_SIGN_RSA2048 */
|
||||
|
||||
static uint8_t get_header_ext(struct wolfBoot_image *img, uint16_t type, uint8_t **ptr);
|
||||
static uint16_t get_header_ext(struct wolfBoot_image *img, uint16_t type, uint8_t **ptr);
|
||||
|
||||
static uint16_t get_header(struct wolfBoot_image *img, uint16_t type, uint8_t **ptr)
|
||||
{
|
||||
|
|
|
@ -133,7 +133,7 @@ static int spi_flash_write_page(uint32_t address, const void *data, int len)
|
|||
static int spi_flash_write_sb(uint32_t address, const void *data, int len)
|
||||
{
|
||||
const uint8_t *buf = data;
|
||||
const uint8_t verify;
|
||||
uint8_t verify = 0;
|
||||
int j = 0;
|
||||
wait_busy();
|
||||
if (len < 1)
|
||||
|
|
|
@ -33,13 +33,6 @@
|
|||
|
||||
#ifdef PLATFORM_stm32f4
|
||||
|
||||
#ifdef SPI_FLASH
|
||||
extern void spi_release(void);
|
||||
#else
|
||||
#define spi_release() do{}while(0)
|
||||
#endif
|
||||
|
||||
|
||||
#define UART1 (0x40011000)
|
||||
|
||||
#define UART1_SR (*(volatile uint32_t *)(UART1))
|
||||
|
|
Loading…
Reference in New Issue