Commit f2cae379 authored by 李延凯's avatar 李延凯

feat: 修改启动地址, 修改选项字节地址

parent 6e32a063
......@@ -211,7 +211,7 @@
<Ra2Chk>0</Ra2Chk>
<Ra3Chk>0</Ra3Chk>
<Im1Chk>1</Im1Chk>
<Im2Chk>0</Im2Chk>
<Im2Chk>1</Im2Chk>
<OnChipMemories>
<Ocm1>
<Type>0</Type>
......@@ -275,8 +275,8 @@
</OCR_RVCT3>
<OCR_RVCT4>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x80000</Size>
<StartAddress>0xc400</StartAddress>
<Size>0x73c00</Size>
</OCR_RVCT4>
<OCR_RVCT5>
<Type>1</Type>
......@@ -301,12 +301,12 @@
<OCR_RVCT9>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x10000</Size>
<Size>0xff00</Size>
</OCR_RVCT9>
<OCR_RVCT10>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
<StartAddress>0x2000ff00</StartAddress>
<Size>0x100</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
......
......@@ -25,7 +25,7 @@
#include <stdint.h>
#include "BAT32A279.h"
#include "userdefine.h"
/*----------------------------------------------------------------------------
Define clocks
......@@ -64,7 +64,11 @@ typedef enum {
following is an example for different system frequencies */
//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
#if (HAS_BOOTLOADER == 1U)
const uint8_t user_opt_data[4] __attribute__((used)) __attribute__((section(".ARM.__AT_0x0000C4C0"))) =
#else
const uint8_t user_opt_data[4] __attribute__((used)) __attribute__((section(".ARM.__AT_0x000000C0"))) =
#endif
{
/**
......
......@@ -19,6 +19,10 @@ User definitions
#ifndef __TYPEDEF__
typedef unsigned short MD_STATUS;
#define HAS_BOOTLOADER (1u) // 仅仿真App时设置为0
#define APP_BASE (0x0000C400ul)
/* Status list definition */
#define MD_STATUSBASE (0x00U)
#define MD_OK (MD_STATUSBASE + 0x00U) /* register setting OK */
......
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'HaoJin'
* Target: 'HaoJin232'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "BAT32A279.h"
#endif /* RTE_COMPONENTS_H */
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'HaoJin750TFT'
* Target: 'HaoJin750'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "BAT32A279.h"
#endif /* RTE_COMPONENTS_H */
......@@ -38,9 +38,16 @@
#include "Sys_Scheduler.h"
#include "RTE.h"
#include "Components.h"
#include "userdefine.h"
void Sys_Startup_Pre_Init(void)
{
#if (HAS_BOOTLOADER == 1u)
__disable_irq();
SCB->VTOR = APP_BASE;
__DMB();
__enable_irq();
#endif
__disable_irq();
/* soft delay, for power to stabilize */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment