12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- /************************************************************************
- Project: Welling Motor Control Paltform
- Filename: bootloader.c
- Partner Filename: bootloader.h
- Description: The bootstrap program for using UART to download application program
- Complier: IAR Embedded Workbench for ARM 7.80.4
- CPU TYPE : GD32F3x0
- *************************************************************************
- Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd.
- All rights reserved.
- *************************************************************************
- *************************************************************************
- Revising History (ECL of this file):
- ************************************************************************/
- /************************************************************************
- Beginning of File, do not put anything above here except notes
- Compiler Directives:
- ************************************************************************/
- #ifndef _BOOTLOADER_C_
- #define _BOOTLOADER_C_
- #endif
- /************************************************************************
- Include File
- ************************************************************************/
- #include "user.h"
- /************************************************************************
- Constant Table:
- ************************************************************************/
- /************************************************************************
- Exported Functions:
- ************************************************************************/
- /************************************************************************
- Function: void boot_voBootloader(void)
- Description:
- Call by:
- Input Variables:
- Output/Return Variables:
- Subroutine Call:
- Reference:
- ************************************************************************/
- //#ifdef BOOTLOADER
- // void boot_voBootloader(void)
- //{
- // uint32_t i = 0;
- // for(i = 0; i < 48; i++)
- // {
- // VectorTable[i] = *(__IO uint32_t*)(APPLICATION_ADDRESS + (i<<2));
- // }
- // /* Enable the SYSCFG peripheral clock*/
- // //RCC_APB2PeriphResetCmd(RCC_APB2Periph_SYSCFG, ENABLE);
- // //NVIC_SetVectorTable(NVIC_VectTab_RAM,0);
- // nvic_vector_table_set(NVIC_VECTTAB_RAM,0x0);
- // rcu_periph_reset_enable(RCU_CFGCMPRST);
- // /* Remap SRAM at 0x00000000 */
- // //SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);
- // SYSCFG_CFG0 |= SYSCFG_CFG0_BOOT_MODE;
- //}
- //#endif
- ///************************************************************************
- // Local Functions: N/A
- //************************************************************************/
- //
- //
- ///************************************************************************
- // Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd.
- // All rights reserved.
- /************************************************************************/
- #ifdef _BOOTLOADER_C_
- #undef _BOOTLOADER_C_ /* parasoft-suppress MISRA2004-19_6 "本项目中无法更改,后续避免使用" */
- #endif
- /************************************************************************
- End of this File (EOF)!
- Do not put anything after this part!
- ************************************************************************/
|