372字节,不能再暴力了

This commit is contained in:
nnhy 2015-10-21 03:07:46 +00:00
parent afcde3ca6b
commit b44d94f6c8
3 changed files with 6 additions and 2 deletions

View File

@ -171,6 +171,9 @@ __asm uint GetIPSR()
// 是否在中断里面
bool TInterrupt::IsHandler() { return GetIPSR() & 0x01; }
#ifdef TINY
__asm void FaultHandler() { }
#else
void UserHandler()
{
uint num = GetIPSR();
@ -252,6 +255,7 @@ extern "C"
//never expect to return
}
}
#endif
// 智能IRQ初始化时备份销毁时还原
SmartIRQ::SmartIRQ(bool enable)

View File

@ -30,7 +30,6 @@ __Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler ; Reset Handler
IMPORT FaultHandler
IMPORT UserHandler
DCD FaultHandler ; NMI Handler
DCD FaultHandler ; Hard Fault Handler
DCD FaultHandler ; MPU Fault Handler
@ -39,6 +38,7 @@ __Vectors DCD __initial_sp ; Top of Stack
IF :DEF:TINY
ELSE
IMPORT UserHandler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved

View File

@ -141,6 +141,7 @@ TSys::TSys()
CystalClock = HSE_VALUE; // 晶振时钟
MessagePort = COM1; // COM1;
#ifndef TINY
bool IsGD = Get_JTAG_ID() == 0x7A3;
#ifdef STM32F0
@ -162,7 +163,6 @@ TSys::TSys()
if(IsGD && (DevID == 0x0430 || DevID == 0x0414)) Clock = 120000000;
_Index = 0;
#ifndef TINY
#ifdef STM32F0
if(IsGD)
FlashSize = *(__IO ushort *)(0x1FFFF7E0); // 容量