Skip to content

Commit

Permalink
Merge pull request #1419 from kjarvel/iar_fixes
Browse files Browse the repository at this point in the history
Iar fixes
  • Loading branch information
basvodde committed Sep 15, 2020
2 parents b7e9ecb + 0c554a8 commit 2cd9282
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 204 deletions.
1 change: 1 addition & 0 deletions cmake/Modules/CppUTestConfigurationOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ if (MEMORY_LEAK_DETECTION)
set(CPPUTEST_CXX_FLAGS "${CPPUTEST_CXX_FLAGS} /FI \"${CppUTestRootDirectory}/include/CppUTest/MemoryLeakDetectorMallocMacros.h\"")
elseif (IAR)
set(CPPUTEST_C_FLAGS "${CPPUTEST_C_FLAGS} --preinclude \"${CppUTestRootDirectory}/include/CppUTest/MemoryLeakDetectorMallocMacros.h\"")
set(CPPUTEST_CXX_FLAGS "${CPPUTEST_CXX_FLAGS} --preinclude \"${CppUTestRootDirectory}/include/CppUTest/MemoryLeakDetectorNewMacros.h\"")
set(CPPUTEST_CXX_FLAGS "${CPPUTEST_CXX_FLAGS} --preinclude \"${CppUTestRootDirectory}/include/CppUTest/MemoryLeakDetectorMallocMacros.h\"")
else (MSVC)
set(CPPUTEST_C_FLAGS "${CPPUTEST_C_FLAGS} -include \"${CppUTestRootDirectory}/include/CppUTest/MemoryLeakDetectorMallocMacros.h\"")
Expand Down
2 changes: 1 addition & 1 deletion cmake/ewarm-linux.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set(CMAKE_SYSTEM_NAME Generic)
set(EW_ROOT_DIR "/opt/iarsystems/bxarm/arm/")

# Compiler flags needed to compile for this CPU
set(CPU_FLAGS "--cpu Cortex-M3")
set(CPU_FLAGS "--cpu Cortex-M4F")

# Set up the CMake variables for compiler and assembler
# (The reason for both C and CXX variables is that CMake
Expand Down
4 changes: 2 additions & 2 deletions cmake/ewarm-win.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ set(CMAKE_SYSTEM_NAME Generic)

# Set the EW installation root directory
#(Avoid spaces in the path or you need to escape them)
set(EW_ROOT_DIR "E:/Program Files\ (x86)/IAR\ Systems/Embedded\ Workbench\ Arm 8.50.5/arm")
set(EW_ROOT_DIR "E:/Program Files\ (x86)/IAR\ Systems/Embedded\ Workbench\ Arm 8.50.6/arm")

# Compiler flags needed to compile for this CPU
set(CPU_FLAGS "--cpu Cortex-M3")
set(CPU_FLAGS "--cpu Cortex-M4F")

# Set up the CMake variables for compiler and assembler
# (The reason for both C and CXX variables is that CMake
Expand Down
33 changes: 21 additions & 12 deletions platforms/iar/CppUTest.ewp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
</option>
<option>
<name>OGLastSavedByProductVersion</name>
<state>7.70.1.11471</state>
<state>7.80.4.12487</state>
</option>
<option>
<name>GeneralEnableMisra</name>
Expand Down Expand Up @@ -128,7 +128,7 @@
<option>
<name>GBECoreSlave</name>
<version>24</version>
<state>40</state>
<state>39</state>
</option>
<option>
<name>OGUseCmsis</name>
Expand Down Expand Up @@ -242,7 +242,7 @@
<option>
<name>CCAllowList</name>
<version>1</version>
<state>00000000</state>
<state>11111110</state>
</option>
<option>
<name>CCDebugInfo</name>
Expand All @@ -262,7 +262,8 @@
</option>
<option>
<name>IExtraOptions</name>
<state></state>
<state>--preinclude $PROJ_DIR$\..\..\include\CppUTest\MemoryLeakDetectorNewMacros.h</state>
<state>--preinclude $PROJ_DIR$\..\..\include\CppUTest\MemoryLeakDetectorMallocMacros.h</state>
</option>
<option>
<name>CCLangConformance</name>
Expand Down Expand Up @@ -330,7 +331,7 @@
</option>
<option>
<name>CCOptLevel</name>
<state>1</state>
<state>3</state>
</option>
<option>
<name>CCOptStrategy</name>
Expand All @@ -339,7 +340,7 @@
</option>
<option>
<name>CCOptLevelSlave</name>
<state>1</state>
<state>3</state>
</option>
<option>
<name>CompilerMisraRules98</name>
Expand Down Expand Up @@ -385,7 +386,7 @@
</option>
<option>
<name>IccRTTI</name>
<state>0</state>
<state>1</state>
</option>
<option>
<name>IccStaticDestr</name>
Expand Down Expand Up @@ -644,7 +645,7 @@
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>17</version>
<version>18</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
Expand Down Expand Up @@ -916,7 +917,7 @@
</option>
<option>
<name>CrcAlgorithm</name>
<version>0</version>
<version>1</version>
<state>1</state>
</option>
<option>
Expand All @@ -932,6 +933,10 @@
<name>IlinkLogCallGraph</name>
<state>0</state>
</option>
<option>
<name>IlinkIcfFile_AltDefault</name>
<state></state>
</option>
</data>
</settings>
<settings>
Expand All @@ -951,7 +956,7 @@
</option>
<option>
<name>IarchiveOutput</name>
<state>C:\Lokalt\test_tools\cpputest\platforms\iar\Debug\Exe\CppUTest.a</state>
<state>E:\temp\cpputest\platforms\iar\Debug\Exe\CppUTest.a</state>
</option>
</data>
</settings>
Expand Down Expand Up @@ -1603,7 +1608,7 @@
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>17</version>
<version>18</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
Expand Down Expand Up @@ -1875,7 +1880,7 @@
</option>
<option>
<name>CrcAlgorithm</name>
<version>0</version>
<version>1</version>
<state>1</state>
</option>
<option>
Expand All @@ -1891,6 +1896,10 @@
<name>IlinkLogCallGraph</name>
<state>0</state>
</option>
<option>
<name>IlinkIcfFile_AltDefault</name>
<state></state>
</option>
</data>
</settings>
<settings>
Expand Down
33 changes: 21 additions & 12 deletions platforms/iar/CppUTestExt.ewp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
</option>
<option>
<name>OGLastSavedByProductVersion</name>
<state>7.70.1.11471</state>
<state>7.80.4.12487</state>
</option>
<option>
<name>GeneralEnableMisra</name>
Expand Down Expand Up @@ -128,7 +128,7 @@
<option>
<name>GBECoreSlave</name>
<version>24</version>
<state>40</state>
<state>39</state>
</option>
<option>
<name>OGUseCmsis</name>
Expand Down Expand Up @@ -242,7 +242,7 @@
<option>
<name>CCAllowList</name>
<version>1</version>
<state>00000000</state>
<state>11111110</state>
</option>
<option>
<name>CCDebugInfo</name>
Expand All @@ -262,7 +262,8 @@
</option>
<option>
<name>IExtraOptions</name>
<state></state>
<state>--preinclude $PROJ_DIR$\..\..\include\CppUTest\MemoryLeakDetectorNewMacros.h</state>
<state>--preinclude $PROJ_DIR$\..\..\include\CppUTest\MemoryLeakDetectorMallocMacros.h</state>
</option>
<option>
<name>CCLangConformance</name>
Expand Down Expand Up @@ -330,7 +331,7 @@
</option>
<option>
<name>CCOptLevel</name>
<state>1</state>
<state>3</state>
</option>
<option>
<name>CCOptStrategy</name>
Expand All @@ -339,7 +340,7 @@
</option>
<option>
<name>CCOptLevelSlave</name>
<state>1</state>
<state>3</state>
</option>
<option>
<name>CompilerMisraRules98</name>
Expand Down Expand Up @@ -385,7 +386,7 @@
</option>
<option>
<name>IccRTTI</name>
<state>0</state>
<state>1</state>
</option>
<option>
<name>IccStaticDestr</name>
Expand Down Expand Up @@ -644,7 +645,7 @@
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>17</version>
<version>18</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
Expand Down Expand Up @@ -916,7 +917,7 @@
</option>
<option>
<name>CrcAlgorithm</name>
<version>0</version>
<version>1</version>
<state>1</state>
</option>
<option>
Expand All @@ -932,6 +933,10 @@
<name>IlinkLogCallGraph</name>
<state>0</state>
</option>
<option>
<name>IlinkIcfFile_AltDefault</name>
<state></state>
</option>
</data>
</settings>
<settings>
Expand All @@ -951,7 +956,7 @@
</option>
<option>
<name>IarchiveOutput</name>
<state>C:\Lokalt\test_tools\cpputest\platforms\iar\Debug\Exe\CppUTestExt.a</state>
<state>E:\temp\cpputest\platforms\iar\Debug\Exe\CppUTestExt.a</state>
</option>
</data>
</settings>
Expand Down Expand Up @@ -1603,7 +1608,7 @@
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>17</version>
<version>18</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
Expand Down Expand Up @@ -1875,7 +1880,7 @@
</option>
<option>
<name>CrcAlgorithm</name>
<version>0</version>
<version>1</version>
<state>1</state>
</option>
<option>
Expand All @@ -1891,6 +1896,10 @@
<name>IlinkLogCallGraph</name>
<state>0</state>
</option>
<option>
<name>IlinkIcfFile_AltDefault</name>
<state></state>
</option>
</data>
</settings>
<settings>
Expand Down
16 changes: 10 additions & 6 deletions platforms/iar/CppUTestExtTest.ewp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
</option>
<option>
<name>OGBufferedTerminalOutput</name>
<state>0</state>
<state>1</state>
</option>
<option>
<name>GenStdoutInterface</name>
Expand Down Expand Up @@ -262,7 +262,8 @@
</option>
<option>
<name>IExtraOptions</name>
<state></state>
<state>--preinclude $PROJ_DIR$\..\..\include\CppUTest\MemoryLeakDetectorNewMacros.h</state>
<state>--preinclude $PROJ_DIR$\..\..\include\CppUTest\MemoryLeakDetectorMallocMacros.h</state>
</option>
<option>
<name>CCLangConformance</name>
Expand Down Expand Up @@ -335,7 +336,7 @@
<option>
<name>CCOptStrategy</name>
<version>0</version>
<state>1</state>
<state>0</state>
</option>
<option>
<name>CCOptLevelSlave</name>
Expand Down Expand Up @@ -385,7 +386,7 @@
</option>
<option>
<name>IccRTTI</name>
<state>0</state>
<state>1</state>
</option>
<option>
<name>IccStaticDestr</name>
Expand Down Expand Up @@ -414,7 +415,7 @@
<option>
<name>CCOptStrategySlave</name>
<version>0</version>
<state>1</state>
<state>0</state>
</option>
<option>
<name>CCGuardCalls</name>
Expand Down Expand Up @@ -2037,7 +2038,10 @@
<name>warnings</name>
</group>
<file>
<name>$PROJ_DIR$\tests\CppUTestExt\AllTests.cpp</name>
<name>$PROJ_DIR$\..\..\tests\CppUTestExt\AllTests.cpp</name>
</file>
<file>
<name>$PROJ_DIR$\tests\iar_argc_argv.c</name>
</file>
</group>
</project>
Expand Down
4 changes: 2 additions & 2 deletions platforms/iar/CppUTestExtTest.icf
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ define symbol __ICFEDIT_region_ERAM2_end__ = 0x0;
define symbol __ICFEDIT_region_ERAM3_start__ = 0x0;
define symbol __ICFEDIT_region_ERAM3_end__ = 0x0;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x600;
define symbol __ICFEDIT_size_cstack__ = 0x2000;
define symbol __ICFEDIT_size_svcstack__ = 0x100;
define symbol __ICFEDIT_size_irqstack__ = 0x100;
define symbol __ICFEDIT_size_fiqstack__ = 0x100;
define symbol __ICFEDIT_size_undstack__ = 0x100;
define symbol __ICFEDIT_size_abtstack__ = 0x100;
define symbol __ICFEDIT_size_heap__ = 0x8000;
define symbol __ICFEDIT_size_heap__ = 0x10000;
/**** End of ICF editor section. ###ICF###*/

define memory mem with size = 4G;
Expand Down

0 comments on commit 2cd9282

Please sign in to comment.