Skip to content

Commit 166d0f6

Browse files
committed
7.0.2
fixed problems with QK/QXK ports
1 parent 1ff539c commit 166d0f6

File tree

23 files changed

+467
-396
lines changed

23 files changed

+467
-396
lines changed

examples/arm-cm/dpp_efm32-slstk3401a/qk/armclang/README.txt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ libraries. These relative paths must be modified when the project
1111
is moved to different relative location.
1212

1313

14+
Selecting QK Exception
15+
======================
16+
The QK kernel needs a dedicated exception to return to the thread
17+
context after preemption. The default is to use the NMI exception
18+
for that purpose. However, in case NMI is needed for some other
19+
purpose, the QK port allows you to select a any, otherwise unused
20+
IRQ for that purpose. To choose a given IRQ, you need to define
21+
the macros QK_USE_IRQ_NUM and QK_USE_IRQ_HANDLER. These macros can
22+
be provided on the command-line to the compiler.
23+
24+
For example, for the EFM32 CPU, you might dedicate the IRQ
25+
"CRYPTO_IRQHandler" (see the vector table), with IRQ number 25,
26+
as follows:
27+
28+
QK_USE_IRQ_HANDLER=CRYPTO_IRQHandler
29+
QK_USE_IRQ_NUM=25
30+
31+
1432
Adjusting Stack and Heap Sizes
1533
==============================
1634
The stack and heap sizes are determined in this project by the
@@ -24,7 +42,7 @@ yyy should be 0, as the using the heap is not recommended).
2442

2543
Startup Code
2644
============
27-
The startup code for the TM4C123GH6PM MCU used in this project is
45+
The startup code for the EFM32 MCU used in this project is
2846
located in the "3rd_party" folder in the following location:
2947

3048
3rd_party\efm32pg1b\arm\startup_efm32pg1b.s
@@ -47,4 +65,3 @@ because stack might be corrupted by the time this function is called.
4765
Also, assert_failed() is intended to handle catastrophic errors and
4866
should NOT return.
4967
***
50-

examples/arm-cm/dpp_efm32-slstk3401a/qk/armclang/dpp-qk.uvoptx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
<SetRegEntry>
121121
<Number>0</Number>
122122
<Key>DLGUARM</Key>
123-
<Name></Name>
123+
<Name>d</Name>
124124
</SetRegEntry>
125125
<SetRegEntry>
126126
<Number>0</Number>
@@ -297,7 +297,7 @@
297297
<bEvRecOn>1</bEvRecOn>
298298
<bSchkAxf>0</bSchkAxf>
299299
<bTchkAxf>0</bTchkAxf>
300-
<nTsel>3</nTsel>
300+
<nTsel>4</nTsel>
301301
<sDll></sDll>
302302
<sDllPa></sDllPa>
303303
<sDlgDll></sDlgDll>
@@ -491,7 +491,7 @@
491491
<bEvRecOn>1</bEvRecOn>
492492
<bSchkAxf>0</bSchkAxf>
493493
<bTchkAxf>0</bTchkAxf>
494-
<nTsel>3</nTsel>
494+
<nTsel>4</nTsel>
495495
<sDll></sDll>
496496
<sDllPa></sDllPa>
497497
<sDlgDll></sDlgDll>
@@ -980,7 +980,7 @@
980980
<GroupNumber>4</GroupNumber>
981981
<FileNumber>30</FileNumber>
982982
<FileType>1</FileType>
983-
<tvExp>1</tvExp>
983+
<tvExp>0</tvExp>
984984
<tvExpOptDlg>0</tvExpOptDlg>
985985
<bDave2>0</bDave2>
986986
<PathWithFileName>..\..\..\..\..\ports\arm-cm\qk\armclang\qk_port.c</PathWithFileName>

examples/arm-cm/dpp_efm32-slstk3401a/qk/armclang/dpp-qk.uvprojx

Lines changed: 5 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
<v6Rtti>0</v6Rtti>
338338
<VariousControls>
339339
<MiscControls></MiscControls>
340-
<Define>EFM32PG1B200F256GM48=1 __FPU_PRESENT</Define>
340+
<Define>QK_USE_IRQ_NUM=25 QK_USE_IRQ_HANDLER=CRYPTO_IRQHandler</Define>
341341
<Undefine></Undefine>
342342
<IncludePath>..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b</IncludePath>
343343
</VariousControls>
@@ -547,57 +547,6 @@
547547
<FileName>qk_port.c</FileName>
548548
<FileType>1</FileType>
549549
<FilePath>..\..\..\..\..\ports\arm-cm\qk\armclang\qk_port.c</FilePath>
550-
<FileOption>
551-
<CommonProperty>
552-
<UseCPPCompiler>2</UseCPPCompiler>
553-
<RVCTCodeConst>0</RVCTCodeConst>
554-
<RVCTZI>0</RVCTZI>
555-
<RVCTOtherData>0</RVCTOtherData>
556-
<ModuleSelection>0</ModuleSelection>
557-
<IncludeInBuild>2</IncludeInBuild>
558-
<AlwaysBuild>2</AlwaysBuild>
559-
<GenerateAssemblyFile>2</GenerateAssemblyFile>
560-
<AssembleAssemblyFile>2</AssembleAssemblyFile>
561-
<PublicsOnly>2</PublicsOnly>
562-
<StopOnExitCode>11</StopOnExitCode>
563-
<CustomArgument></CustomArgument>
564-
<IncludeLibraryModules></IncludeLibraryModules>
565-
<ComprImg>1</ComprImg>
566-
</CommonProperty>
567-
<FileArmAds>
568-
<Cads>
569-
<interw>2</interw>
570-
<Optim>0</Optim>
571-
<oTime>2</oTime>
572-
<SplitLS>2</SplitLS>
573-
<OneElfS>2</OneElfS>
574-
<Strict>2</Strict>
575-
<EnumInt>2</EnumInt>
576-
<PlainCh>2</PlainCh>
577-
<Ropi>2</Ropi>
578-
<Rwpi>2</Rwpi>
579-
<wLevel>0</wLevel>
580-
<uThumb>2</uThumb>
581-
<uSurpInc>2</uSurpInc>
582-
<uC99>2</uC99>
583-
<uGnu>2</uGnu>
584-
<useXO>2</useXO>
585-
<v6Lang>0</v6Lang>
586-
<v6LangP>0</v6LangP>
587-
<vShortEn>2</vShortEn>
588-
<vShortWch>2</vShortWch>
589-
<v6Lto>2</v6Lto>
590-
<v6WtE>2</v6WtE>
591-
<v6Rtti>2</v6Rtti>
592-
<VariousControls>
593-
<MiscControls></MiscControls>
594-
<Define>QK_USE_IRQ_NUM=25 QK_USE_IRQ_HANDLER=CRYPTO_IRQHandler</Define>
595-
<Undefine></Undefine>
596-
<IncludePath></IncludePath>
597-
</VariousControls>
598-
</Cads>
599-
</FileArmAds>
600-
</FileOption>
601550
</File>
602551
<File>
603552
<FileName>qk_port.h</FileName>
@@ -711,7 +660,7 @@
711660
<TargetName>dpp-rel</TargetName>
712661
<ToolsetNumber>0x4</ToolsetNumber>
713662
<ToolsetName>ARM-ADS</ToolsetName>
714-
<pCCUsed>6070000::V6.7::.\ARMCLANG</pCCUsed>
663+
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
715664
<uAC6>1</uAC6>
716665
<TargetOption>
717666
<TargetCommonOption>
@@ -1038,7 +987,7 @@
1038987
<v6Rtti>0</v6Rtti>
1039988
<VariousControls>
1040989
<MiscControls></MiscControls>
1041-
<Define>NDEBUG EFM32PG1B200F256GM48=1 __FPU_PRESENT</Define>
990+
<Define>NDEBUG</Define>
1042991
<Undefine></Undefine>
1043992
<IncludePath>..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b</IncludePath>
1044993
</VariousControls>
@@ -1361,7 +1310,7 @@
13611310
<TargetName>dpp-spy</TargetName>
13621311
<ToolsetNumber>0x4</ToolsetNumber>
13631312
<ToolsetName>ARM-ADS</ToolsetName>
1364-
<pCCUsed>6070000::V6.7::.\ARMCLANG</pCCUsed>
1313+
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
13651314
<uAC6>1</uAC6>
13661315
<TargetOption>
13671316
<TargetCommonOption>
@@ -1688,7 +1637,7 @@
16881637
<v6Rtti>0</v6Rtti>
16891638
<VariousControls>
16901639
<MiscControls></MiscControls>
1691-
<Define>Q_SPY EFM32PG1B200F256GM48=1 __FPU_PRESENT</Define>
1640+
<Define>Q_SPY</Define>
16921641
<Undefine></Undefine>
16931642
<IncludePath>..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b</IncludePath>
16941643
</VariousControls>

examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/README.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ relative location.
1515
Stack Size and Heap Size
1616
------------------------
1717
In this project, the size of the C stack and heap are determined in
18-
the linker script blinky-qk.icf (see the next section).
18+
the linker script dpp-qk.icf (see the next section).
1919

2020

2121
Linker Script
@@ -26,6 +26,24 @@ application-specific sizes of the Stack and Heap. This file can be edited
2626
from the IAR EWARM IDE via the Project Options/Linker settings.
2727

2828

29+
Selecting QK Exception
30+
======================
31+
The QK kernel needs a dedicated exception to return to the thread
32+
context after preemption. The default is to use the NMI exception
33+
for that purpose. However, in case NMI is needed for some other
34+
purpose, the QK port allows you to select a any, otherwise unused
35+
IRQ for that purpose. To choose a given IRQ, you need to define
36+
the macros QK_USE_IRQ_NUM and QK_USE_IRQ_HANDLER. These macros can
37+
be provided on the command-line to the compiler.
38+
39+
For example, for the EFM32 CPU, you might dedicate the IRQ
40+
"CRYPTO_IRQHandler" (see the vector table), with IRQ number 25,
41+
as follows:
42+
43+
QK_USE_IRQ_HANDLER=CRYPTO_IRQHandler
44+
QK_USE_IRQ_NUM=25
45+
46+
2947
Startup Code
3048
============
3149
The startup code for the TM4C123GH6PM MCU used in this project is

examples/arm-cm/dpp_efm32-slstk3401a/qk/iar/dpp-qk.ewp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@
215215
<option>
216216
<name>CCDefines</name>
217217
<state>EFM32PG1B200F256GM48</state>
218+
<state>QK_USE_IRQ_HANDLER=CRYPTO_IRQHandler</state>
219+
<state>QK_USE_IRQ_NUM=25</state>
218220
</option>
219221
<option>
220222
<name>CCPreprocFile</name>
@@ -1122,7 +1124,7 @@
11221124
</option>
11231125
<option>
11241126
<name>OGLastSavedByProductVersion</name>
1125-
<state>7.60.1.11206</state>
1127+
<state>9.10.2.39304</state>
11261128
</option>
11271129
<option>
11281130
<name>OGChipSelectEditMenu</name>
@@ -1146,7 +1148,7 @@
11461148
</option>
11471149
<option>
11481150
<name>RTConfigPath2</name>
1149-
<state>$TOOLKIT_DIR$\INC\c\DLib_Config_Normal.h</state>
1151+
<state>$TOOLKIT_DIR$\inc\c\DLib_Config_Normal.h</state>
11501152
</option>
11511153
<option>
11521154
<name>GBECoreSlave</name>
@@ -1232,7 +1234,7 @@
12321234
</option>
12331235
<option>
12341236
<name>DSPExtension</name>
1235-
<state>0</state>
1237+
<state>1</state>
12361238
</option>
12371239
<option>
12381240
<name>TrustZone</name>

examples/arm-cm/dpp_efm32-slstk3401a/qxk/armclang/README.txt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ libraries. These relative paths must be modified when the project
1111
is moved to different relative location.
1212

1313

14+
Selecting QXK Exception
15+
=======================
16+
The QXK kernel needs a dedicated exception to return to the thread
17+
context after preemption by a basic thread. The default is to use
18+
the NMI exception for that purpose. However, in case NMI is needed
19+
for some other purpose, the QXK port allows you to select a any,
20+
otherwise unused IRQ for that purpose. To choose a given IRQ, you
21+
need to define the macros QXK_USE_IRQ_NUM and QXK_USE_IRQ_HANDLER.
22+
These macros can be provided on the command-line to the compiler.
23+
24+
For example, for the EFM32 CPU, you might dedicate the IRQ
25+
"CRYPTO_IRQHandler" (see the vector table), with IRQ number 25,
26+
as follows:
27+
28+
QXK_USE_IRQ_HANDLER=CRYPTO_IRQHandler
29+
QXK_USE_IRQ_NUM=25
30+
31+
1432
Adjusting Stack and Heap Sizes
1533
==============================
1634
The stack and heap sizes are determined in this project by the
@@ -24,7 +42,7 @@ yyy should be 0, as the using the heap is not recommended).
2442

2543
Startup Code
2644
============
27-
The startup code for the TM4C123GH6PM MCU used in this project is
45+
The startup code for the EFM32 MCU used in this project is
2846
located in the "3rd_party" folder in the following location:
2947

3048
3rd_party\efm32pg1b\arm\startup_efm32pg1b.s
@@ -47,4 +65,3 @@ because stack might be corrupted by the time this function is called.
4765
Also, assert_failed() is intended to handle catastrophic errors and
4866
should NOT return.
4967
***
50-

examples/arm-cm/dpp_efm32-slstk3401a/qxk/armclang/dpp-qxk.uvoptx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
<SetRegEntry>
121121
<Number>0</Number>
122122
<Key>DLGUARM</Key>
123-
<Name></Name>
123+
<Name>d</Name>
124124
</SetRegEntry>
125125
<SetRegEntry>
126126
<Number>0</Number>
@@ -297,7 +297,7 @@
297297
<bEvRecOn>1</bEvRecOn>
298298
<bSchkAxf>0</bSchkAxf>
299299
<bTchkAxf>0</bTchkAxf>
300-
<nTsel>3</nTsel>
300+
<nTsel>4</nTsel>
301301
<sDll></sDll>
302302
<sDllPa></sDllPa>
303303
<sDlgDll></sDlgDll>

examples/arm-cm/dpp_efm32-slstk3401a/qxk/armclang/dpp-qxk.uvprojx

Lines changed: 3 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
<v6Rtti>0</v6Rtti>
338338
<VariousControls>
339339
<MiscControls></MiscControls>
340-
<Define>EFM32PG1B200F256GM48=1 __FPU_PRESENT</Define>
340+
<Define>QXK_USE_IRQ_HANDLER=CRYPTO_IRQHandler QXK_USE_IRQ_NUM=25</Define>
341341
<Undefine></Undefine>
342342
<IncludePath>..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b</IncludePath>
343343
</VariousControls>
@@ -572,57 +572,6 @@
572572
<FileName>qxk_port.c</FileName>
573573
<FileType>1</FileType>
574574
<FilePath>..\..\..\..\..\ports\arm-cm\qxk\armclang\qxk_port.c</FilePath>
575-
<FileOption>
576-
<CommonProperty>
577-
<UseCPPCompiler>2</UseCPPCompiler>
578-
<RVCTCodeConst>0</RVCTCodeConst>
579-
<RVCTZI>0</RVCTZI>
580-
<RVCTOtherData>0</RVCTOtherData>
581-
<ModuleSelection>0</ModuleSelection>
582-
<IncludeInBuild>2</IncludeInBuild>
583-
<AlwaysBuild>2</AlwaysBuild>
584-
<GenerateAssemblyFile>2</GenerateAssemblyFile>
585-
<AssembleAssemblyFile>2</AssembleAssemblyFile>
586-
<PublicsOnly>2</PublicsOnly>
587-
<StopOnExitCode>11</StopOnExitCode>
588-
<CustomArgument></CustomArgument>
589-
<IncludeLibraryModules></IncludeLibraryModules>
590-
<ComprImg>1</ComprImg>
591-
</CommonProperty>
592-
<FileArmAds>
593-
<Cads>
594-
<interw>2</interw>
595-
<Optim>0</Optim>
596-
<oTime>2</oTime>
597-
<SplitLS>2</SplitLS>
598-
<OneElfS>2</OneElfS>
599-
<Strict>2</Strict>
600-
<EnumInt>2</EnumInt>
601-
<PlainCh>2</PlainCh>
602-
<Ropi>2</Ropi>
603-
<Rwpi>2</Rwpi>
604-
<wLevel>0</wLevel>
605-
<uThumb>2</uThumb>
606-
<uSurpInc>2</uSurpInc>
607-
<uC99>2</uC99>
608-
<uGnu>2</uGnu>
609-
<useXO>2</useXO>
610-
<v6Lang>0</v6Lang>
611-
<v6LangP>0</v6LangP>
612-
<vShortEn>2</vShortEn>
613-
<vShortWch>2</vShortWch>
614-
<v6Lto>2</v6Lto>
615-
<v6WtE>2</v6WtE>
616-
<v6Rtti>2</v6Rtti>
617-
<VariousControls>
618-
<MiscControls></MiscControls>
619-
<Define>QXK_USE_IRQ_NUM=25 QXK_USE_IRQ_HANDLER=CRYPTO_IRQHandler</Define>
620-
<Undefine></Undefine>
621-
<IncludePath></IncludePath>
622-
</VariousControls>
623-
</Cads>
624-
</FileArmAds>
625-
</FileOption>
626575
</File>
627576
<File>
628577
<FileName>qxk_port.h</FileName>
@@ -1058,7 +1007,7 @@
10581007
<v6Rtti>0</v6Rtti>
10591008
<VariousControls>
10601009
<MiscControls></MiscControls>
1061-
<Define>NDEBUG EFM32PG1B200F256GM48=1 __FPU_PRESENT</Define>
1010+
<Define>NDEBUG</Define>
10621011
<Undefine></Undefine>
10631012
<IncludePath>..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b</IncludePath>
10641013
</VariousControls>
@@ -1728,7 +1677,7 @@
17281677
<v6Rtti>0</v6Rtti>
17291678
<VariousControls>
17301679
<MiscControls></MiscControls>
1731-
<Define>Q_SPY EFM32PG1B200F256GM48=1 __FPU_PRESENT</Define>
1680+
<Define>Q_SPY</Define>
17321681
<Undefine></Undefine>
17331682
<IncludePath>..\..;..\..\..\..\..\include;..\..\..\..\..\ports\arm-cm\qxk\armclang;..\..\..\..\..\3rd_party\CMSIS\Include;..\..\..\..\..\3rd_party\efm32pg1b</IncludePath>
17341683
</VariousControls>

0 commit comments

Comments
 (0)