Skip to content

Commit

Permalink
improve the support for arm compiler 6.21
Browse files Browse the repository at this point in the history
  • Loading branch information
GorgonMeducer committed Oct 19, 2023
1 parent b0f305b commit d9557b5
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# perf_counter (v2.2.3)
# perf_counter (v2.2.4-dev)
A dedicated performance counter for Cortex-M Systick. It shares the SysTick with users' original SysTick function(s) without interfering with it. This library will bring new functionalities, such as performance counter,` delay_us` and `clock()` service defined in `time.h`.

### Features:
Expand Down
1 change: 0 additions & 1 deletion example/example.uvmpw
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<project>
<PathAndName>.\example.uvprojx</PathAndName>
<NodeIsActive>1</NodeIsActive>
<NodeIsExpanded>1</NodeIsExpanded>
</project>

<project>
Expand Down
8 changes: 4 additions & 4 deletions example/example.uvoptx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>7</CpuCode>
<DebugOpt>
Expand Down Expand Up @@ -297,7 +297,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>7</CpuCode>
<DebugOpt>
Expand Down Expand Up @@ -805,7 +805,7 @@

<Group>
<GroupName>::Device</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
Expand Down
8 changes: 4 additions & 4 deletions example/example.uvprojx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<TargetName>example_arm_compiler_6</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<pCCUsed>6210000::V6.21::.\ArmCompilerforEmbedded6.21</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
Expand Down Expand Up @@ -337,7 +337,7 @@
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls>-Wno-missing-prototypes -Wno-reserved-identifier -Wno-sign-conversion -Wno-c11-extensions -Wno-implicit-int-conversion -Wno-invalid-utf8</MiscControls>
<MiscControls>-Wno-missing-prototypes -Wno-reserved-identifier -Wno-sign-conversion -Wno-c11-extensions -Wno-implicit-int-conversion -Wno-invalid-utf8 -Wno-unsafe-buffer-usage</MiscControls>
<Define>__PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__</Define>
<Undefine></Undefine>
<IncludePath>..</IncludePath>
Expand Down Expand Up @@ -533,7 +533,7 @@
<TargetName>library</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6190000::V6.19::ARMCLANG</pCCUsed>
<pCCUsed>6210000::V6.21::.\ArmCompilerforEmbedded6.21</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
Expand Down Expand Up @@ -846,7 +846,7 @@
<PlainCh>0</PlainCh>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<wLevel>3</wLevel>
<wLevel>2</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>1</uC99>
Expand Down
10 changes: 5 additions & 5 deletions example/gcc_example.uvoptx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>7</CpuCode>
<DebugOpt>
Expand Down Expand Up @@ -187,7 +187,7 @@
<DebugFlag>
<trace>0</trace>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aLwin>0</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
Expand All @@ -204,7 +204,7 @@
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<aSer4>1</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
Expand Down Expand Up @@ -280,7 +280,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>7</CpuCode>
<DebugOpt>
Expand Down Expand Up @@ -433,7 +433,7 @@

<Group>
<GroupName>startup</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
Expand Down
2 changes: 1 addition & 1 deletion example/gcc_example.uvprojx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
<MiscControls></MiscControls>
<Define>__PERF_COUNTER_CFG_USE_SYSTICK_WRAPPER__</Define>
<Undefine></Undefine>
<IncludePath>..\..\perf_counter_library</IncludePath>
<IncludePath>..\lib</IncludePath>
</VariousControls>
</Carm>
<Aarm>
Expand Down
5 changes: 2 additions & 3 deletions example/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,14 @@ __attribute__((constructor(101)))
void platform_init(void)
{
SystemCoreClockUpdate();
#if defined(RTE_Compiler_IO_STDOUT) && defined(RTE_Compiler_IO_STDOUT_User)
uart_config(25000000ul);
#endif

/* Generate interrupt each 1 ms */
SysTick_Config(SystemCoreClock / 1000);

#if defined(RTE_Compiler_EventRecorder) && defined(RTE_Compiler_IO_STDOUT_EVR)
EventRecorderInitialize(0,1);
#else
uart_config(25000000ul);
#endif
}

Expand Down
1 change: 1 addition & 0 deletions example/stdout_USART.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <stdbool.h>
#include <stdio.h>
#include "cmsis_compiler.h"
#include "perf_counter.h"

/* IO definitions (access restrictions to peripheral registers) */
/**
Expand Down
Binary file modified lib/libperf_counter_gcc.a
Binary file not shown.
5 changes: 3 additions & 2 deletions lib/perf_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ extern "C" {
*/
#define __PERF_COUNTER_VER_MAJOR__ 2
#define __PERF_COUNTER_VER_MINOR__ 2
#define __PERF_COUNTER_VER_REVISE__ 3
#define __PERF_COUNTER_VER_REVISE__ 4

#define __PERF_COUNTER_VER_STR__ ""
#define __PERF_COUNTER_VER_STR__ "dev"

#define __PER_COUNTER_VER__ (__PERF_COUNTER_VER_MAJOR__ * 10000ul \
+__PERF_COUNTER_VER_MINOR__ * 100ul \
Expand Down Expand Up @@ -108,6 +108,7 @@ extern "C" {
# pragma clang diagnostic ignored "-Wshadow"
# pragma clang diagnostic ignored "-Wshorten-64-to-32"
# pragma clang diagnostic ignored "-Wcompound-token-split-by-macro"
# pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
#elif defined(__IS_COMPILER_ARM_COMPILER_5__)
# pragma diag_suppress 550
#elif defined(__IS_COMPILER_GCC__)
Expand Down
Binary file modified lib/perf_counter.lib
Binary file not shown.
5 changes: 3 additions & 2 deletions perf_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ extern "C" {
*/
#define __PERF_COUNTER_VER_MAJOR__ 2
#define __PERF_COUNTER_VER_MINOR__ 2
#define __PERF_COUNTER_VER_REVISE__ 3
#define __PERF_COUNTER_VER_REVISE__ 4

#define __PERF_COUNTER_VER_STR__ ""
#define __PERF_COUNTER_VER_STR__ "dev"

#define __PER_COUNTER_VER__ (__PERF_COUNTER_VER_MAJOR__ * 10000ul \
+__PERF_COUNTER_VER_MINOR__ * 100ul \
Expand Down Expand Up @@ -108,6 +108,7 @@ extern "C" {
# pragma clang diagnostic ignored "-Wshadow"
# pragma clang diagnostic ignored "-Wshorten-64-to-32"
# pragma clang diagnostic ignored "-Wcompound-token-split-by-macro"
# pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
#elif defined(__IS_COMPILER_ARM_COMPILER_5__)
# pragma diag_suppress 550
#elif defined(__IS_COMPILER_GCC__)
Expand Down

0 comments on commit d9557b5

Please sign in to comment.