Skip to content

Commit fc6c41b

Browse files
committed
2.1.0
1 parent 58e9dd0 commit fc6c41b

File tree

100 files changed

+29529
-18056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+29529
-18056
lines changed

lesson-01/simulator-iar/project.ewp

+5-5
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363
</option>
364364
<option>
365365
<name>CCOptLevel</name>
366-
<state>1</state>
366+
<state>0</state>
367367
</option>
368368
<option>
369369
<name>CCOptStrategy</name>
@@ -372,7 +372,7 @@
372372
</option>
373373
<option>
374374
<name>CCOptLevelSlave</name>
375-
<state>1</state>
375+
<state>0</state>
376376
</option>
377377
<option>
378378
<name>CCPosIndRopi</name>
@@ -756,7 +756,7 @@
756756
</option>
757757
<option>
758758
<name>IlinkIcfFile</name>
759-
<state>$TOOLKIT_DIR$\CONFIG\generic.icf</state>
759+
<state>$TOOLKIT_DIR$/config/linker/TexasInstruments/TM4C123GH6.icf</state>
760760
</option>
761761
<option>
762762
<name>IlinkIcfFileSlave</name>
@@ -816,7 +816,7 @@
816816
</option>
817817
<option>
818818
<name>IlinkProgramEntryLabel</name>
819-
<state></state>
819+
<state>__iar_program_start</state>
820820
</option>
821821
<option>
822822
<name>DoFill</name>
@@ -989,7 +989,7 @@
989989
</option>
990990
<option>
991991
<name>IlinkTrustzoneImportLibraryOut</name>
992-
<state>###Unitialized###</state>
992+
<state>project_import_lib.o</state>
993993
</option>
994994
<option>
995995
<name>OILinkExtraOption</name>

lesson-02/simulator-iar/project.ewp

+5-5
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363
</option>
364364
<option>
365365
<name>CCOptLevel</name>
366-
<state>1</state>
366+
<state>0</state>
367367
</option>
368368
<option>
369369
<name>CCOptStrategy</name>
@@ -372,7 +372,7 @@
372372
</option>
373373
<option>
374374
<name>CCOptLevelSlave</name>
375-
<state>1</state>
375+
<state>0</state>
376376
</option>
377377
<option>
378378
<name>CCPosIndRopi</name>
@@ -756,7 +756,7 @@
756756
</option>
757757
<option>
758758
<name>IlinkIcfFile</name>
759-
<state>$TOOLKIT_DIR$\CONFIG\generic.icf</state>
759+
<state>$TOOLKIT_DIR$/config/linker/TexasInstruments/TM4C123GH6.icf</state>
760760
</option>
761761
<option>
762762
<name>IlinkIcfFileSlave</name>
@@ -816,7 +816,7 @@
816816
</option>
817817
<option>
818818
<name>IlinkProgramEntryLabel</name>
819-
<state></state>
819+
<state>__iar_program_start</state>
820820
</option>
821821
<option>
822822
<name>DoFill</name>
@@ -989,7 +989,7 @@
989989
</option>
990990
<option>
991991
<name>IlinkTrustzoneImportLibraryOut</name>
992-
<state>###Unitialized###</state>
992+
<state>project_import_lib.o</state>
993993
</option>
994994
<option>
995995
<name>OILinkExtraOption</name>

lesson-03/simulator-iar/project.ewp

+5-5
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363
</option>
364364
<option>
365365
<name>CCOptLevel</name>
366-
<state>1</state>
366+
<state>0</state>
367367
</option>
368368
<option>
369369
<name>CCOptStrategy</name>
@@ -372,7 +372,7 @@
372372
</option>
373373
<option>
374374
<name>CCOptLevelSlave</name>
375-
<state>1</state>
375+
<state>0</state>
376376
</option>
377377
<option>
378378
<name>CCPosIndRopi</name>
@@ -756,7 +756,7 @@
756756
</option>
757757
<option>
758758
<name>IlinkIcfFile</name>
759-
<state>$TOOLKIT_DIR$\CONFIG\generic.icf</state>
759+
<state>$TOOLKIT_DIR$/config/linker/TexasInstruments/TM4C123GH6.icf</state>
760760
</option>
761761
<option>
762762
<name>IlinkIcfFileSlave</name>
@@ -816,7 +816,7 @@
816816
</option>
817817
<option>
818818
<name>IlinkProgramEntryLabel</name>
819-
<state></state>
819+
<state>__iar_program_start</state>
820820
</option>
821821
<option>
822822
<name>DoFill</name>
@@ -989,7 +989,7 @@
989989
</option>
990990
<option>
991991
<name>IlinkTrustzoneImportLibraryOut</name>
992-
<state>###Unitialized###</state>
992+
<state>project_import_lib.o</state>
993993
</option>
994994
<option>
995995
<name>OILinkExtraOption</name>

lesson-04/tm4c123-iar/project.ewp

+3-3
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
<option>
288288
<name>CCAllowList</name>
289289
<version>1</version>
290-
<state>10010100</state>
290+
<state>00000000</state>
291291
</option>
292292
<option>
293293
<name>CCDebugInfo</name>
@@ -363,7 +363,7 @@
363363
</option>
364364
<option>
365365
<name>CCOptLevel</name>
366-
<state>2</state>
366+
<state>0</state>
367367
</option>
368368
<option>
369369
<name>CCOptStrategy</name>
@@ -372,7 +372,7 @@
372372
</option>
373373
<option>
374374
<name>CCOptLevelSlave</name>
375-
<state>2</state>
375+
<state>0</state>
376376
</option>
377377
<option>
378378
<name>CCPosIndRopi</name>

lesson-04/tm4c123-keil/lesson.uvoptx

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219

220220
<Group>
221221
<GroupName>::Device</GroupName>
222-
<tvExp>0</tvExp>
222+
<tvExp>1</tvExp>
223223
<tvExpOptDlg>0</tvExpOptDlg>
224224
<cbSel>0</cbSel>
225225
<RteFlg>1</RteFlg>

lesson-05/tm4c123-iar/project.ewp

+3-3
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
<option>
288288
<name>CCAllowList</name>
289289
<version>1</version>
290-
<state>10010100</state>
290+
<state>00000000</state>
291291
</option>
292292
<option>
293293
<name>CCDebugInfo</name>
@@ -363,7 +363,7 @@
363363
</option>
364364
<option>
365365
<name>CCOptLevel</name>
366-
<state>2</state>
366+
<state>0</state>
367367
</option>
368368
<option>
369369
<name>CCOptStrategy</name>
@@ -372,7 +372,7 @@
372372
</option>
373373
<option>
374374
<name>CCOptLevelSlave</name>
375-
<state>2</state>
375+
<state>0</state>
376376
</option>
377377
<option>
378378
<name>CCPosIndRopi</name>

lesson-06/simulator-iar/main.c

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#include "tm4c.h" // the same as "lm4f120h5qr.h" in the video
2+
3+
#define LED_RED (1U << 1)
4+
#define LED_BLUE (1U << 2)
5+
#define LED_GREEN (1U << 3)
6+
7+
int main(void) {
8+
9+
unsigned int a = 0x5A5A5A5A;
10+
unsigned int b = 0xDEADBEEF;
11+
unsigned int c;
12+
13+
c = a | b; // OR
14+
c = a & b; // AND
15+
c = a ^ b; // XOR
16+
c = ~b; // NOT
17+
c = a << 1; // right-shift
18+
c = a << 2;
19+
c = b >> 1; // left-shift
20+
c = b >> 3;
21+
22+
int x = 1024;
23+
int y = -1024;
24+
int z;
25+
26+
z = x >> 3;
27+
z = y >> 3;
28+
29+
SYSCTL_RCGCGPIO_R |= (1U << 5); // enable clock for GPIOF
30+
GPIO_PORTF_DIR_R |= (LED_RED | LED_BLUE | LED_GREEN);
31+
GPIO_PORTF_DEN_R |= (LED_RED | LED_BLUE | LED_GREEN);
32+
33+
// start with turning all LEDs off
34+
GPIO_PORTF_DATA_R &= ~(LED_RED | LED_BLUE | LED_GREEN);
35+
36+
GPIO_PORTF_DATA_R |= LED_BLUE;
37+
while (1) {
38+
GPIO_PORTF_DATA_R |= LED_RED; // turn the red LED on
39+
40+
int volatile counter = 0;
41+
while (counter < 1000000) { // delay loop
42+
++counter;
43+
}
44+
45+
GPIO_PORTF_DATA_R &= ~LED_RED; // turn the red LED off
46+
counter = 0;
47+
while (counter < 1000000) { // delay loop
48+
++counter;
49+
}
50+
51+
}
52+
//return 0; // unreachable code
53+
}

0 commit comments

Comments
 (0)