修复异常故障BUG
This commit is contained in:
parent
e698a63852
commit
92b6ed29ce
34
.vscode/c_cpp_properties.json
vendored
34
.vscode/c_cpp_properties.json
vendored
@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "windows-gcc-x64",
|
"name": "windows-gcc-x64",
|
||||||
"includePath": [
|
"includePath": [
|
||||||
"${workspaceFolder}/**"
|
"${workspaceFolder}/**"
|
||||||
],
|
],
|
||||||
"compilerPath": "gcc",
|
"compilerPath": "gcc",
|
||||||
"cStandard": "${default}",
|
"cStandard": "${default}",
|
||||||
"cppStandard": "${default}",
|
"cppStandard": "${default}",
|
||||||
"intelliSenseMode": "windows-gcc-x64",
|
"intelliSenseMode": "windows-gcc-x64",
|
||||||
"compilerArgs": [
|
"compilerArgs": [
|
||||||
""
|
""
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version": 4
|
"version": 4
|
||||||
}
|
}
|
46
.vscode/launch.json
vendored
46
.vscode/launch.json
vendored
@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "C/C++ Runner: Debug Session",
|
"name": "C/C++ Runner: Debug Session",
|
||||||
"type": "cppdbg",
|
"type": "cppdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"externalConsole": true,
|
"externalConsole": true,
|
||||||
"cwd": "d:/git_lidun/42_SaLiSi/Celis_adapter_DC_To_AC/HARDWARE/CDZ",
|
"cwd": "d:/git_lidun/42_SaLiSi/Celis_adapter_DC_To_AC/HARDWARE/CDZ",
|
||||||
"program": "d:/git_lidun/42_SaLiSi/Celis_adapter_DC_To_AC/HARDWARE/CDZ/build/Debug/outDebug",
|
"program": "d:/git_lidun/42_SaLiSi/Celis_adapter_DC_To_AC/HARDWARE/CDZ/build/Debug/outDebug",
|
||||||
"MIMode": "gdb",
|
"MIMode": "gdb",
|
||||||
"miDebuggerPath": "gdb",
|
"miDebuggerPath": "gdb",
|
||||||
"setupCommands": [
|
"setupCommands": [
|
||||||
{
|
{
|
||||||
"description": "Enable pretty-printing for gdb",
|
"description": "Enable pretty-printing for gdb",
|
||||||
"text": "-enable-pretty-printing",
|
"text": "-enable-pretty-printing",
|
||||||
"ignoreFailures": true
|
"ignoreFailures": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
116
.vscode/settings.json
vendored
116
.vscode/settings.json
vendored
@ -1,59 +1,59 @@
|
|||||||
{
|
{
|
||||||
"C_Cpp_Runner.cCompilerPath": "gcc",
|
"C_Cpp_Runner.cCompilerPath": "gcc",
|
||||||
"C_Cpp_Runner.cppCompilerPath": "g++",
|
"C_Cpp_Runner.cppCompilerPath": "g++",
|
||||||
"C_Cpp_Runner.debuggerPath": "gdb",
|
"C_Cpp_Runner.debuggerPath": "gdb",
|
||||||
"C_Cpp_Runner.cStandard": "",
|
"C_Cpp_Runner.cStandard": "",
|
||||||
"C_Cpp_Runner.cppStandard": "",
|
"C_Cpp_Runner.cppStandard": "",
|
||||||
"C_Cpp_Runner.msvcBatchPath": "",
|
"C_Cpp_Runner.msvcBatchPath": "",
|
||||||
"C_Cpp_Runner.useMsvc": false,
|
"C_Cpp_Runner.useMsvc": false,
|
||||||
"C_Cpp_Runner.warnings": [
|
"C_Cpp_Runner.warnings": [
|
||||||
"-Wall",
|
"-Wall",
|
||||||
"-Wextra",
|
"-Wextra",
|
||||||
"-Wpedantic",
|
"-Wpedantic",
|
||||||
"-Wshadow",
|
"-Wshadow",
|
||||||
"-Wformat=2",
|
"-Wformat=2",
|
||||||
"-Wcast-align",
|
"-Wcast-align",
|
||||||
"-Wconversion",
|
"-Wconversion",
|
||||||
"-Wsign-conversion",
|
"-Wsign-conversion",
|
||||||
"-Wnull-dereference"
|
"-Wnull-dereference"
|
||||||
],
|
],
|
||||||
"C_Cpp_Runner.msvcWarnings": [
|
"C_Cpp_Runner.msvcWarnings": [
|
||||||
"/W4",
|
"/W4",
|
||||||
"/permissive-",
|
"/permissive-",
|
||||||
"/w14242",
|
"/w14242",
|
||||||
"/w14287",
|
"/w14287",
|
||||||
"/w14296",
|
"/w14296",
|
||||||
"/w14311",
|
"/w14311",
|
||||||
"/w14826",
|
"/w14826",
|
||||||
"/w44062",
|
"/w44062",
|
||||||
"/w44242",
|
"/w44242",
|
||||||
"/w14905",
|
"/w14905",
|
||||||
"/w14906",
|
"/w14906",
|
||||||
"/w14263",
|
"/w14263",
|
||||||
"/w44265",
|
"/w44265",
|
||||||
"/w14928"
|
"/w14928"
|
||||||
],
|
],
|
||||||
"C_Cpp_Runner.enableWarnings": true,
|
"C_Cpp_Runner.enableWarnings": true,
|
||||||
"C_Cpp_Runner.warningsAsError": false,
|
"C_Cpp_Runner.warningsAsError": false,
|
||||||
"C_Cpp_Runner.compilerArgs": [],
|
"C_Cpp_Runner.compilerArgs": [],
|
||||||
"C_Cpp_Runner.linkerArgs": [],
|
"C_Cpp_Runner.linkerArgs": [],
|
||||||
"C_Cpp_Runner.includePaths": [],
|
"C_Cpp_Runner.includePaths": [],
|
||||||
"C_Cpp_Runner.includeSearch": [
|
"C_Cpp_Runner.includeSearch": [
|
||||||
"*",
|
"*",
|
||||||
"**/*"
|
"**/*"
|
||||||
],
|
],
|
||||||
"C_Cpp_Runner.excludeSearch": [
|
"C_Cpp_Runner.excludeSearch": [
|
||||||
"**/build",
|
"**/build",
|
||||||
"**/build/**",
|
"**/build/**",
|
||||||
"**/.*",
|
"**/.*",
|
||||||
"**/.*/**",
|
"**/.*/**",
|
||||||
"**/.vscode",
|
"**/.vscode",
|
||||||
"**/.vscode/**"
|
"**/.vscode/**"
|
||||||
],
|
],
|
||||||
"C_Cpp_Runner.useAddressSanitizer": false,
|
"C_Cpp_Runner.useAddressSanitizer": false,
|
||||||
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
||||||
"C_Cpp_Runner.useLeakSanitizer": false,
|
"C_Cpp_Runner.useLeakSanitizer": false,
|
||||||
"C_Cpp_Runner.showCompilationTime": false,
|
"C_Cpp_Runner.showCompilationTime": false,
|
||||||
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
||||||
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
||||||
}
|
}
|
34
APPLICATION/CDZ/.vscode/c_cpp_properties.json
vendored
34
APPLICATION/CDZ/.vscode/c_cpp_properties.json
vendored
@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "windows-gcc-x64",
|
"name": "windows-gcc-x64",
|
||||||
"includePath": [
|
"includePath": [
|
||||||
"${workspaceFolder}/**"
|
"${workspaceFolder}/**"
|
||||||
],
|
],
|
||||||
"compilerPath": "gcc",
|
"compilerPath": "gcc",
|
||||||
"cStandard": "${default}",
|
"cStandard": "${default}",
|
||||||
"cppStandard": "${default}",
|
"cppStandard": "${default}",
|
||||||
"intelliSenseMode": "windows-gcc-x64",
|
"intelliSenseMode": "windows-gcc-x64",
|
||||||
"compilerArgs": [
|
"compilerArgs": [
|
||||||
""
|
""
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version": 4
|
"version": 4
|
||||||
}
|
}
|
46
APPLICATION/CDZ/.vscode/launch.json
vendored
46
APPLICATION/CDZ/.vscode/launch.json
vendored
@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "C/C++ Runner: Debug Session",
|
"name": "C/C++ Runner: Debug Session",
|
||||||
"type": "cppdbg",
|
"type": "cppdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"externalConsole": true,
|
"externalConsole": true,
|
||||||
"cwd": "d:/git_lidun/42_SaLiSi/DCBMSSaLiSi/APPLICATION/CDZ",
|
"cwd": "d:/git_lidun/42_SaLiSi/DCBMSSaLiSi/APPLICATION/CDZ",
|
||||||
"program": "d:/git_lidun/42_SaLiSi/DCBMSSaLiSi/APPLICATION/CDZ/build/Debug/outDebug",
|
"program": "d:/git_lidun/42_SaLiSi/DCBMSSaLiSi/APPLICATION/CDZ/build/Debug/outDebug",
|
||||||
"MIMode": "gdb",
|
"MIMode": "gdb",
|
||||||
"miDebuggerPath": "gdb",
|
"miDebuggerPath": "gdb",
|
||||||
"setupCommands": [
|
"setupCommands": [
|
||||||
{
|
{
|
||||||
"description": "Enable pretty-printing for gdb",
|
"description": "Enable pretty-printing for gdb",
|
||||||
"text": "-enable-pretty-printing",
|
"text": "-enable-pretty-printing",
|
||||||
"ignoreFailures": true
|
"ignoreFailures": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
116
APPLICATION/CDZ/.vscode/settings.json
vendored
116
APPLICATION/CDZ/.vscode/settings.json
vendored
@ -1,59 +1,59 @@
|
|||||||
{
|
{
|
||||||
"C_Cpp_Runner.cCompilerPath": "gcc",
|
"C_Cpp_Runner.cCompilerPath": "gcc",
|
||||||
"C_Cpp_Runner.cppCompilerPath": "g++",
|
"C_Cpp_Runner.cppCompilerPath": "g++",
|
||||||
"C_Cpp_Runner.debuggerPath": "gdb",
|
"C_Cpp_Runner.debuggerPath": "gdb",
|
||||||
"C_Cpp_Runner.cStandard": "",
|
"C_Cpp_Runner.cStandard": "",
|
||||||
"C_Cpp_Runner.cppStandard": "",
|
"C_Cpp_Runner.cppStandard": "",
|
||||||
"C_Cpp_Runner.msvcBatchPath": "",
|
"C_Cpp_Runner.msvcBatchPath": "",
|
||||||
"C_Cpp_Runner.useMsvc": false,
|
"C_Cpp_Runner.useMsvc": false,
|
||||||
"C_Cpp_Runner.warnings": [
|
"C_Cpp_Runner.warnings": [
|
||||||
"-Wall",
|
"-Wall",
|
||||||
"-Wextra",
|
"-Wextra",
|
||||||
"-Wpedantic",
|
"-Wpedantic",
|
||||||
"-Wshadow",
|
"-Wshadow",
|
||||||
"-Wformat=2",
|
"-Wformat=2",
|
||||||
"-Wcast-align",
|
"-Wcast-align",
|
||||||
"-Wconversion",
|
"-Wconversion",
|
||||||
"-Wsign-conversion",
|
"-Wsign-conversion",
|
||||||
"-Wnull-dereference"
|
"-Wnull-dereference"
|
||||||
],
|
],
|
||||||
"C_Cpp_Runner.msvcWarnings": [
|
"C_Cpp_Runner.msvcWarnings": [
|
||||||
"/W4",
|
"/W4",
|
||||||
"/permissive-",
|
"/permissive-",
|
||||||
"/w14242",
|
"/w14242",
|
||||||
"/w14287",
|
"/w14287",
|
||||||
"/w14296",
|
"/w14296",
|
||||||
"/w14311",
|
"/w14311",
|
||||||
"/w14826",
|
"/w14826",
|
||||||
"/w44062",
|
"/w44062",
|
||||||
"/w44242",
|
"/w44242",
|
||||||
"/w14905",
|
"/w14905",
|
||||||
"/w14906",
|
"/w14906",
|
||||||
"/w14263",
|
"/w14263",
|
||||||
"/w44265",
|
"/w44265",
|
||||||
"/w14928"
|
"/w14928"
|
||||||
],
|
],
|
||||||
"C_Cpp_Runner.enableWarnings": true,
|
"C_Cpp_Runner.enableWarnings": true,
|
||||||
"C_Cpp_Runner.warningsAsError": false,
|
"C_Cpp_Runner.warningsAsError": false,
|
||||||
"C_Cpp_Runner.compilerArgs": [],
|
"C_Cpp_Runner.compilerArgs": [],
|
||||||
"C_Cpp_Runner.linkerArgs": [],
|
"C_Cpp_Runner.linkerArgs": [],
|
||||||
"C_Cpp_Runner.includePaths": [],
|
"C_Cpp_Runner.includePaths": [],
|
||||||
"C_Cpp_Runner.includeSearch": [
|
"C_Cpp_Runner.includeSearch": [
|
||||||
"*",
|
"*",
|
||||||
"**/*"
|
"**/*"
|
||||||
],
|
],
|
||||||
"C_Cpp_Runner.excludeSearch": [
|
"C_Cpp_Runner.excludeSearch": [
|
||||||
"**/build",
|
"**/build",
|
||||||
"**/build/**",
|
"**/build/**",
|
||||||
"**/.*",
|
"**/.*",
|
||||||
"**/.*/**",
|
"**/.*/**",
|
||||||
"**/.vscode",
|
"**/.vscode",
|
||||||
"**/.vscode/**"
|
"**/.vscode/**"
|
||||||
],
|
],
|
||||||
"C_Cpp_Runner.useAddressSanitizer": false,
|
"C_Cpp_Runner.useAddressSanitizer": false,
|
||||||
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
||||||
"C_Cpp_Runner.useLeakSanitizer": false,
|
"C_Cpp_Runner.useLeakSanitizer": false,
|
||||||
"C_Cpp_Runner.showCompilationTime": false,
|
"C_Cpp_Runner.showCompilationTime": false,
|
||||||
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
||||||
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
||||||
}
|
}
|
Binary file not shown.
1400
APPLICATION/MM/mm.c
1400
APPLICATION/MM/mm.c
File diff suppressed because it is too large
Load Diff
@ -1,107 +1,107 @@
|
|||||||
/*
|
/*
|
||||||
* @Description:
|
* @Description:
|
||||||
* @Version:
|
* @Version:
|
||||||
* @Author: Arnold
|
* @Author: Arnold
|
||||||
* @Date: 2023-10-27 13:48:57
|
* @Date: 2023-10-27 13:48:57
|
||||||
* @LastEditTime: 2024-01-08 23:11:25
|
* @LastEditTime: 2024-01-08 23:11:25
|
||||||
*/
|
*/
|
||||||
#ifndef __MM_H__
|
#ifndef __MM_H__
|
||||||
#define __MM_H__
|
#define __MM_H__
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
||||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 4 * 1024 ) )
|
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 4 * 1024 ) )
|
||||||
|
|
||||||
|
|
||||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||||
#define portBYTE_ALIGNMENT 8
|
#define portBYTE_ALIGNMENT 8
|
||||||
#define portNOP() __asm volatile ( "NOP" )
|
#define portNOP() __asm volatile ( "NOP" )
|
||||||
#define mtCOVERAGE_TEST_MARKER() __asm volatile ( "NOP" )
|
#define mtCOVERAGE_TEST_MARKER() __asm volatile ( "NOP" )
|
||||||
#define configTICK_RATE_HZ ( 1000 )
|
#define configTICK_RATE_HZ ( 1000 )
|
||||||
|
|
||||||
|
|
||||||
#if portBYTE_ALIGNMENT == 32
|
#if portBYTE_ALIGNMENT == 32
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x001f )
|
#define portBYTE_ALIGNMENT_MASK ( 0x001f )
|
||||||
#elif portBYTE_ALIGNMENT == 16
|
#elif portBYTE_ALIGNMENT == 16
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x000f )
|
#define portBYTE_ALIGNMENT_MASK ( 0x000f )
|
||||||
#elif portBYTE_ALIGNMENT == 8
|
#elif portBYTE_ALIGNMENT == 8
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x0007 )
|
#define portBYTE_ALIGNMENT_MASK ( 0x0007 )
|
||||||
#elif portBYTE_ALIGNMENT == 4
|
#elif portBYTE_ALIGNMENT == 4
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x0003 )
|
#define portBYTE_ALIGNMENT_MASK ( 0x0003 )
|
||||||
#elif portBYTE_ALIGNMENT == 2
|
#elif portBYTE_ALIGNMENT == 2
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x0001 )
|
#define portBYTE_ALIGNMENT_MASK ( 0x0001 )
|
||||||
#elif portBYTE_ALIGNMENT == 1
|
#elif portBYTE_ALIGNMENT == 1
|
||||||
#define portBYTE_ALIGNMENT_MASK ( 0x0000 )
|
#define portBYTE_ALIGNMENT_MASK ( 0x0000 )
|
||||||
#else /* if portBYTE_ALIGNMENT == 32 */
|
#else /* if portBYTE_ALIGNMENT == 32 */
|
||||||
#error "Invalid portBYTE_ALIGNMENT definition"
|
#error "Invalid portBYTE_ALIGNMENT definition"
|
||||||
#endif /* if portBYTE_ALIGNMENT == 32 */
|
#endif /* if portBYTE_ALIGNMENT == 32 */
|
||||||
|
|
||||||
|
|
||||||
#if ( configUSE_16_BIT_TICKS == 1 )
|
#if ( configUSE_16_BIT_TICKS == 1 )
|
||||||
typedef uint16_t TickType_t;
|
typedef uint16_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffff
|
#define portMAX_DELAY ( TickType_t ) 0xffff
|
||||||
#else
|
#else
|
||||||
typedef uint32_t TickType_t;
|
typedef uint32_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
#endif
|
#endif
|
||||||
#define portPOINTER_SIZE_TYPE uint64_t
|
#define portPOINTER_SIZE_TYPE uint64_t
|
||||||
/* It is a good idea to define configASSERT() while developing. configASSERT()
|
/* It is a good idea to define configASSERT() while developing. configASSERT()
|
||||||
* uses the same semantics as the standard C assert() macro. */
|
* uses the same semantics as the standard C assert() macro. */
|
||||||
#define configASSERT( x ) \
|
#define configASSERT( x ) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if( x ) \
|
if( x ) \
|
||||||
{ \
|
{ \
|
||||||
vFakeAssert( true, __FILE__, __LINE__ ); \
|
vFakeAssert( true, __FILE__, __LINE__ ); \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
vFakeAssert( false, __FILE__, __LINE__ ); \
|
vFakeAssert( false, __FILE__, __LINE__ ); \
|
||||||
} \
|
} \
|
||||||
} while( 0 )
|
} while( 0 )
|
||||||
|
|
||||||
void vFakeAssert( bool x,
|
void vFakeAssert( bool x,
|
||||||
char * file,
|
char * file,
|
||||||
int line );
|
int line );
|
||||||
|
|
||||||
/* Used to pass information about the heap out of vPortGetHeapStats(). */
|
/* Used to pass information about the heap out of vPortGetHeapStats(). */
|
||||||
typedef struct xHeapStats
|
typedef struct xHeapStats
|
||||||
{
|
{
|
||||||
size_t xAvailableHeapSpaceInBytes; /* The total heap size currently available - this is the sum of all the free blocks, not the largest block that can be allocated. */
|
size_t xAvailableHeapSpaceInBytes; /* The total heap size currently available - this is the sum of all the free blocks, not the largest block that can be allocated. */
|
||||||
size_t xSizeOfLargestFreeBlockInBytes; /* The maximum size, in bytes, of all the free blocks within the heap at the time vPortGetHeapStats() is called. */
|
size_t xSizeOfLargestFreeBlockInBytes; /* The maximum size, in bytes, of all the free blocks within the heap at the time vPortGetHeapStats() is called. */
|
||||||
size_t xSizeOfSmallestFreeBlockInBytes; /* The minimum size, in bytes, of all the free blocks within the heap at the time vPortGetHeapStats() is called. */
|
size_t xSizeOfSmallestFreeBlockInBytes; /* The minimum size, in bytes, of all the free blocks within the heap at the time vPortGetHeapStats() is called. */
|
||||||
size_t xNumberOfFreeBlocks; /* The number of free memory blocks within the heap at the time vPortGetHeapStats() is called. */
|
size_t xNumberOfFreeBlocks; /* The number of free memory blocks within the heap at the time vPortGetHeapStats() is called. */
|
||||||
size_t xMinimumEverFreeBytesRemaining; /* The minimum amount of total free memory (sum of all free blocks) there has been in the heap since the system booted. */
|
size_t xMinimumEverFreeBytesRemaining; /* The minimum amount of total free memory (sum of all free blocks) there has been in the heap since the system booted. */
|
||||||
size_t xNumberOfSuccessfulAllocations; /* The number of calls to pvPortMalloc() that have returned a valid memory block. */
|
size_t xNumberOfSuccessfulAllocations; /* The number of calls to pvPortMalloc() that have returned a valid memory block. */
|
||||||
size_t xNumberOfSuccessfulFrees; /* The number of calls to vPortFree() that has successfully freed a block of memory. */
|
size_t xNumberOfSuccessfulFrees; /* The number of calls to vPortFree() that has successfully freed a block of memory. */
|
||||||
} HeapStats_t;
|
} HeapStats_t;
|
||||||
|
|
||||||
#ifndef traceMALLOC
|
#ifndef traceMALLOC
|
||||||
#define traceMALLOC( pvAddress, uiSize )
|
#define traceMALLOC( pvAddress, uiSize )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef traceFREE
|
#ifndef traceFREE
|
||||||
#define traceFREE( pvAddress, uiSize )
|
#define traceFREE( pvAddress, uiSize )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* #define vFakeAssert(x, file, line) if (!(x)) { \
|
/* #define vFakeAssert(x, file, line) if (!(x)) { \
|
||||||
LogError("Assertion failed in file %s at line %d", file, line); \
|
LogError("Assertion failed in file %s at line %d", file, line); \
|
||||||
RecordAssertionFailure(); \
|
RecordAssertionFailure(); \
|
||||||
} */
|
} */
|
||||||
#define vFakeAssert(x, file, line) if (!(x)) { }
|
#define vFakeAssert(x, file, line) if (!(x)) { }
|
||||||
|
|
||||||
void * pvPortMalloc( size_t xWantedSize );//分配内存
|
void * pvPortMalloc( size_t xWantedSize );//分配内存
|
||||||
void vPortFree( void * pv );//释放内存
|
void vPortFree( void * pv );//释放内存
|
||||||
size_t xPortGetFreeHeapSize( void );//获取当前可用堆内存的大小
|
size_t xPortGetFreeHeapSize( void );//获取当前可用堆内存的大小
|
||||||
size_t xPortGetMinimumEverFreeHeapSize( void );//用于获取系统运行的最小空闲大小!!!!
|
size_t xPortGetMinimumEverFreeHeapSize( void );//用于获取系统运行的最小空闲大小!!!!
|
||||||
void vPortInitialiseBlocks( void );//初始化任务控制块和任务堆栈内存,不需要显式调用
|
void vPortInitialiseBlocks( void );//初始化任务控制块和任务堆栈内存,不需要显式调用
|
||||||
void * pvPortCalloc( size_t xNum, //分配一定数量和大小的内存卡
|
void * pvPortCalloc( size_t xNum, //分配一定数量和大小的内存卡
|
||||||
size_t xSize );
|
size_t xSize );
|
||||||
void vPortGetHeapStats( HeapStats_t * pxHeapStats );//统计当前堆的情况
|
void vPortGetHeapStats( HeapStats_t * pxHeapStats );//统计当前堆的情况
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
#ifndef __MM_Arnold_config_H_
|
#ifndef __MM_Arnold_config_H_
|
||||||
|
|
||||||
#define __MM_Arnold_config_H_
|
#define __MM_Arnold_config_H_
|
||||||
#include "mm.h"
|
#include "mm.h"
|
||||||
#define MM_Malloc(x) pvPortMalloc(x) /* 分配内存 */
|
#define MM_Malloc(x) pvPortMalloc(x) /* 分配内存 */
|
||||||
|
|
||||||
#define MM_Free(x) vPortFree(x) /* 释放内存 */
|
#define MM_Free(x) vPortFree(x) /* 释放内存 */
|
||||||
|
|
||||||
#define MM_GetFreeHeapSize() xPortGetFreeHeapSize() /*获取当前可用堆内存的大小 */
|
#define MM_GetFreeHeapSize() xPortGetFreeHeapSize() /*获取当前可用堆内存的大小 */
|
||||||
#define MM_GetMinimumEverFreeHeapSize xPortGetMinimumEverFreeHeapSize() /*用于获取系统运行的最小空闲大小!!!! */
|
#define MM_GetMinimumEverFreeHeapSize xPortGetMinimumEverFreeHeapSize() /*用于获取系统运行的最小空闲大小!!!! */
|
||||||
#define MM_GetHeapStats(x) vPortGetHeapStats(x) /* 不建议使用 */
|
#define MM_GetHeapStats(x) vPortGetHeapStats(x) /* 不建议使用 */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,35 +1,35 @@
|
|||||||
/*
|
/*
|
||||||
* @Description:
|
* @Description:
|
||||||
* @Version:
|
* @Version:
|
||||||
* @Author: Arnold
|
* @Author: Arnold
|
||||||
* @Date: 2023-12-31 15:57:00
|
* @Date: 2023-12-31 15:57:00
|
||||||
* @LastEditTime: 2023-12-31 16:15:52
|
* @LastEditTime: 2023-12-31 16:15:52
|
||||||
*/
|
*/
|
||||||
#include "Single_event_receiver.h"
|
#include "Single_event_receiver.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
add_event(GetEventName(EVENT_AA));
|
add_event(GetEventName(EVENT_AA));
|
||||||
|
|
||||||
eventDosomething();
|
eventDosomething();
|
||||||
add_event(GetEventName(EVENT_BB));
|
add_event(GetEventName(EVENT_BB));
|
||||||
add_event((2));
|
add_event((2));
|
||||||
add_event((2));
|
add_event((2));
|
||||||
|
|
||||||
|
|
||||||
eventDosomething();
|
eventDosomething();
|
||||||
add_event((3));
|
add_event((3));
|
||||||
add_event((2));
|
add_event((2));
|
||||||
add_event((2));
|
add_event((2));
|
||||||
add_event((2));
|
add_event((2));
|
||||||
eventDosomething();
|
eventDosomething();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
BIN
OBJ/App.bin
BIN
OBJ/App.bin
Binary file not shown.
5376
OBJ/DCBms.hex
5376
OBJ/DCBms.hex
File diff suppressed because it is too large
Load Diff
5376
OBJ/LED.hex
5376
OBJ/LED.hex
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2076
USER/LED.uvopt
2076
USER/LED.uvopt
File diff suppressed because it is too large
Load Diff
@ -117,6 +117,11 @@
|
|||||||
<pMon>Segger\JL2CM3.dll</pMon>
|
<pMon>Segger\JL2CM3.dll</pMon>
|
||||||
</DebugOpt>
|
</DebugOpt>
|
||||||
<TargetDriverDllRegistry>
|
<TargetDriverDllRegistry>
|
||||||
|
<SetRegEntry>
|
||||||
|
<Number>0</Number>
|
||||||
|
<Key>DLGUARM</Key>
|
||||||
|
<Name>d</Name>
|
||||||
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Key>UL2CM3</Key>
|
<Key>UL2CM3</Key>
|
||||||
@ -148,7 +153,24 @@
|
|||||||
<Name>-T0</Name>
|
<Name>-T0</Name>
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
</TargetDriverDllRegistry>
|
</TargetDriverDllRegistry>
|
||||||
<Breakpoint/>
|
<Breakpoint>
|
||||||
|
<Bp>
|
||||||
|
<Number>0</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>78</LineNumber>
|
||||||
|
<EnabledFlag>1</EnabledFlag>
|
||||||
|
<Address>134289940</Address>
|
||||||
|
<ByteObject>0</ByteObject>
|
||||||
|
<HtxType>0</HtxType>
|
||||||
|
<ManyObjects>0</ManyObjects>
|
||||||
|
<SizeOfObject>0</SizeOfObject>
|
||||||
|
<BreakByAccess>0</BreakByAccess>
|
||||||
|
<BreakIfRCount>1</BreakIfRCount>
|
||||||
|
<Filename>.\main.c</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression>\\LED\main.c\78</Expression>
|
||||||
|
</Bp>
|
||||||
|
</Breakpoint>
|
||||||
<WatchWindow1>
|
<WatchWindow1>
|
||||||
<Ww>
|
<Ww>
|
||||||
<count>0</count>
|
<count>0</count>
|
||||||
@ -250,6 +272,21 @@
|
|||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
<ItemText>This_State</ItemText>
|
<ItemText>This_State</ItemText>
|
||||||
</Ww>
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>20</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>front</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>21</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>rear</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>22</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>event_queue</ItemText>
|
||||||
|
</Ww>
|
||||||
</WatchWindow1>
|
</WatchWindow1>
|
||||||
<WatchWindow2>
|
<WatchWindow2>
|
||||||
<Ww>
|
<Ww>
|
||||||
@ -302,7 +339,7 @@
|
|||||||
<DebugFlag>
|
<DebugFlag>
|
||||||
<trace>0</trace>
|
<trace>0</trace>
|
||||||
<periodic>1</periodic>
|
<periodic>1</periodic>
|
||||||
<aLwin>1</aLwin>
|
<aLwin>0</aLwin>
|
||||||
<aCover>0</aCover>
|
<aCover>0</aCover>
|
||||||
<aSer1>0</aSer1>
|
<aSer1>0</aSer1>
|
||||||
<aSer2>0</aSer2>
|
<aSer2>0</aSer2>
|
||||||
@ -315,7 +352,7 @@
|
|||||||
<AscS2>0</AscS2>
|
<AscS2>0</AscS2>
|
||||||
<AscS3>0</AscS3>
|
<AscS3>0</AscS3>
|
||||||
<aSer3>0</aSer3>
|
<aSer3>0</aSer3>
|
||||||
<eProf>1</eProf>
|
<eProf>0</eProf>
|
||||||
<aLa>0</aLa>
|
<aLa>0</aLa>
|
||||||
<aPa1>0</aPa1>
|
<aPa1>0</aPa1>
|
||||||
<AscS4>0</AscS4>
|
<AscS4>0</AscS4>
|
||||||
@ -1200,7 +1237,7 @@
|
|||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>EVENT</GroupName>
|
<GroupName>EVENT</GroupName>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
|
File diff suppressed because it is too large
Load Diff
BIN
USER/main.c
BIN
USER/main.c
Binary file not shown.
Loading…
Reference in New Issue
Block a user