KEIL Step 2

This commit is contained in:
Clement Mauperon 2023-03-21 17:19:14 +01:00
parent 37906fbfd8
commit 672b04586b
5 changed files with 85 additions and 67 deletions

View file

@ -75,7 +75,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -153,7 +153,24 @@
<Name>-U066CFF574857847167074929 -O2254 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>28</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218682</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\Src\principal.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\BacASable\Src/principal.c\28</Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
<Ww>
<count>0</count>
@ -194,7 +211,7 @@
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>1</aLa>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
@ -292,7 +309,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -370,24 +387,7 @@
<Name>-U066CFF574857847167074929 -O2254 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>44</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218704</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\Src\Delay.s</Filename>
<ExecCommand></ExecCommand>
<Expression>\\BacASable\Src/Delay.s\44</Expression>
</Bp>
</Breakpoint>
<Breakpoint/>
<WatchWindow1>
<Ww>
<count>0</count>

View file

@ -10,7 +10,7 @@
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
@ -154,6 +154,14 @@
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>0</SubType>
<ItemText>0x200000A0</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
@ -174,7 +182,7 @@
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aLa>1</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
@ -200,7 +208,12 @@
<Wi>
<IntNumber>0</IntNumber>
<FirstString>((portb &amp; 0x00000002) &gt;&gt; 1 &amp; 0x2) &gt;&gt; 1</FirstString>
<SecondString>FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008</SecondString>
<SecondString>FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000E03F160000000000000000000000000000000000000096020008</SecondString>
</Wi>
<Wi>
<IntNumber>1</IntNumber>
<FirstString>`FlagCligno</FirstString>
<SecondString>008000000000000000000000000000000000F03F01000000000000000000000000000000466C6167436C69676E6F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000002000000000000000000E03F1600000000000000000000000000000000000000080A0008</SecondString>
</Wi>
</LogicAnalyzers>
<DebugDescription>
@ -628,7 +641,7 @@
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Src\Cligno.s</PathWithFileName>

View file

@ -10,7 +10,7 @@
<TargetName>Simu</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
@ -357,7 +357,7 @@
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
<IncludePath>.\Driver</IncludePath>
</VariousControls>
</Aads>
<LDads>
@ -1338,11 +1338,6 @@
<Layers>
<Layer>
<LayName>&lt;Project Info&gt;</LayName>
<LayDesc></LayDesc>
<LayUrl></LayUrl>
<LayKeys></LayKeys>
<LayCat></LayCat>
<LayLic></LayLic>
<LayTarg>0</LayTarg>
<LayPrjMark>1</LayPrjMark>
</Layer>

View file

@ -10,21 +10,49 @@
;Section RAM (read write):
area maram,data,readwrite
FlagCligno dcd 0
; ===============================================================================================
INCLUDE DriverJeuLaser.inc
EXPORT FlagCligno
EXPORT timer_callback
;Section ROM code (read only) :
area moncode,code,readonly
; écrire le code ici
;void timer_callback(void)
;{
; if (FlagCligno==1)
; {
; FlagCligno=0;
; GPIOB_Set(1);
; }
; else
; {
; FlagCligno=1;
; GPIOB_Clear(1);
; }
;}
timer_callback proc
push {lr}
mov r0,#1 ; Argument pour les fonction GPIOB
ldr r4,=FlagCligno ; Ecriture de l'adresse de FlagCligno dans R4
ldrb r5,[r4] ; Ecriture de la valeur de FlagCligno dans R5
cmp r5,#1
bne ClignoUp
; if (FlagCligno == 1)
bl GPIOB_Set
mov r5,#0
b TimerCallbackEnd
ClignoUp
; else if (FlagCligno == 0)
bl GPIOB_Clear
mov r5,#1
TimerCallbackEnd
strb r5,[r4] ; FlagCligno = R5
pop {pc}
endp
END

View file

@ -2,7 +2,9 @@
#include "DriverJeuLaser.h"
void timer_callback(void);
extern void timer_callback(void);
#define CLOCK_FREQ 72000 // kHz
int main(void)
{
@ -16,22 +18,20 @@ CLOCK_Configure();
// configuration du Timer 4 en débordement 100ms
//** Placez votre code là ** //
Timer_1234_Init_ff(TIM4, 100 * CLOCK_FREQ);
// Activation des interruptions issues du Timer 4
// Association de la fonction à exécuter lors de l'interruption : timer_callback
// cette fonction (si écrite en ASM) doit être conforme à l'AAPCS
//** Placez votre code là ** //
// configuration de PortB.1 (PB1) en sortie push-pull
GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL);
//** Placez votre code là ** //
Active_IT_Debordement_Timer(TIM4, 2, timer_callback);
//============================================================================
@ -41,21 +41,3 @@ while (1)
{
}
}
char FlagCligno;
void timer_callback(void)
{
if (FlagCligno==1)
{
FlagCligno=0;
GPIOB_Set(1);
}
else
{
FlagCligno=1;
GPIOB_Clear(1);
}
}