Merge commit 'e067fcbe30' as 'stm32f103c8t6-bootloader'

This commit is contained in:
fruchti 2021-04-04 19:50:04 +02:00
commit 3ca6ea3e9e
34 changed files with 15445 additions and 0 deletions

View file

@ -0,0 +1,22 @@
#pragma once
#include "stm32f103x6.h"
#define FLASH_PAGE_BYTES 1024U
#define FLASH_BOOTLOADER_PAGES 2U
#define FLASH_PAGES 64U
typedef enum
{
FLASH_SUCCESS = 0,
FLASH_PROHIBITED = 1,
FLASH_VERIFY_FAILED = 2
} Flash_Status_t;
#define FLASH_APPLICATION_BASE (FLASH_BASE \
+ FLASH_BOOTLOADER_PAGES * FLASH_PAGE_BYTES)
Flash_Status_t Flash_ErasePage(unsigned int page);
void Flash_ProgramFromPMA(uint32_t flash_adress, uint16_t pma_offset,
uint32_t length);