@@ -288,7 +288,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>cm_backtrace</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<OutputName>CmBacktrace</OutputName>
|
||||
<CreateExecutable>1</CreateExecutable>
|
||||
<CreateLib>0</CreateLib>
|
||||
<CreateHexFile>1</CreateHexFile>
|
||||
<CreateHexFile>0</CreateHexFile>
|
||||
<DebugInformation>1</DebugInformation>
|
||||
<BrowseInformation>1</BrowseInformation>
|
||||
<ListingPath>.\Output\list\</ListingPath>
|
||||
|
||||
@@ -19,8 +19,8 @@ int main(void){
|
||||
// fault_test_by_unalign();
|
||||
fault_test_by_div0();
|
||||
|
||||
_continue = 0;
|
||||
while(_continue == 0) {
|
||||
_continue = 1;
|
||||
while(_continue == 1) {
|
||||
LED_RUN_ON;
|
||||
delay(1000000);
|
||||
LED_RUN_OFF;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <bsp.h>
|
||||
#include <stdio.h>
|
||||
#include <cm_backtrace.h>
|
||||
|
||||
/*
|
||||
*********************************************************************************************************
|
||||
@@ -88,8 +89,6 @@ static void GPIO_Configuration(void)
|
||||
GPIO_Init(GPIOF, &GPIO_InitStructure);
|
||||
GPIO_Init(GPIOG, &GPIO_InitStructure);
|
||||
|
||||
|
||||
|
||||
/******************system run led*******************/
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
|
||||
@@ -148,7 +147,6 @@ int fgetc(FILE *f)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
return (USART_ReceiveData(USART1));
|
||||
}
|
||||
|
||||
@@ -157,6 +155,7 @@ void assert_failed(u8* file, u32 line)
|
||||
/* User can add his own implementation to report the file name and line number,
|
||||
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
|
||||
/* Infinite loop */
|
||||
cm_backtrace_assert(__get_SP());
|
||||
printf("assert failed at %s:%d \n", file, line);
|
||||
while (1) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user