Обновление 23.06.2026

This commit is contained in:
Дарья Бараева 2026-06-24 09:30:15 +03:00
parent 1a3f798ffa
commit 992e127395
2 changed files with 15 additions and 8 deletions

View File

@ -86,11 +86,18 @@ static void swap_bank(uint8_t eBank)
} }
void DefaultISR(void) {
void DefaultISR(void) {
*((volatile unsigned int *)(0x40014030)) = 0x00000A55;
} }
//#define vPortSVCHandler SVC_Handler
//#define xPortPendSVHandler PendSV_Handler
//void xPortPendSVHandler(void) __attribute__((naked));
//void vPortSVCHandler(void) __attribute__((naked));
static void Boot2App(void) static void Boot2App(void)
{ {
uint32_t u32StackAddr = *((uint32_t*)((uint32_t)_FirmwareMainBegin)); uint32_t u32StackAddr = *((uint32_t*)((uint32_t)_FirmwareMainBegin));
@ -111,12 +118,12 @@ uint64_t NumberBank = 0;
int main(void) { int main(void) {
Bsp_CLOCK_Init(); Bsp_CLOCK_Init();
if (RGM_SRS_JTAG_MASK == (RGM->SRS & RGM_SRS_JTAG_MASK)) { // if (RGM_SRS_JTAG_MASK == (RGM->SRS & RGM_SRS_JTAG_MASK)) {
D_bInternalFlashPage_Clear(0x04000000, NULL, NULL); // D_bInternalFlashPage_Clear(0x04000000, NULL, NULL);
NumberBank = 0; // NumberBank = 0;
} else { // } else {
D_sInternalFlashPage_Read(0x04000000, 0, (uint8_t * ) & NumberBank, 8); D_sInternalFlashPage_Read(0x04000000, 0, (uint8_t * ) & NumberBank, 8);
} // }
/* /*
uint8_t ver0[30]; uint8_t ver0[30];

View File

@ -3,8 +3,8 @@ SET(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/MODULES/CmakeConfig_GCC_CortexM7/gc
ENABLE_LANGUAGE(ASM) ENABLE_LANGUAGE(ASM)
CMAKE_MINIMUM_REQUIRED(VERSION 3.8.0) CMAKE_MINIMUM_REQUIRED(VERSION 3.8.0)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O2")
IF (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) IF (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
MESSAGE( MESSAGE(