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