This commit is contained in:
MartinLoren
2026-03-11 17:41:45 +08:00
parent d4143868a6
commit be087c72c8

View File

@@ -4,17 +4,22 @@
#define BLACKPILL // BLUEPILL BLACKPILL QFP48_FLASHER #define BLACKPILL // BLUEPILL BLACKPILL QFP48_FLASHER
// Just add the following code to extend sram size to 512KB, and the rest of the code is same as the original main.c ----------
#define EXTEND_SRAM FLASH_EOPB0_SRAM_512K //512KB RAM #define EXTEND_SRAM FLASH_EOPB0_SRAM_512K //512KB RAM
#ifdef __cplusplus
extern "C" {
#endif
void extend_sram(void); void extend_sram(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/** /**
* @brief to extend sram size * @brief to extend sram size, it goes integrated in the Startup file,
* so it will be executed before main function, and it will check if the sram size is expected,
* if not, it will change eopb0 to extend sram size, then reset system to make it take effect.
* @param none * @param none
* @retval none * @retval none
*/ */
@@ -35,6 +40,8 @@ void extend_sram(void)
} }
} }
//--------------------------------------------------------------------------------------------------------------------
#ifdef BLUEPILL #ifdef BLUEPILL
#define LEDPERIPH CRM_GPIOC_PERIPH_CLOCK #define LEDPERIPH CRM_GPIOC_PERIPH_CLOCK