diff --git a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/CyaSSL-Lib.eww b/IDE/IAR-EWARM/Projects/CyaSSL-Lib/CyaSSL-Lib.eww deleted file mode 100644 index 9702cae02..000000000 --- a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/CyaSSL-Lib.eww +++ /dev/null @@ -1,16 +0,0 @@ - - - - - $WS_DIR$\CyaSSL-Lib.ewp - - - $WS_DIR$\wolfCrypt-benchmark.ewp - - - $WS_DIR$\wolfCrypt-test.ewp - - - - - diff --git a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-benchmark.ewp b/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-benchmark.ewp deleted file mode 100644 index d61e0a0e9..000000000 --- a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-benchmark.ewp +++ /dev/null @@ -1,1877 +0,0 @@ - - - - 2 - - Debug - - ARM - - 1 - - General - 3 - - 22 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 29 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - - - - - - ILINK - 0 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 22 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 29 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - - - - - - ILINK - 0 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - - $PROJ_DIR$\benchmark-main.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\benchmark\benchmark.c - - - - diff --git a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-benchmark.icf b/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-benchmark.icf deleted file mode 100644 index a4ab009ee..000000000 --- a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-benchmark.icf +++ /dev/null @@ -1,32 +0,0 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x00000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x00000000; -define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 0x2000; -define symbol __ICFEDIT_size_heap__ = 0x2000; -/**** End of ICF editor section. ###ICF###*/ - - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -//initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; \ No newline at end of file diff --git a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-test.ewp b/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-test.ewp deleted file mode 100644 index 60e146e43..000000000 --- a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-test.ewp +++ /dev/null @@ -1,1877 +0,0 @@ - - - - 2 - - Debug - - ARM - - 1 - - General - 3 - - 22 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 29 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - - - - - - ILINK - 0 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - - Release - - ARM - - 0 - - General - 3 - - 22 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 29 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - - - - - - ILINK - 0 - - 16 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - - $PROJ_DIR$\test-main.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\test\test.c - - - - diff --git a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-test.icf b/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-test.icf deleted file mode 100644 index 211d253d4..000000000 --- a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-test.icf +++ /dev/null @@ -1,31 +0,0 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x0; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x0; -define symbol __ICFEDIT_region_ROM_end__ = 0x000FFFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x1FFF0000; -define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 0x2000; -define symbol __ICFEDIT_size_heap__ = 0x3000; -/**** End of ICF editor section. ###ICF###*/ - - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; \ No newline at end of file diff --git a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/benchmark-main.c b/IDE/IAR-EWARM/Projects/benchmark/benchmark-main.c similarity index 88% rename from IDE/IAR-EWARM/Projects/CyaSSL-Lib/benchmark-main.c rename to IDE/IAR-EWARM/Projects/benchmark/benchmark-main.c index 113fc4d23..d8f559d4c 100644 --- a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/benchmark-main.c +++ b/IDE/IAR-EWARM/Projects/benchmark/benchmark-main.c @@ -19,7 +19,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#include "stdio.h" +#ifdef HAVE_CONFIG_H + #include +#endif + +#include typedef struct func_args { int argc; @@ -29,6 +33,7 @@ typedef struct func_args { func_args args = { 0 } ; +extern double current_time(int reset) ; extern int benchmark_test(void *args) ; main(void) { @@ -37,4 +42,3 @@ main(void) { } - diff --git a/IDE/IAR-EWARM/Projects/benchmark/current_time.c b/IDE/IAR-EWARM/Projects/benchmark/current_time.c new file mode 100644 index 000000000..7d42cfc02 --- /dev/null +++ b/IDE/IAR-EWARM/Projects/benchmark/current_time.c @@ -0,0 +1,66 @@ +/* current-time.c + * + * Copyright (C) 2006-2015 wolfSSL Inc. + * + * This file is part of wolfSSL. (formerly known as CyaSSL) + * + * wolfSSL is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * wolfSSL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + +#ifdef HAVE_CONFIG_H + #include +#endif + +#include + +#ifdef WOLFSSL_TI_CURRTIME +#include +#include +#include + +#include "inc/hw_ints.h" +#include "inc/hw_memmap.h" +#include "inc/hw_timer.h" +#include "driverlib/rom.h" +#include "driverlib/sysctl.h" +#include "driverlib/timer.h" + +void InitTimer(void) { + uint32_t ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | + SYSCTL_OSC_MAIN | + SYSCTL_USE_PLL | + SYSCTL_CFG_VCO_480), 120000000); + + printf("Clock=%dMHz\n", ui32SysClock/1000000) ; + ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0); + ROM_TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC); + ROM_TimerLoadSet(TIMER0_BASE, TIMER_A, -1); + ROM_TimerEnable(TIMER0_BASE, TIMER_A); +} + +static int initFlag = false ; +double current_time(int reset) +{ + if(!initFlag)InitTimer() ; + initFlag = true ; + if(reset)ROM_TimerLoadSet(TIMER0_BASE, TIMER_A, -1); + return (double)(-(int)ROM_TimerValueGet(TIMER0_BASE, TIMER_A ))/120000000.0 ; +} + +#else + +double current_time(int reset) { return 0.0 ; } + +#endif \ No newline at end of file diff --git a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-benchmark.ewd b/IDE/IAR-EWARM/Projects/benchmark/wolfCrypt-benchmark.ewd similarity index 50% rename from IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-benchmark.ewd rename to IDE/IAR-EWARM/Projects/benchmark/wolfCrypt-benchmark.ewd index 0bf90e8eb..3f908a2d3 100644 --- a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/wolfCrypt-benchmark.ewd +++ b/IDE/IAR-EWARM/Projects/benchmark/wolfCrypt-benchmark.ewd @@ -12,7 +12,7 @@ C-SPY 2 - 25 + 26 1 1 + + + + + + @@ -245,7 +269,7 @@ @@ -421,7 +469,7 @@ - - - - IARROM_ID - 2 - - 1 - 1 - 1 - - - - - - - - - IJET_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 15 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - MACRAIGOR_ID - 2 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - PEMICRO_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - RDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - STLINK_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - XDS100_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\PowerPac\PowerPacRTOS.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB6_Plugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - ARM - - 0 - - C-SPY - 2 - - 25 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 0 - - - - - - - - ANGEL_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - - CMSISDAP_ID - 2 - - 0 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 0 - - - - - - - @@ -1740,14 +491,14 @@ 1 1 - 0 + 1 @@ -1971,7 +744,7 @@ 15 1 - 0 + 1 @@ -257,7 +281,7 @@ CMSISDAP_ID 2 - 0 + 2 1 1 + + + + + + @@ -472,7 +520,7 @@ IJET_ID 2 - 2 + 3 1 1 + @@ -677,7 +729,7 @@ 1 @@ -1554,7 +1626,7 @@ CMSISDAP_ID 2 - 0 + 2 1 0 + + + + + + @@ -1769,7 +1865,7 @@ IJET_ID 2 - 2 + 3 1 0 + @@ -1974,7 +2074,7 @@ 0 @@ -602,6 +612,7 @@ + 0 @@ -924,7 +935,7 @@ @@ -961,7 +972,7 @@ - CyaSSL + Config + + $PROJ_DIR$\..\..\..\..\wolfssl\wolfcrypt\settings.h + + + $PROJ_DIR$\..\user_settings.h + + + + wolfCrypt + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\aes.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\arc4.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\asm.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\asn.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\blake2b.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\camellia.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\chacha.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\chacha20_poly1305.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\coding.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\compress.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\curve25519.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\des3.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\dh.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\dsa.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\ecc.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\ecc_fp.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\ed25519.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\error.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\fe_operations.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\ge_operations.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\hc128.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\hmac.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\integer.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\logging.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\md2.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\md4.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\md5.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\memory.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\misc.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\pkcs7.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\poly1305.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\pwdbased.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\rabbit.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\random.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\ripemd.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\rsa.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\sha.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\sha256.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\sha512.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\tfm.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\src\wc_port.c + + + + wolfSSL $PROJ_DIR$\..\..\..\..\src\crl.c @@ -1893,108 +2049,6 @@ $PROJ_DIR$\..\..\..\..\src\tls.c - - wolfCrypt - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\aes.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\arc4.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\asm.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\asn.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\blake2b.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\camellia.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\coding.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\compress.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\des3.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\dh.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\dsa.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\ecc.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\ecc_fp.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\error.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\hc128.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\hmac.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\integer.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\logging.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\md2.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\md4.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\md5.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\memory.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\misc.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\wc_port.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\pwdbased.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\rabbit.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\random.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\ripemd.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\rsa.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\sha.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\sha256.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\sha512.c - - - $PROJ_DIR$\..\..\..\..\ctaocrypt\src\tfm.c - - diff --git a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/test-main.c b/IDE/IAR-EWARM/Projects/test/test-main.c similarity index 93% rename from IDE/IAR-EWARM/Projects/CyaSSL-Lib/test-main.c rename to IDE/IAR-EWARM/Projects/test/test-main.c index 5ebfe3219..ad78746d5 100644 --- a/IDE/IAR-EWARM/Projects/CyaSSL-Lib/test-main.c +++ b/IDE/IAR-EWARM/Projects/test/test-main.c @@ -28,9 +28,10 @@ typedef struct func_args { func_args args = { 0 } ; -extern int ctaocrypt_test(void *args) ; +extern int wolfcrypt_test(void *args) ; main(void) { - ctaocrypt_test(&args) ; + wolfcrypt_test(&args) ; return 0; } + diff --git a/IDE/IAR-EWARM/Projects/test/wolfCrypt-test.ewd b/IDE/IAR-EWARM/Projects/test/wolfCrypt-test.ewd new file mode 100644 index 000000000..3f908a2d3 --- /dev/null +++ b/IDE/IAR-EWARM/Projects/test/wolfCrypt-test.ewd @@ -0,0 +1,1374 @@ + + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 6 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Quadros\Quadros_EWB7_Plugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + + diff --git a/IDE/IAR-EWARM/Projects/test/wolfCrypt-test.ewp b/IDE/IAR-EWARM/Projects/test/wolfCrypt-test.ewp new file mode 100644 index 000000000..ec45ce948 --- /dev/null +++ b/IDE/IAR-EWARM/Projects/test/wolfCrypt-test.ewp @@ -0,0 +1,978 @@ + + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Config + + $PROJ_DIR$\..\user_settings.h + + + + Lib + + $PROJ_DIR$\..\lib\ewarm\Exe\wolfSSL-Lib.a + + + + Source + + $PROJ_DIR$\..\common\minimum-startup.c + + + $PROJ_DIR$\test-main.c + + + $PROJ_DIR$\..\..\..\..\wolfcrypt\test\test.c + + + + + diff --git a/IDE/IAR-EWARM/Projects/user_settings.h b/IDE/IAR-EWARM/Projects/user_settings.h new file mode 100644 index 000000000..5e4f36e9a --- /dev/null +++ b/IDE/IAR-EWARM/Projects/user_settings.h @@ -0,0 +1,14 @@ + +#define NO_MAIN_DRIVER +#define BENCH_EMBEDDED +#define SINGLE_THREADED +#define NO_FILESYSTEM +#define NO_WRITEV +#define WOLFSSL_USER_IO +#define NO_DEV_RANDOM +#define USE_CERT_BUFFERS_2048 +#define WOLFSSL_USER_CURRTIME + +#define CUSTOM_RAND_GENERATE custom_rand_generate +/* warning "write a real random seed!!!!, just for testing now" */ +static int custom_rand_generate(void) { return 0 ; } \ No newline at end of file diff --git a/IDE/IAR-EWARM/Projects/wolfssl.eww b/IDE/IAR-EWARM/Projects/wolfssl.eww new file mode 100644 index 000000000..b080e4115 --- /dev/null +++ b/IDE/IAR-EWARM/Projects/wolfssl.eww @@ -0,0 +1,224 @@ + + + + + $WS_DIR$\benchmark\wolfCrypt-benchmark.ewp + + + $WS_DIR$\test\wolfCrypt-test.ewp + + + $WS_DIR$\lib\wolfSSL-Lib.ewp + + + + All Examples + + driverlib + Debug + + + grlib + Debug + + + usblib + Debug + + + aes128_cbc_decrypt + Debug + + + aes128_cbc_encrypt + Debug + + + aes128_ccm_decrypt + Debug + + + aes128_ccm_encrypt + Debug + + + aes128_cmac + Debug + + + aes128_ecb_decrypt + Debug + + + aes128_ecb_encrypt + Debug + + + aes128_gcm_decrypt + Debug + + + aes128_gcm_encrypt + Debug + + + bitband + Debug + + + blinky + Debug + + + boot_demo_uart + Debug + + + boot_demo_usb + Debug + + + calibrate + Debug + + + crc32 + Debug + + + enet_io + Debug + + + enet_lwip + Debug + + + enet_uip + Debug + + + fontview + Debug + + + gpio_jtag + Debug + + + grlib_demo + Debug + + + hello + Debug + + + hello_widget + Debug + + + hibernate + Debug + + + interrupts + Debug + + + lang_demo + Debug + + + mpu_fault + Debug + + + qs_weather + Debug + + + scribble + Debug + + + sd_card + Debug + + + sha1_hash + Debug + + + sha1_hmac + Debug + + + synth + Debug + + + tamper + Debug + + + tdes_cbc_decrypt + Debug + + + tdes_cbc_encrypt + Debug + + + timers + Debug + + + uart_echo + Debug + + + udma_demo + Debug + + + usb_dev_bulk + Debug + + + usb_dev_keyboard + Debug + + + usb_dev_msc + Debug + + + usb_host_hub + Debug + + + usb_host_msc + Debug + + + usb_otg_mouse + Debug + + + usb_stick_demo + Debug + + + usb_stick_update + Debug + + + watchdog + Debug + + + + + + diff --git a/IDE/IAR-EWARM/README b/IDE/IAR-EWARM/README index f393cae30..2731104ea 100644 --- a/IDE/IAR-EWARM/README +++ b/IDE/IAR-EWARM/README @@ -7,38 +7,38 @@ In order to generate project for specific target MPU, take following steps. Included Project Files ----------------------- -1. Workspace: CyaSSL-Lib.eww - The workspace includes CyaSSL-Lib library and wolfCrypt-test, wolfCrypt-benchmark - executable projects. The library project generates full set library of wolfCrypt - and CyaSSL functions. +1. Workspace: wolfssl.eww + The workspace includes wolfSSL-Lib library and wolfCrypt-test, wolfCrypt-benchmark + executable projects. -2. Test suites Project: wolfCrypt-test.ewp +2. wolfSSL-Lib Project: lib/wolfSSL-lib.ewp + generates full set library of wolfCrypt and wolfSSL functions. + +3. Test suites Project: test/wolfCrypt-test.ewp generates test.out test suites executable -3. Benchmark Project: wolfCrypt-benchmark.ewp +4. Benchmark Project: benchmark/wolfCrypt-benchmark.ewp generates benchmark.out benchmark executable Set Up Steps ------------ 0. Default Setting Default Target of the projects are set to Cortex-M3 Simulator. - For check the projects, you can build and download to the simulator. + user_settings.h includes default options for the projects. + You can build and download the to the simulator. Open Terminal I/O window, by "view"->"Terminal I/O", and start execution. 1. Project option settings For each project,... General Options: Choose appropriate "Target" options - For executable projects,... +2. For executable projects,... Add "SystemInit" and "startup" for your MPU Debugger: Choose your debug "Driver" -2. For benchmark project,... - Write your own "current_time" benchmark timer under "defined(CYASSL_IAR_ARM)" in benchmark.c - -3. settings.h - Uncomment the "CYASSL_IAR_ARM" define located in: - /cyassl/ctaocrypt/settings. +3. For benchmark project,... + Choose option for current_time function. + Or write own "current_time" benchmark timer with WOLFSSL_USER_CURRTIME option. 4. Build and download Go to "Project->Make" and "Download and Debug" in Menu bar for EWARM build and download. diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index 838a80e34..f284774f3 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -1846,7 +1846,7 @@ void bench_ed25519KeySign(void) return ( ns / CLOCK * 2.0); } -#elif defined(WOLFSSL_IAR_ARM_TIME) || defined (WOLFSSL_MDK_ARM) || defined(WOLFSSL_USER_TIME) +#elif defined(WOLFSSL_IAR_ARM_TIME) || defined (WOLFSSL_MDK_ARM) || defined(WOLFSSL_USER_CURRTIME) extern double current_time(int reset); #elif defined FREERTOS diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 8148c40a2..f59ef5180 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -153,17 +153,6 @@ #define NO_FILESYSTEM #endif -#if defined(WOLFSSL_IAR_ARM) - #define NO_MAIN_DRIVER - #define SINGLE_THREADED - #define USE_CERT_BUFFERS_1024 - #define BENCH_EMBEDDED - #define NO_FILESYSTEM - #define NO_WRITEV - #define WOLFSSL_USER_IO - #define BENCH_EMBEDDED -#endif - #ifdef MICROCHIP_PIC32 /* #define WOLFSSL_MICROCHIP_PIC32MZ */ #define SIZEOF_LONG_LONG 8