Commit 9657322e authored by 时昊's avatar 时昊

首次上传

parents
OverView:
BUG:
Description:
\ No newline at end of file
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: true
AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortEnumsOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Allman
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
IncludeBlocks: Preserve
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: true
IndentCaseBlocks: true
IndentGotoLabels: true
IndentPPDirectives: BeforeHash
IndentExternBlock: AfterExternBlock
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 190
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 200
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 100
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 600
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: true
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: true
SpacesBeforeTrailingComments: 4
SpacesInAngles: true
SpacesInConditionalStatement: true
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: true
SpacesInParentheses: false
SpacesInSquareBrackets: true
SpaceBeforeSquareBrackets: true
Standard: Latest
TabWidth: 8
UseCRLF: false
UseTab: Never
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
BraceWrapping:
AfterCaseLabel: true
AfterClass: false
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: true
BeforeWhile: true
IndentBraces: true
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
...
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
*.s
*.lst
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
*.pbi
*.zip
*.7z
*.bin
*.out
*.srec
*.sim
# Kernel Module Compile Results
*.mod*
*.cmd
*.lst
*.lst*
*.s*
*.s
*.xcl
*.pbi.xcl
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
!Source/Application/System/asm/cstartup.s
!Source/Application/System/asm/data_abort_handler.asm
!Source/Application/System/asm/flash_marker.asm
/IAR_EWARM/settings/project.wspos
/IAR_EWARM/settings/project.wsdt
/.tags
/.tags_sorted_by_file
/IAR_EWARM/Application/Release
/IAR_EWARM/Application/Debug
/IAR_EWARM/Application/DebugWithoutBootloader
/Source/Application/Key/HW_Key.c
/Source/.tags
/Source/.tags_sorted_by_file
*.dep
*.wsdt
*.wspos
*.dbgdt
*.dni
\ No newline at end of file
This diff is collapsed.
V004:
1.修改声音调度.
2.修改声音报警具体逻辑
3.修改指示灯显示逻辑
4.修改胎压报警,胎压数值指示
5.增加平均车速模块.
6.修改诊断业务逻辑.修改版本号
7.增加转向声音调用,修改声音播放函数,修改引言属性,修改报警属性表,修改报警调度播放周期
8.修改CAN总线外发
9.修改硬线消抖函数的消抖时间
10.重新核对所有报警;CAN信号优先于硬线信号显示,IG OFF下强制熄灭不需要的指示灯
11.增加语音报警配置,修改门开,胎压为报警类报警多个触发时仅触发一次
12.增加门开报警,报警参数表调整
13.修改EPB指示灯,修改版本号
V005:
1.陡坡缓降指示灯,EPB故障指示灯,PEPS系统故障指示灯,逻辑修改
2.限速巡航数值显示修改
3.保养里程天数显示修改
4.门开报警,高低速分别触发,
5.真人语音报警音源修改
6.修改声音播放函数
7.雷达音源修改,属性修改
8.0x26D修改事件报文快发送逻辑;--赵建智
9.修改保养里程库,升级为0003;--赵建智
10.总计里程增加读 取清零次数接口;--赵建智
11.段码显示形参从uint64变更为uint32;--赵建智
12.主任务增加保养里程工作计时--赵建智
13.修改仪表无法休眠的问题.--赵建智
14.增加OFF休眠后到上电这段时间的计时逻辑.--赵建智
15.工程内增加UTC时间文件调用.---赵建智
16.新增一超速报警类别为海外专用,因为策略不同声音要求不同--胡松
17.重构了除门开报警胎压报警之外的所有报警触发逻辑--胡松
18.新增超速报警显示接口--胡松
19.新增指示灯唤醒初始化接口并在系统唤醒函数中调用--胡松
20.修改保养里程显示逻辑,处理显示被中断的需求--李茂军
21.重构了显示信息控制结构,不再使用位域使能的方式控制显示,以便程序层次更清晰易读--李茂军
22.新增低油量触发的续航提醒功能--胡松
23.修改燃油报警逻辑--胡松
24.增加地燃油报警提醒时跳转到续航界面--胡松
25.使用内部Flash存储全部语音文件--李茂军
26.增加引擎盖报警音--李茂军
27.增加平均车速计时调用接口函数并放到真实的100ms任务里----于金丰
28.增加PEPS报警--胡松
29.背光逻辑,增加实际电阻输入;
30.IG ON打开背光电阻输入检测;
V006:
1.诊断-修改禁止外发报文后发送1003后解除问题--滕敬轩
2.诊断-修改27服务负反馈优先级问题--滕敬轩
3.诊断-修改28服务正反馈长度问题--滕敬轩
4.诊断-修改28服务不支持02自功能问题--滕敬轩
5.诊断-添加复位功能--滕敬轩
6.诊断-修改31服务长度问题--滕敬轩
7.诊断-添加31服务清除里程--滕敬轩
8.诊断-添加22服务读取清除里程次数--滕敬轩
9.声音修改-驻车请挂P挡,真人语音调用--李茂军..
增加IGON500MS内显示无效500ms后根据报文显示。--李林泽
<?xml version="1.0" encoding="iso-8859-1"?>
<flash_board>
<pass>
<loader>$TOOLKIT_DIR$\config\flashloader\Cypress\FlashS6J336Cx.flash</loader>
<range>CODE 0x9f0000 0xbfffff</range>
<rel_offset>0x1000000</rel_offset>
</pass>
<pass>
<loader>$TOOLKIT_DIR$\config\flashloader\Cypress\FlashS6J336Cx.flash</loader>
<range>CODE 0x19f0000 0x1bfffff</range>
</pass>
<pass>
<loader>$TOOLKIT_DIR$\config\flashloader\Cypress\FlashS6J336Cxx_WFlash.flash</loader>
<range>CODE 0xe000000 0xe01bfff</range>
</pass>
<pass>
<loader>$TOOLKIT_DIR$\config\flashloader\Cypress\FlashS6J336Cxx_WFlash.flash</loader>
<range>CODE 0xe200000 0xe21bfff</range>
<rel_offset>0xffe00000</rel_offset>
</pass>
<pass>
<loader>$TOOLKIT_DIR$\config\flashloader\Cypress\FlashS6J336Cxx_WFlash.flash</loader>
<range>CODE 0xe300000 0xe31bfff</range>
<rel_offset>0xffd00000</rel_offset>
</pass>
</flash_board>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@REM This batch file has been generated by the IAR Embedded Workbench
@REM C-SPY Debugger, as an aid to preparing a command line for running
@REM the cspybat command line utility using the appropriate settings.
@REM
@REM Note that this file is generated every time a new debug session
@REM is initialized, so you may want to move or rename the file before
@REM making changes.
@REM
@REM You can launch cspybat by typing the name of this batch file followed
@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
@REM
@REM Read about available command line parameters in the C-SPY Debugging
@REM Guide. Hints about additional command line parameters that may be
@REM useful in specific cases:
@REM --download_only Downloads a code image without starting a debug
@REM session afterwards.
@REM --silent Omits the sign-on message.
@REM --timeout Limits the maximum allowed execution time.
@REM
@echo off
if not "%~1" == "" goto debugFile
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Debug.general.xcl" --backend -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Debug.driver.xcl"
@echo off
goto end
:debugFile
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Debug.general.xcl" "--debug_file=%~1" --backend -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Debug.driver.xcl"
@echo off
:end
\ No newline at end of file
@REM This batch file has been generated by the IAR Embedded Workbench
@REM C-SPY Debugger, as an aid to preparing a command line for running
@REM the cspybat command line utility using the appropriate settings.
@REM
@REM Note that this file is generated every time a new debug session
@REM is initialized, so you may want to move or rename the file before
@REM making changes.
@REM
@REM You can launch cspybat by typing the name of this batch file followed
@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
@REM
@REM Read about available command line parameters in the C-SPY Debugging
@REM Guide. Hints about additional command line parameters that may be
@REM useful in specific cases:
@REM --download_only Downloads a code image without starting a debug
@REM session afterwards.
@REM --silent Omits the sign-on message.
@REM --timeout Limits the maximum allowed execution time.
@REM
@echo off
if not "%~1" == "" goto debugFile
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "C:\Users\Administrator\Desktop\L\lg02y\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --backend -f "C:\Users\Administrator\Desktop\L\lg02y\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
@echo off
goto end
:debugFile
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "C:\Users\Administrator\Desktop\L\lg02y\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" "--debug_file=%~1" --backend -f "C:\Users\Administrator\Desktop\L\lg02y\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
@echo off
:end
\ No newline at end of file
param([String]$debugfile = "");
# This powershell file has been generated by the IAR Embedded Workbench
# C - SPY Debugger, as an aid to preparing a command line for running
# the cspybat command line utility using the appropriate settings.
#
# Note that this file is generated every time a new debug session
# is initialized, so you may want to move or rename the file before
# making changes.
#
# You can launch cspybat by typing Powershell.exe -File followed by the name of this batch file, followed
# by the name of the debug file (usually an ELF / DWARF or UBROF file).
#
# Read about available command line parameters in the C - SPY Debugging
# Guide. Hints about additional command line parameters that may be
# useful in specific cases :
# --download_only Downloads a code image without starting a debug
# session afterwards.
# --silent Omits the sign - on message.
# --timeout Limits the maximum allowed execution time.
#
if ($debugfile -eq "")
{
& "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.2\common\bin\cspybat" -f "E:\诊断项目\吉利\LG02Y\App\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --backend -f "E:\诊断项目\吉利\LG02Y\App\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
}
else
{
& "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.2\common\bin\cspybat" -f "E:\诊断项目\吉利\LG02Y\App\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.general.xcl" --debug_file=$debugfile --backend -f "E:\诊断项目\吉利\LG02Y\App\IAR_EWARM\Application\settings\Application.DebugWithoutBootloader.driver.xcl"
}
@REM This batch file has been generated by the IAR Embedded Workbench
@REM C-SPY Debugger, as an aid to preparing a command line for running
@REM the cspybat command line utility using the appropriate settings.
@REM
@REM Note that this file is generated every time a new debug session
@REM is initialized, so you may want to move or rename the file before
@REM making changes.
@REM
@REM You can launch cspybat by typing the name of this batch file followed
@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
@REM
@REM Read about available command line parameters in the C-SPY Debugging
@REM Guide. Hints about additional command line parameters that may be
@REM useful in specific cases:
@REM --download_only Downloads a code image without starting a debug
@REM session afterwards.
@REM --silent Omits the sign-on message.
@REM --timeout Limits the maximum allowed execution time.
@REM
@echo off
if not "%~1" == "" goto debugFile
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Release.general.xcl" --backend -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Release.driver.xcl"
@echo off
goto end
:debugFile
@echo on
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\cspybat" -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Release.general.xcl" "--debug_file=%~1" --backend -f "E:\work\GIT\lg02y\IAR_EWARM\Application\settings\Application.Release.driver.xcl"
@echo off
:end
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<crun>
<version>1</version>
<filter_entries>
<filter index="0" type="default">
<type>*</type>
<start_file>*</start_file>
<end_file>*</end_file>
<action_debugger>0</action_debugger>
<action_log>1</action_log>
</filter>
</filter_entries>
</crun>
<?xml version="1.0"?>
<settings>
<Stack>
<FillEnabled>0</FillEnabled>
<OverflowWarningsEnabled>1</OverflowWarningsEnabled>
<WarningThreshold>90</WarningThreshold>
<SpWarningsEnabled>1</SpWarningsEnabled>
<WarnLogOnly>1</WarnLogOnly>
<UseTrigger>1</UseTrigger>
<TriggerName>main</TriggerName>
<LimitSize>0</LimitSize>
<ByteLimit>50</ByteLimit>
</Stack>
<JLinkDriver>
<WatchCond>_ 0</WatchCond>
<Watch0>_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0</Watch0>
<Watch1>_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0</Watch1>
<CStepIntDis>_ 0</CStepIntDis>
<LeaveTargetRunning>_ 0</LeaveTargetRunning>
</JLinkDriver>
<DebugChecksum>
<Checksum>503555919</Checksum>
</DebugChecksum>
<Exceptions>
<StopOnUncaught>_ 0</StopOnUncaught>
<StopOnThrow>_ 0</StopOnThrow>
</Exceptions>
<CallStack>
<ShowArgs>0</ShowArgs>
</CallStack>
<Disassembly>
<MixedMode>1</MixedMode>
</Disassembly>
<CallStackLog>
<Enabled>0</Enabled>
</CallStackLog>
<CallStackStripe>
<ShowTiming>1</ShowTiming>
</CallStackStripe>
<TermIOLog>
<LoggingEnabled>_ 0</LoggingEnabled>
<LogFile>_ ""</LogFile>
</TermIOLog>
<Log_file>
<LoggingEnabled>_ 0</LoggingEnabled>
<LogFile>_ ""</LogFile>
<Category>_ 0</Category>
</Log_file>
<Disassemble_mode>
<mode>0</mode>
</Disassemble_mode>
<DisassembleMode>
<mode>0</mode>
</DisassembleMode>
<Breakpoints2>
<Count>0</Count>
</Breakpoints2>
<Aliases>
<Count>0</Count>
<SuppressDialog>0</SuppressDialog>
</Aliases>
</settings>
[BREAKPOINTS]
ForceImpTypeAny = 0
ShowInfoWin = 1
EnableFlashBP = 2
BPDuringExecution = 0
[CFI]
CFISize = 0x00
CFIAddr = 0x00
[CPU]
MonModeVTableAddr = 0xFFFFFFFF
MonModeDebug = 0
MaxNumAPs = 0
LowPowerHandlingMode = 0
OverrideMemMap = 0
AllowSimulation = 1
ScriptFile="..\..\debugger_scripts\Default.JLinkScript"
[FLASH]
CacheExcludeSize = 0x00
CacheExcludeAddr = 0x00
MinNumBytesFlashDL = 0
SkipProgOnCRCMatch = 1
VerifyDownload = 1
AllowCaching = 1
EnableFlashDL = 2
Override = 1
Device="Cortex-R5"
[GENERAL]
WorkRAMSize = 0x00
WorkRAMAddr = 0x00
RAMUsageLimit = 0x00
[SWO]
SWOLogFile=""
[MEM]
RdOverrideOrMask = 0x00
RdOverrideAndMask = 0xFFFFFFFF
RdOverrideAddr = 0xFFFFFFFF
WrOverrideOrMask = 0x00
WrOverrideAndMask = 0xFFFFFFFF
WrOverrideAddr = 0xFFFFFFFF
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
clearSysram()
{
__var sAddr;
__message "Initializing System RAM (384kB)...";
sAddr = 0x04000000; // TCRAM AXI Interface
__writeMemory32(0x88000000, 0xB4701000, "Memory"); // DMA0_R.DE = 1, DMA0_R.PR = 1 - DMA Enable, DMA Priority - Dynamic
while(sAddr < 0x04000080) // Fill 128 bytes with zeroes
{
__writeMemory32(0x00000000, sAddr, "Memory");
sAddr += 4;
}
__writeMemory32(0x04000000, 0xB4700008, "Memory"); // DMA0_SA0 = 0x04000000
__writeMemory32(0x02000000, 0xB470000C, "Memory"); // DMA0_DA0 = 0x02000000
__writeMemory32(0x03F001FF, 0xB4700000, "Memory"); // DMA0_A0.BL = 3, BC = 15, TC = 511
__writeMemory32(0x1C00B301, 0xB4700004, "Memory"); // DMA0_B0.PN = 1, DP = 3, SP = 0xB, MS = 1, TW = 3
__writeMemory32(0x00000001, 0xB4700010, "Memory"); // DMA0_C0.CD = 1
__writeMemory8(0x00, 0xB4700015, "Memory"); // DMA0_D0 (byte 1)
__writeMemory8(0x10, 0xB4700017, "Memory"); // DMA0_D0.FBS = 1 (byte3)
__writeMemory32(0x83FF01FF, 0xB4700000, "Memory"); // DMA0_A0.BL = 3, BC = 15, TC = 511, EB = 1
__writeMemory32(0xA3FF01FF, 0xB4700000, "Memory"); // DMA0_A0.BL = 3, BC = 15, TC = 511, EB = 1, ST = 1
}
configureSysram()
{
__writeMemory32(0x5ECC551F, 0xB010800C, "Memory"); // SRCFG_UNLOCK Unlock Key
while(__readMemory32(0xB0108000, "Memory") & 0x00000100){} // wait to unlock
__writeMemory32(0x03030000, 0xB0108000, "Memory"); // SRCFG_CFG0 RDWAIT = 3, WRWAIT = 3
__writeMemory32(0x551FB10C, 0xB010800C, "Memory"); // SRCFG_UNLOCK Lock Key
while(!(__readMemory32(0xB0108000, "Memory") & 0x00000100)){} // wait to lock
}
waitSysramClear()
{
__var res;
__var dirq;
__var edirq;
while(!(res = __readMemory32(0xB4700004, "Memory") & 0xC0000000)){} // wait DMA0_B0.DQ or EQ
if (res & 0x40000000)
{
__message "DMA initialization of System RAM completed with an error!!!";
dirq = __readMemory32(0xB4701004, "Memory");
edirq = __readMemory32(0xB470100C, "Memory");
__message "DMA_B0:",res:%x;
__message "DMA_DIRQ:",dirq:%x;
__message "DMA_EDIRQ:",edirq:%x;
}
__writeMemory32(0x00000011, 0xB4700010, "Memory"); // DMA0_C0.CD = 1, ED = 1
__writeMemory32(0x000F0000, 0xB4700000, "Memory"); // DMA0_A0 disable channel
__writeMemory32(0x00000000, 0xB4701000, "Memory"); // DMA0_R = 0 disable DMA
}
disableMPUandCaches()
{
__var Reg;
__message("Disabling MPU and Caches...");
// Disable MPU, I and D caches
Reg = __jtagCP15ReadReg(1, 0, 0, 0);
Reg &= ~((1<<12) | (1<<2) | (1<<1));
__jtagCP15WriteReg(1, 0, 0, 0, Reg);
// Disable ECC cache
Reg = __jtagCP15ReadReg(1, 0, 0, 1);
Reg &= 0xFFFFFFC7; // Clear bits 5:3
Reg |= (0x4 << 3);
__jtagCP15WriteReg(1, 0, 0, 1, Reg);
}
configureWatchdog()
{
if(!(__readMemory32(0xB060C048, "Memory") & 0x01000000)) // HWDG_CFG.LOCK == 0
{
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x00000000, 0xB060C02C, "Memory"); // HWDG_TRG0CFG = 0
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x00000000, 0xB060C030, "Memory"); // HWDG_TRG1CFG = 0
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x00000000, 0xB060C034, "Memory"); // HWDG_RUNLLS = 0
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x01000000, 0xB060C038, "Memory"); // HWDG_RUNULS = 0x01000000
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x01000005, 0xB060C048, "Memory"); // HWDG_CFG, LOCK = 1, WDEN = 1, ALLOWSTOPCLK = 1
}
}
setup()
{
disableMPUandCaches();
configureSysram();
clearSysram();
waitSysramClear();
configureWatchdog();
}
execUserPreload()
{
setup();
}
disableCaches()
{
__var Reg;
__message("Disabling MPU and Caches...");
// Disable MPU, I and D caches
Reg = __jtagCP15ReadReg(1, 0, 0, 0);
Reg &= ~((1<<12) | (1<<2));
__jtagCP15WriteReg(1, 0, 0, 0, Reg);
// Disable ECC cache
Reg = __jtagCP15ReadReg(1, 0, 0, 1);
Reg &= 0xFFFFFFC7; // Clear bits 5:3
Reg |= (0x4 << 3);
__jtagCP15WriteReg(1, 0, 0, 1, Reg);
}
configureWatchdog()
{
if(!(__readMemory32(0xB060C048, "Memory") & 0x01000000)) // HWDG_CFG.LOCK == 0
{
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x00000000, 0xB060C02C, "Memory"); // HWDG_TRG0CFG = 0
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x00000000, 0xB060C030, "Memory"); // HWDG_TRG1CFG = 0
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x00000000, 0xB060C034, "Memory"); // HWDG_RUNLLS = 0
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x01000000, 0xB060C038, "Memory"); // HWDG_RUNULS = 0x01000000
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x01000005, 0xB060C048, "Memory"); // HWDG_CFG, LOCK = 1, WDEN = 1, ALLOWSTOPCLK = 1
}
}
execUserReset()
{
__message "[execUserReset]";
// This will call the Reset function of the J-Link DLL,
// but the custom reset strategy in the script file will be executed
__hwReset(0);
}
setup()
{
disableCaches();
configureWatchdog();
execUserReset();
}
execUserPreload()
{
setup();
}
disableCaches()
{
__var Reg;
__message("Disabling MPU and Caches...");
// Disable MPU, I and D caches
Reg = __jtagCP15ReadReg(1, 0, 0, 0);
Reg &= ~((1<<12) | (1<<2));
__jtagCP15WriteReg(1, 0, 0, 0, Reg);
// Disable ECC cache
Reg = __jtagCP15ReadReg(1, 0, 0, 1);
Reg &= 0xFFFFFFC7; // Clear bits 5:3
Reg |= (0x4 << 3);
__jtagCP15WriteReg(1, 0, 0, 1, Reg);
}
configureWatchdog()
{
if(!(__readMemory32(0xB060C048, "Memory") & 0x01000000)) // HWDG_CFG.LOCK == 0
{
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x00000000, 0xB060C02C, "Memory"); // HWDG_TRG0CFG = 0
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x00000000, 0xB060C030, "Memory"); // HWDG_TRG1CFG = 0
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x00000000, 0xB060C034, "Memory"); // HWDG_RUNLLS = 0
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x01000000, 0xB060C038, "Memory"); // HWDG_RUNULS = 0x01000000
__writeMemory32(0xEDACCE55, 0xB060C000, "Memory"); // HWDG_PROT unlock key
__writeMemory32(0x01000005, 0xB060C048, "Memory"); // HWDG_CFG, LOCK = 1, WDEN = 1, ALLOWSTOPCLK = 1
}
}
setup()
{
disableCaches();
configureWatchdog();
}
execUserPreload()
{
setup();
}
This diff is collapsed.
@echo off
set PRODUCT=C:\Program Files\Polyspace\R2019b
set OPTIONS_FILE=.\options.opts
set EXTRA_OPTIONS_FILE=.\extra_options.txt
set RESULTS_DIR=.\BugFinder
REM launch Bug Finder
"%PRODUCT%\polyspace\bin\polyspace-bug-finder-nodesktop.exe" -options-file "%OPTIONS_FILE%" -options-file "%EXTRA_OPTIONS_FILE%" -results-dir "%RESULTS_DIR%"
REM launch the UI to view the results
"%PRODUCT%\polyspace\bin\polyspace.exe" -results-dir "%RESULTS_DIR%"
Exit /B 0
\ No newline at end of file
@echo off
REM Script that will launch polyspace-configure on the current IAR EW project.
REM first parameter : path to the project (.ewp)
REM second parameter : configuration of the project (Debug, Release...)
set PRODUCT=C:\Program Files\Polyspace\R2019b
set BUILD_COMMAND=C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\common\bin\IarBuild.exe
set OPTIONS_FILE=.\options.opts
set PROJECT_PATH=%1
set CONFIG=%2
REM The build command is:
REM C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\common\bin\IarBuild.exe "path\to\the_project.eww" -build Debug
echo(
echo ***************************
echo * Working, please wait... *
echo ***************************
echo(
REM launch polyspace-configure on the build command
"%PRODUCT%\polyspace\bin\polyspace-configure.exe" -allow-overwrite -output-options-file "%OPTIONS_FILE%" "%BUILD_COMMAND%" %PROJECT_PATH% -build %CONFIG%
echo(
echo ********
echo * Done *
echo ********
Exit /B 0
\ No newline at end of file
This diff is collapsed.
-checkers all
-disable-checkers FLOAT_ABSORPTION,BITWISE_NEG,INT_PRECISION_EXCEEDED,FLOAT_STD_LIB,INT_STD_LIB,INVALID_OPERATION_ON_BOOLEAN,BAD_PLAIN_CHAR_USE,STRLIB_BUFFER_OVERFLOW,STRLIB_BUFFER_UNDERFLOW,MEM_STD_LIB,STR_STD_LIB,MOVE_CONST_OBJECT,OUT_BOUND_PTR,PTR_TO_DIFF_ARRAY,PTR_CAST,PUTENV_AUTO_VAR,PATH_BUFFER_OVERFLOW,OBJECT_SIZE_MISMATCH,ALIGNMENT_CHANGE,BAD_FREE,BAD_DELETE,WIN_MISMATCH_DEALLOC,UNPROTECTED_MEMORY_ALLOCATION,FREED_PTR,EXIT_ABNORMAL_HANDLER,TEMP_OBJECT_ACCESS,IO_INTERLEAVING,ASSERT,BAD_FILE_ACCESS_MODE_STATUS,UNPROTOTYPED_FUNC_CALL,MEMSET_INVALID_VALUE,CHAR_EOF_CONFUSED,OVERLAPPING_COPY,INVALID_ENV_POINTER,MISSING_ERRNO_RESET,EXCP_CAUGHT_BY_VALUE,EXCP_HANDLER_HIDDEN,BAD_FLOAT_OP,STRING_FORMAT,SIG_HANDLER_ASYNC_UNSAFE,SIG_HANDLER_ASYNC_UNSAFE_STRICT,IMPROPER_ARRAY_INIT,VA_ARG_INCORRECT_TYPE,BAD_PTR_SCALING,OFFSETOF_MISUSE,VA_START_MISUSE,VA_START_INCORRECT_TYPE,INLINE_CONSTRAINT_NOT_RESPECTED,INVALID_MEMORY_ASSUMPTION,INVALID_FILE_POS,BAD_EQUAL_USE,BAD_EQUAL_EQUAL_USE,OTHER_STD_LIB,INVALID_VA_LIST_ARG,MEMCMP_PADDING_DATA,MEMCMP_FLOAT,MEMCMP_STRINGS,MISSING_BYTESWAP,MISSING_NULL_CHAR,FILE_OBJECT_MISUSE,ERRNO_MISUSE,NARROW_WIDE_STR_MISUSE,SIG_HANDLER_ERRNO_MISUSE,FLEXIBLE_ARRAY_MEMBER_STRUCT_MISUSE,CHARACTER_MISUSE,NON_REENTRANT_STD_RETURN,WRITE_INTERNAL_BUFFER_RETURNED_FROM_STD_FUNC,SIZEOF_MISUSE,OPERATOR_PRECEDENCE,MACRO_USED_AS_OBJECT,PRE_DIRECTIVE_MACRO_ARG,QUALIFIER_MISMATCH,SIG_HANDLER_COMP_EXCP_RETURN,SIDE_EFFECT_IN_UNSAFE_MACRO_ARG,SIDE_EFFECT_IGNORED,SIG_HANDLER_CALLING_SIGNAL,SIG_HANDLER_SHARED_OBJECT,STD_FUNC_ARG_MISMATCH,STREAM_WITH_SIDE_EFFECT,TOO_MANY_VA_ARG_CALLS,TYPEDEF_MISMATCH,PRE_UCNAME_JOIN_TOKENS,UNNAMED_NAMESPACE_IN_HEADER,UNSAFE_STR_TO_NUMERIC,INDETERMINATE_STRING,MEMSET_INVALID_SIZE,NON_POSITIVE_VLA_SIZE,CONSTANT_OBJECT_WRITE,PTR_SIZEOF_MISMATCH,DEACTIVATED_CODE,VAR_SHADOWING,USELESS_WRITE,FILE_EXPOSURE_TO_CHILD,CHROOT_MISUSE,INAPPROPRIATE_IO_ON_DEVICE,UNSAFE_SYSTEM_CALL,NON_SECURE_TEMP_FILE,PATH_TRAVERSAL,BAD_PRIVILEGE_DROP_ORDER,MISSING_PRIVILEGE_DROP_CHECK,BAD_UMASK,DANGEROUS_PERMISSIONS,UNSAFE_STD_FUNC,OBSOLETE_STD_FUNC,RAND_SEED_CONSTANT,RAND_SEED_PREDICTABLE,VULNERABLE_PRNG,ERRNO_NOT_CHECKED,RELATIVE_PATH_CMD,FUNC_PTR_ABSOLUTE_ADDR,HARD_CODED_SENSITIVE_DATA,BAD_NETWORK_CONNECT_ORDER,PADDING_INFO_LEAK,RELATIVE_PATH_LIB,MISSING_SWITCH_CASE,READLINK_MISUSE,SENSITIVE_DATA_PRINT,SENSITIVE_HEAP_NOT_CLEARED,SENSITIVE_STACK_NOT_CLEARED,CRYPTO_CIPHER_CONSTANT_IV,CRYPTO_CIPHER_PREDICTABLE_IV,CRYPTO_CIPHER_NO_IV,CRYPTO_CIPHER_CONSTANT_KEY,CRYPTO_CIPHER_PREDICTABLE_KEY,CRYPTO_CIPHER_NO_KEY,CRYPTO_CIPHER_BAD_FUNCTION,CRYPTO_CIPHER_NO_DATA,CRYPTO_CIPHER_NO_FINAL,CRYPTO_CIPHER_NO_ALGORITHM,CRYPTO_CIPHER_WEAK_CIPHER,CRYPTO_CIPHER_WEAK_MODE,CRYPTO_PKEY_INCORRECT_INIT,CRYPTO_PKEY_INCORRECT_KEY,CRYPTO_PKEY_NO_DATA,CRYPTO_PKEY_NO_PARAMS,CRYPTO_PKEY_NO_PEER,CRYPTO_PKEY_NO_PRIVATE_KEY,CRYPTO_PKEY_NO_PUBLIC_KEY,CRYPTO_PKEY_WEAK_PARAMS,CRYPTO_RSA_NO_BLINDING,CRYPTO_RSA_NO_PADDING,CRYPTO_RSA_LOW_EXPONENT,CRYPTO_RSA_WEAK_PADDING,CRYPTO_MD_BAD_FUNCTION,CRYPTO_MD_NO_FINAL,CRYPTO_MD_NO_ALGORITHM,CRYPTO_MD_NO_SALT,CRYPTO_MD_NO_DATA,CRYPTO_MD_WEAK_HASH,CRYPTO_SSL_NO_CA,CRYPTO_SSL_NO_PRIVATE_KEY,CRYPTO_SSL_NO_CERTIFICATE,CRYPTO_SSL_WEAK_PROTOCOL,CRYPTO_SSL_HOSTNAME_NOT_CHECKED,CRYPTO_SSL_NO_ROLE,CRYPTO_SSL_BAD_ROLE,CRYPTO_SSL_CERT_NOT_CHECKED,TAINTED_PATH_CMD,TAINTED_HOSTID,TAINTED_PATH_LIB,TAINTED_LOOP_BOUNDARY,TAINTED_MEMORY_ALLOC_SIZE,TAINTED_PTR_OFFSET,TAINTED_INT_DIVISION,TAINTED_INT_MOD,TAINTED_SIGN_CHANGE,TAINTED_VLA_SIZE,TAINTED_ENV_VARIABLE,TAINTED_PTR,ASYNCHRONOUSLY_CANCELLABLE_THREAD,ATOMIC_VAR_SEQUENCE_NOT_ATOMIC,ATOMIC_VAR_ACCESS_TWICE,LOCAL_ADDR_ESCAPE_THREAD,BLOCKING_WHILE_LOCKED,DATA_RACE,DATA_RACE_ALL,DATA_RACE_STD_LIB,SPURIOUS_FAILURE_NOT_WRAPPED_IN_LOOP,SPURIOUS_WAKEUP_NOT_WRAPPED_IN_LOOP,DOUBLE_JOIN_OR_DETACH,BAD_UNLOCK,BAD_LOCK,MULTI_MUTEX_WITH_ONE_COND_VAR,SIGNALED_COND_VAR_NOT_UNIQUE,SIGNAL_USE_IN_MULTITHREADED_PROGRAM,THREAD_MEM_LEAK,THREAD_KILLED_WITH_SIGNAL,UNDEFINED_THREAD_ID,RETURN_NOT_REF_TO_THIS,MISSING_BASE_ASSIGN_OP_CALL,DTOR_NOT_VIRTUAL,MEMOP_ON_NONTRIVIAL_OBJ,INCOMPLETE_CLASS_PTR,MISSING_COPY_CTOR_CALL,VIRTUAL_FUNC_HIDING,LAMBDA_TYPE_MISUSE,NON_INIT_MEMBER,MISSING_EXPLICIT_KEYWORD,MISSING_VIRTUAL_INHERITANCE,OBJECT_SLICING,MISSING_OVERLOAD_NEW_FOR_ALIGNED_OBJ,PARTIAL_OVERRIDE,BREAKING_DATA_ENCAPSULATION,MISSING_SELF_ASSIGN_TEST,CONST_PARAMETER_VALUE,CONST_RETURN_VALUE,EMPTY_DESTRUCTOR_DEFINED,INEFFICIENT_BASIC_STRING_LENGTH,STD_ENDL_USE,MOST_VEXING_PARSE,BITWISE_ARITH_MIX,WRITE_REFERENCE_TO_CONST_TYPE,CV_QUALIFIED_REFERENCE_TYPE,DELETE_OF_VOID_PTR,HARD_CODED_BUFFER_SIZE,HARD_CODED_LOOP_BOUNDARY,HARD_CODED_MEM_SIZE,INCORRECT_INDENTATION,FLEXIBLE_ARRAY_MEMBER_INCORRECT_SIZE,PASS_BY_VALUE,MORE_THAN_ONE_STATEMENT,SEMICOLON_TERMINATED_MACRO,MULTI_STMT_MACRO,MISSING_SWITCH_BREAK,MISSING_OVERLOAD_NEW_DELETE_PAIR,MISSING_FREED_PTR_RESET,INAPPROPRIATE_TYPE_IN_SWITCH,SEMICOLON_CTRL_STMT_SAME_LINE,UNMODIFIED_VAR_NOT_CONST,FORBIDDEN_FUNC,SETJMP_LONGJMP_USE,UNCALLED_FUNC,PARTIALLY_ACCESSED_ARRAY,INT_TO_FLOAT_PRECISION_LOSS,STR_FORMAT_BUFFER_OVERFLOW,COPY_MODIFYING_SOURCE,SIZEOF_USELESS_OP,
-misra3 from-file
-cert-c from-file
-checkers-selection-file "C:\Users\Administrator\Desktop\Polyspace_Rules_Configure\MISRA_ES97000_RULES.xml"
<?xml version="1.0" encoding="iso-8859-1"?>
<workspace>
<project>
<path>$WS_DIR$\Application\Application.ewp</path>
</project>
<batchBuild/>
</workspace>
<?xml version="1.0" encoding="iso-8859-1"?>
<userOverrides>
<override>
<path>D:\TYW-project\GEELY\E51\E51\git\E51\Source\Application\Device\Buzzer.c</path>
<encoding>UTF-8</encoding>
</override>
<override>
<path>D:\TYW-project\&#x5409;&#x5229;\Geely_FE-7B\Code\APP\Source\Application\Alarm\Popup_List.h</path>
<encoding>UTF-8</encoding>
</override>
<override>
<path>D:\TYW-project\&#x5409;&#x5229;\Geely_FE-7B\Code\APP\Source\Application\Alarm\Popup_Scheduler.c</path>
<encoding>UTF-8</encoding>
</override>
<override>
<path>D:\TYW-project\&#x5409;&#x5229;\Geely_FE-7B\Code\APP\Source\Application\Alarm\Popup_Scheduler.h</path>
<encoding>UTF-8</encoding>
</override>
<override>
<path>D:\TYW-project\&#x5409;&#x5229;\Geely_FE-7B\Code\APP\Source\Application\Alarm\Sound_Player.c</path>
<encoding>UTF-8</encoding>
</override>
<override>
<path>D:\TYW-project\&#x5409;&#x5229;\Geely_FE-7B\Code\APP\Source\Application\BackLight\BackLight.h</path>
<encoding>UTF-8</encoding>
</override>
<override>
<path>D:\TYW-project\&#x5409;&#x5229;\Geely_FE-7B\Code\APP\Source\Application\CAN_App\CAN_APP.c</path>
<encoding>UTF-8</encoding>
</override>
<override>
<path>D:\TYW-project\&#x5409;&#x5229;\Geely_FE-7B\Code\APP\Source\Application\Power\System_Status_Monitor.h</path>
<encoding>UTF-8</encoding>
</override>
</userOverrides>
This diff is collapsed.
# FE-7B
## Git开发流程
---
### 主分支master
代码库应该有且只有一个主分支。所有提供给用户使用的正式版本,都在这个主分支上发布。
### 开发分支Develop
主分支只用来分布重大版本,日常开发应该在另一条分支上完成。我们把开发用的分支,叫做Develop。
#Git创建Develop分支的命令
git checkout -b develop master
#将Develop分支发布到Master分支的命令
git checkout master
git merge --no-ff develop
--no-ff参数:默认情况下,Git执行"快进式合并",会直接将Master分支指向Develop分支。
强推,不允许使用
### 临时性分支
前面讲到版本库的两条主要分支:Master和Develop。前者用于正式发布,后者用于日常开发。其实,常设分支只需要这两条就够了,不需要其他了。
但是,除了常设分支以外,还有一些临时性分支,用于应对一些特定目的的版本开发。临时性分支主要有三种:
* 功能分支 (feature)
* 预发布分支 (release)
* 修补bug分支 (fixbug)
这三种分支都属于临时性需要,使用完以后,应该删除,使得代码库的常设分支始终只有Master和Develop。
### 功能分支 feature branches
为了开发某种特定功能,从Develop分支上面分出来的。开发完成后,要再并入Develop。
功能分支的名字,可以采用feature-*的形式命名。
#创建一个功能分支
git checkout -b feature-x develop
#合并到develop分支
git checkout develop
git merge --no--ff feature-x
#删除feature分支
git branch -d feature-x
### 预发布分支 release branches
指发布正式版本之前(即合并到Master分支之前),我们可能需要有一个预发布的版本进行测试。
预发布分支是从Develop分支上面分出来的,预发布结束以后,必须合并进Develop和Master分支。它的命名,可以采用release-*的形式。
#创建一个预发布分支:
git checkout -b release-x develop
#确认没有问题后,合并到master分支:
git checkout master
git merge --no-ff release-x
# 对合并生成的新节点,做一个标签
git tag -a x
#再合并到develop分支:
git checkout develop
git merge --no-ff release-x
#最后记得删除预发布分支:
git branch -d release-x
### 修补bug分支 hotfixes
软件正式发布以后,难免会出现bug。这时就需要创建一个分支,进行bug修补。
修补bug分支是从Master分支上面分出来的。修补结束以后,再合并进Master和Develop分支。它的命名,可以采用fixbug-*的形式。
#创建一个修补bug分支:
git checkout -b fixbug-xx master
#修补结束后,合并到master分支:
git checkout master
git merge --no-ff fixbug-xx
git tag -a xx
#再合并到develop分支:
git checkout develop
git merge --no--ff fixbug-xx
#最后,删除"修补bug分支":
git branch -d fixbug-xx
---
### 多人协作流程
首先,可以试图用git push origin <branch-name>推送自己的修改;
如果推送失败,则因为远程分支比你的本地更新,需要先用git pull试图合并;
如果合并有冲突,则解决冲突,并在本地提交;
没有冲突或者解决掉冲突后,再用git push origin <branch-name>推送就能成功!
如果git pull提示no tracking information,则说明本地分支和远程分支的链接关系没有创建,
用命令git branch --set-upstream-to <branch-name> origin/<branch-name>。
---
#### 实际操作流程
##### 方案一
拉取Dev分支
基于Dev分支开辟自己本地功能分支进行修改
修改结束后再次拉取Dev分支,保证Dev分支最新
将修改后的本地功能分支合并到Dev分支
申请将Dev分支进行推送
##### 方案二
拉取Dev分支
基于Dev分支开辟自己本地功能分支进行修改
修改结束后再次拉取Dev分支,保证Dev分支最新
将Dev分支合并到修改后的本地功能分支
申请将本地功能分支进行推送
## __人员任务划分__
- 底层驱动(张暄+孙学刚)--2.5(first)----2020-02-10结束
```
时钟------------------张暄/孙学刚
IO口------------------张暄/孙学刚
Uart------------------张暄/孙学刚
Can/FD----------------张暄/孙学刚
电机------------------张暄/孙学刚
PWM-------------------张暄/孙学刚
ADC-------------------张暄/孙学刚
频率捕获--------------张暄/孙学刚
休眠.唤醒-------------张暄/孙学刚
存储------------------张暄/孙学刚
RTC(有精度要求)-------张暄/孙学刚
BD8379----------------张暄/孙学刚
HT1629----------------张暄/孙学刚
I2S-------------------张暄/孙学刚
外部flash-------------张暄/孙学刚
软件框架--------------张暄/孙学刚
```
- 应用软件-2020-2-01-----2020-02-10可以出一版-2020-02-12可以集成完--2020.2.20结束
```
文字和声音报警-------赵建智---李茂军
电源管理-------------赵林源
指示灯---------------胡松
段码屏---------------胡松
can数据处理----------赵建智
燃油(燃油格,续航,平均油耗,瞬时油耗-matlab)--(张暄,于金凤,胡志松,王晨,史明泉)-10天--先期需要流程图
车速.转速.水温-------于金风,姜凯文
行车电脑(ODO,TRIP.保养.时间,温度,档位)---赵建智/李林泽
背光策略------------赵林源
巡航(定速,限速)-----李茂军
按键处理(UE)--------李茂军
安全带报警----------李茂军
门开报警------------李林泽
胎压(直接,间接)-----李林泽
```
- 诊断,网络,刷写-吕伟阳/滕敬轩-2020.2.15
```
诊断
网络
刷写
```
#include "AlarmGeneralFilie.h"
/*报警提示信息状态数据表1*/
uint8_t Alarm_Status[100]; /*[0]数据不使用,其它数组序号对应报警编号
[i] bit0:=1 对应的报警已发生,=0对应的报警已取消 (与报警请求表和队列同步)
[i] bit1:=1 表示已完成nS的文字报警显示(2S或4S) (完成第一次报警显示)
[i] bit2:=1 表示报警在循环显示队列中
[i] bit3:=0 表示当前报警是第1次显示, =1 表示当前报警是非第1次显示
[i] bit4:=1 表示对应编号的声音报警已经完成
[i] bit5:=1 表示对应编号的声音报警触发过
[i] bit6:
[i] bit7:=1表示在行车电脑界面显示过(新加)*/
uint8_t g_PowerSt;
const uint8_t OSUnMapTbl[256] =
{
0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x00 to 0x0F */
4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x10 to 0x1F */
5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x20 to 0x2F */
4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x30 to 0x3F */
6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x40 to 0x4F */
4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x50 to 0x5F */
5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x60 to 0x6F */
4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x70 to 0x7F */
7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x80 to 0x8F */
4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x90 to 0x9F */
5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0xA0 to 0xAF */
4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0xB0 to 0xBF */
6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0xC0 to 0xCF */
4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0xD0 to 0xDF */
5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0xE0 to 0xEF */
4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 /* 0xF0 to 0xFF */
};
const uint8_t OSMapTbl[8] =
{
0x01,
0x02,
0x04,
0x08,
0x10,
0x20,
0x40,
0x80,
};
/**@brief 设置查找表中所在分组中的位置
* @param[in] *p8 需要设置的查找表
* @param[in] m_index 元素位置
* @return
*/
void General_Set_MapBit(uint8_t p8[], uint8_t m_index)
{
p8[m_index >> 3u] |= OSMapTbl[m_index & 7u];
}
/**@brief 清除查找表中所在分组中的位置
* @param[in] *p8 需要清除的查找表
* @param[in] m_index 元素位置
* @return
*/
void General_Clr_MapBit(uint8_t p8[], uint8_t m_index)
{
p8[m_index >> 3u] &= (uint8_t)(~OSMapTbl[m_index & 7u]);
}
/**@brief 设置报警状态数组指定位
* @param[in] -m_Idx -报警编号
* @param[in] -m_bit -指定bit
* @return None
*/
void General_AlarmSt_Set(uint8_t m_Idx, uint8_t m_bit)
{
Set_Bit(Alarm_Status[m_Idx], m_bit);
}
/**@brief 清除报警状态数组指定位
* @param[in] -m_Idx -报警编号
* @param[in] -m_bit -指定bit
* @return None
*/
void General_AlarmSt_Clr(uint8_t m_Idx, uint8_t m_bit)
{
Clr_Bit(Alarm_Status[m_Idx], m_bit);
}
/**@brief 获取报警状态数组指定位是否置1
* @param[in] -m_Idx -报警编号
* @param[in] -m_bit -指定bit
* @return 1 置位 0 未置位
*/
uint8_t General_AlarmSt_True(uint8_t m_Idx, uint8_t m_bit)
{
uint8_t m_Result;
if (Bit_Is_Set(Alarm_Status[m_Idx], m_bit))
{
m_Result = 1u;
}
else
{
m_Result = 0u;
}
return m_Result;
}
/**@brief 获取报警状态数组指定位是否清0
* @param[in] -m_Idx -报警编号
* @param[in] -m_bit -指定bit
* @return 1 清零 0 未清零
*/
uint8_t General_AlarmSt_False(uint8_t m_Idx, uint8_t m_bit)
{
uint8_t m_Result;
if (Bit_Is_Clr(Alarm_Status[m_Idx], m_bit))
{
m_Result = 1u;
}
else
{
m_Result = 0u;
}
return m_Result;
}
uint8_t General_AlarmSt_Value(uint8_t m_Idx)
{
uint8_t m_Result;
m_Result = Alarm_Status[m_Idx];
return m_Result;
}
void General_Set_PowerSt(uint8_t PowerSt)
{
g_PowerSt = PowerSt;
}
/*
0---IG OFF
1---IG ON
*/
uint8_t General_Get_PowerSt(void)
{
uint8_t m_PowerSt;
m_PowerSt = g_PowerSt;
return m_PowerSt;
}
\ No newline at end of file
#ifndef _AlarmGeneralFile_H_
#define _AlarmGeneralFile_H_
#include "stdint.h"
#define Clr_Bit(p, b) (p) &= (~(1u << (b)))
#define Set_Bit(p, b) (p) |= (1u << (b))
#define Bit_Is_Set(p, b) ((p) &(1u << (b)))
#define Bit_Is_Clr(p, b) (!((p) & (1u << (b))))
extern const uint8_t OSUnMapTbl[256u];
extern const uint8_t OSMapTbl[8u];
void General_Set_MapBit(uint8_t p8[], uint8_t m_index);
void General_Clr_MapBit(uint8_t p8[], uint8_t m_index);
void General_AlarmSt_Set(uint8_t m_Idx, uint8_t m_bit);
void General_AlarmSt_Clr(uint8_t m_Idx, uint8_t m_bit);
uint8_t General_AlarmSt_False(uint8_t m_Idx, uint8_t m_bit);
uint8_t General_AlarmSt_True(uint8_t m_Idx, uint8_t m_bit);
uint8_t General_AlarmSt_Value(uint8_t m_Idx);
uint8_t General_Get_PowerSt(void);
void General_Set_PowerSt(uint8_t PowerSt);
#endif
#ifndef _BUZZERCTRL_INTERFACE_H_
#define _BUZZERCTRL_INTERFACE_H_
#include "stdint.h"
extern void BuzzerForceCtrlRequest(void); /*请求控制*/
extern void BuzzerForceCtrlRelease(void); /*释放控制*/
extern uint8_t GetBuzzerForceCtrlSta(void); /*获取控制状态*/
extern void BuzzerCtrlPlayBack(void); /*发声*/
extern void BuzzerCtrlStopPlaying(void); /*停止发声*/
#endif
#ifndef _POPUP_INTERFACE_H_
#define _POPUP_INTERFACE_H_
#include "stdint.h"
#include "Popup_List.h"
#include "Sound_List.h"
extern void Popup_Scheduler_Init(void);
extern void Popup_Scheduling_Service(void);
extern void PopupAndSound_Delete(uint8_t PopupID);
extern void Popup_Request(uint8_t PopupID);
extern void Popup_Delete(uint8_t PopupID);
extern void Popup_Clear(uint8_t PopupID);
extern uint8_t Popup_Get_Status(uint8_t PopupID);
extern void Sound_Scheduler_Init(void);
extern void Sound_Request(uint8_t Sound, uint8_t ReqCode);
extern void Sound_Delete(uint8_t Sound);
extern void Sound_Scheduling_Service(void);
extern uint8_t Popup_Get_Current_Type(void);
extern uint8_t Popup_Get_Current_Message(void);
extern uint8_t Popup_Get_Current_Sound(void);
extern uint8_t Popup_Get_Current_Sound_Req_Code(void);
extern void DteRemind(void);
extern uint8_t GetCurSndSrcIndx(void); /*获取正在播放报警音源号*/
extern uint8_t Get_SoundScheduling_Current(void);/*获取正在播放报警音*/
extern void SetRADAR_SOUND(uint8_t Level);
#endif /* _POPUP_INTERFACE_H_ */
#ifndef _POPUP_LIST_H_
#define _POPUP_LIST_H_
#include "stdint.h"
/*限制最大254个*/
enum PopupName
{
POPUP_Radar_Changming=0,
POPUP_Radar_1HZ,
POPUP_Radar_2HZ,
POPUP_Radar_4HZ,
POPUP_RADAR_SYSTEM_FAILURE,
POPUP_RADAR_SENSOR_FAILURE,
POPUP_RADAR_SWITCH_FAILURE,
POPUP_RADAR_CHECK_OK,
POPUP_EPB_Status,
POPUP_SEATBELT_DR_1HZ,
POPUP_SEATBELT_DR_2HZ,
POPUP_DoorOpen,
POPUP_DoorOpen_1HZ,
POPUP_EBD_fault,
POPUP_ABS,
POPUP_EPS,
POPUP_Park_Brak,
POPUP_MotorFault,
POPUP_SOC_Fault,
POPUP_InsulationFault,
POPUP_SOC_HT,
POPUP_Energy_Recovery,
POPUP_Energy_Recovery_1,
POPUP_ECO,
POPUP_READY,
POPUP_PowerLimit,
POPUP_SOC_LP,
POPUP_SOC_CF,
POPUP_SystemFault,
POPUP_SystemFault1,
POPUP_GearFault,
POPUP_WeightOverload,
POPUP_WeightOverload2,
POPUP_RemoteLocking,
POPUP_PositionNotClosed,
POPUP_DepartureReminder,
POPUP_OTA_0,
POPUP_OTA_1,
POPUP_OTA_2,
POPUP_OTA_3,
POPUP_OTA_4,
POPUP_OTA_5,
POPUP_ESC,
POPUP_Over_Speed,
POPUP_NUMBER_TOTAL, /*报警总数*/
};
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef _POPUPS_H_
#define _POPUPS_H_
#include "stdint.h"
#include "Popup_Scheduler.h"
#include "Communication_Over_CAN.h"
#include "Sound_Scheduler.h"
#include "EOL_Para.h"
#include "Common_Interface.h"
#include "Flash_synchronizer.h"
#include "Line_In.h"
#include "MBD_Model.h"
#define IGN_ON 1u
#define IGN_OFF 0u
#define TCU_FAILURE_Red 2u
#define TCU_FAILURE_Yellow 1u
#define TCU_FAILURE_OFF 0u
#define Human_Language 10u
#define Can_Lost 0x55u
#define Over_Speed_Trigger 1200u
#define Over_Speed_Remove 1150u
void Popups_Polling(void);
void Popups_Sound_Playing(uint8_t PopupSnd);
void Popups_Management_Service(void);
void SetRADAR_SOUND(uint8_t Level);
uint8_t Get_OverSpeed_Sts(void);/*0为不闪烁,1为闪烁*/
uint8_t Get_OIL_LOW_Sts(void);
uint8_t Get_CPDWarning_Valid(void);
uint8_t Get_CPDWarningSts(void);
uint8_t Get_POP_3S_Clock(void);/*>=30U时可以报警*/
uint8_t PopupGetIGst(void);/*返回报警出发时判断出的电源状态*/
void Popups_KL15_Init(void);
void Popups_IG_OFF_Init(void);
#endif
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef _CAN_APP_H_
#define _CAN_APP_H_
#include "RTE_CAN.h"
/******************************************************************************
Bus-off状态
******************************************************************************/
#define MSCAN0_BUS_STABLE 0x00U
#define MSCAN0_BUS_OFF_LV1 0x01U
#define MSCAN0_BUS_OFF_LV2 0x02U
#define MSCAN0_BUS_LIMP 0x03U
/******************************************************************************
Bus-off设置
******************************************************************************/
#define MSCAN0_BUS_OFF_AUTO_RECOVERY 0U /* Bus-off自动恢复使能 */
#define MSCAN0_BUS_OFF_LV1_RECOVERY_TIME 100U /* Bus-off恢复时间,单位ms */
#define MSCAN0_BUS_OFF_LV2_RECOVERY_TIME 1000U /* Bus-off恢复时间,单位ms */
#define MSCAN0_BUS_LIMP_MODE_ENABLE 0U /* 跛行模式使能 */
#define MSCAN0_BUS_LIMP_MODE_THRESHOLD 11U /* 进入跛行模式门限 */
void Can_Abort_All(void);
void Can_BusOff_Fun(void);
uint8_t CrcCheckSum(uint8_t data[], uint8_t len);
/*MSG*/
uint8_t getBUS_OFF_Status(void);
uint8_t getBUS_OFF_FLAG(void);
void Can_BusOffRecover(void);
#endif
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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