mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
For PIC32MZ
This commit is contained in:
@@ -1063,27 +1063,26 @@ void bench_eccKeyAgree(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#elif defined MICROCHIP_PIC32
|
#elif defined MICROCHIP_PIC32
|
||||||
|
#if defined(CYASSL_MICROCHIP_PIC32MZ)
|
||||||
#include <peripheral/timer.h>
|
#define CLOCK 8000000.0
|
||||||
|
#else
|
||||||
|
#include <peripheral/timer.h>
|
||||||
|
#define CLOCK 4000000.0
|
||||||
|
#endif
|
||||||
|
|
||||||
double current_time(int reset)
|
double current_time(int reset)
|
||||||
{
|
{
|
||||||
/* NOTE: core timer tick rate = 40 Mhz, 1 tick = 25 ns */
|
|
||||||
|
|
||||||
unsigned int ns;
|
unsigned int ns;
|
||||||
|
|
||||||
/* should we reset our timer back to zero? Helps prevent timer
|
|
||||||
rollover */
|
|
||||||
|
|
||||||
if (reset) {
|
if (reset) {
|
||||||
WriteCoreTimer(0);
|
WriteCoreTimer(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get timer in ns */
|
/* get timer in ns */
|
||||||
ns = ReadCoreTimer() * 25;
|
ns = ReadCoreTimer();
|
||||||
|
|
||||||
/* return seconds as a double */
|
/* return seconds as a double */
|
||||||
return ( ns / 1000000000.0 );
|
return ( ns / CLOCK * 2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined CYASSL_MDK_ARM
|
#elif defined CYASSL_MDK_ARM
|
||||||
|
@@ -23,6 +23,8 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <cyassl/ctaocrypt/settings.h>
|
||||||
|
|
||||||
/* on HPUX 11 you may need to install /dev/random see
|
/* on HPUX 11 you may need to install /dev/random see
|
||||||
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=KRNG11I
|
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=KRNG11I
|
||||||
|
|
||||||
@@ -461,7 +463,9 @@ int GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
|||||||
#ifdef MICROCHIP_MPLAB_HARMONY
|
#ifdef MICROCHIP_MPLAB_HARMONY
|
||||||
#define PIC32_SEED_COUNT _CP0_GET_COUNT
|
#define PIC32_SEED_COUNT _CP0_GET_COUNT
|
||||||
#else
|
#else
|
||||||
#include <peripheral/timer.h>
|
#if !defined(CYASSL_MICROCHIP_PIC32MZ)
|
||||||
|
#include <peripheral/timer.h>
|
||||||
|
#endif
|
||||||
#define PIC32_SEED_COUNT ReadCoreTimer
|
#define PIC32_SEED_COUNT ReadCoreTimer
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -805,8 +805,10 @@ CYASSL_API char* CyaSSL_X509_get_next_altname(CYASSL_X509*);
|
|||||||
|
|
||||||
CYASSL_API CYASSL_X509*
|
CYASSL_API CYASSL_X509*
|
||||||
CyaSSL_X509_d2i(CYASSL_X509** x509, const unsigned char* in, int len);
|
CyaSSL_X509_d2i(CYASSL_X509** x509, const unsigned char* in, int len);
|
||||||
|
#ifndef NO_FILESYSTEM
|
||||||
CYASSL_API CYASSL_X509*
|
CYASSL_API CYASSL_X509*
|
||||||
CyaSSL_X509_d2i_fp(CYASSL_X509** x509, FILE* file);
|
CyaSSL_X509_d2i_fp(CYASSL_X509** x509, FILE* file);
|
||||||
|
#endif
|
||||||
CYASSL_API CYASSL_X509*
|
CYASSL_API CYASSL_X509*
|
||||||
CyaSSL_X509_load_certificate_file(const char* fname, int format);
|
CyaSSL_X509_load_certificate_file(const char* fname, int format);
|
||||||
|
|
||||||
|
28
mcapi/PIC32MZ-serial.h
Normal file
28
mcapi/PIC32MZ-serial.h
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
void _mon_putc(char c);
|
||||||
|
|
||||||
|
static void init_serial() {
|
||||||
|
#ifdef MICROCHIP_PIC32
|
||||||
|
#if defined (__32MZ2048ECH144__) || (__32MZ2048ECM144__)
|
||||||
|
/* Set up PB2 divisor for UART2 */
|
||||||
|
SYSKEY = 0x00000000;
|
||||||
|
SYSKEY = 0xAA996655;
|
||||||
|
SYSKEY = 0x556699AA;
|
||||||
|
PB2DIV = 0x00008018;
|
||||||
|
SYSKEY = 0x33333333;
|
||||||
|
|
||||||
|
/* UART2 Init */
|
||||||
|
// U2BRG = 0x0C;
|
||||||
|
U2BRG = 0x7;
|
||||||
|
ANSELBCLR = 0x4000;
|
||||||
|
ANSELGCLR = 0x0040;
|
||||||
|
RPB14R = 0x02;
|
||||||
|
U2RXR = 0x01;
|
||||||
|
U2MODE = 0x8000;
|
||||||
|
U2STA = 0x400;
|
||||||
|
#elif defined __PIC32MX__
|
||||||
|
SYSTEMConfigPerformance(80000000);
|
||||||
|
DBINIT();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
@@ -12,7 +12,7 @@
|
|||||||
<logicalFolder name="SourceFiles"
|
<logicalFolder name="SourceFiles"
|
||||||
displayName="Source Files"
|
displayName="Source Files"
|
||||||
projectFiles="true">
|
projectFiles="true">
|
||||||
<itemPath>../../mcapi/test.c</itemPath>
|
<itemPath>../mcapi_test.c</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<logicalFolder name="ExternalFiles"
|
<logicalFolder name="ExternalFiles"
|
||||||
displayName="Important Files"
|
displayName="Important Files"
|
||||||
@@ -20,6 +20,9 @@
|
|||||||
<itemPath>Makefile</itemPath>
|
<itemPath>Makefile</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
|
<sourceRootList>
|
||||||
|
<Elem>..</Elem>
|
||||||
|
</sourceRootList>
|
||||||
<projectmakefile>Makefile</projectmakefile>
|
<projectmakefile>Makefile</projectmakefile>
|
||||||
<confs>
|
<confs>
|
||||||
<conf name="default" type="2">
|
<conf name="default" type="2">
|
||||||
@@ -30,8 +33,8 @@
|
|||||||
<targetPluginBoard></targetPluginBoard>
|
<targetPluginBoard></targetPluginBoard>
|
||||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||||
<languageToolchain>XC32</languageToolchain>
|
<languageToolchain>XC32</languageToolchain>
|
||||||
<languageToolchainVersion>1.10</languageToolchainVersion>
|
<languageToolchainVersion>1.30</languageToolchainVersion>
|
||||||
<platform>4</platform>
|
<platform>3</platform>
|
||||||
</toolsSet>
|
</toolsSet>
|
||||||
<compileType>
|
<compileType>
|
||||||
<linkerTool>
|
<linkerTool>
|
||||||
@@ -106,6 +109,7 @@
|
|||||||
<property key="strict-ansi" value="false"/>
|
<property key="strict-ansi" value="false"/>
|
||||||
<property key="support-ansi" value="false"/>
|
<property key="support-ansi" value="false"/>
|
||||||
<property key="use-cci" value="false"/>
|
<property key="use-cci" value="false"/>
|
||||||
|
<property key="use-iar" value="false"/>
|
||||||
<property key="use-indirect-calls" value="false"/>
|
<property key="use-indirect-calls" value="false"/>
|
||||||
</C32>
|
</C32>
|
||||||
<C32-AS>
|
<C32-AS>
|
||||||
@@ -123,6 +127,7 @@
|
|||||||
<property key="linker-symbols" value=""/>
|
<property key="linker-symbols" value=""/>
|
||||||
<property key="map-file" value=""/>
|
<property key="map-file" value=""/>
|
||||||
<property key="no-startup-files" value="false"/>
|
<property key="no-startup-files" value="false"/>
|
||||||
|
<property key="oXC32ld-extra-opts" value=""/>
|
||||||
<property key="optimization-level" value=""/>
|
<property key="optimization-level" value=""/>
|
||||||
<property key="preprocessor-macros" value=""/>
|
<property key="preprocessor-macros" value=""/>
|
||||||
<property key="remove-unused-sections" value="false"/>
|
<property key="remove-unused-sections" value="false"/>
|
||||||
@@ -133,10 +138,59 @@
|
|||||||
<property key="warn-section-align" value="false"/>
|
<property key="warn-section-align" value="false"/>
|
||||||
</C32-LD>
|
</C32-LD>
|
||||||
<C32CPP>
|
<C32CPP>
|
||||||
|
<property key="additional-warnings" value="false"/>
|
||||||
|
<property key="check-new" value="false"/>
|
||||||
|
<property key="eh-specs" value="true"/>
|
||||||
|
<property key="enable-app-io" value="false"/>
|
||||||
|
<property key="enable-omit-frame-pointer" value="false"/>
|
||||||
|
<property key="enable-symbols" value="true"/>
|
||||||
|
<property key="enable-unroll-loops" value="false"/>
|
||||||
|
<property key="exceptions" value="true"/>
|
||||||
|
<property key="exclude-floating-point" value="false"/>
|
||||||
|
<property key="extra-include-directories" value=""/>
|
||||||
|
<property key="generate-16-bit-code" value="false"/>
|
||||||
|
<property key="isolate-each-function" value="false"/>
|
||||||
|
<property key="make-warnings-into-errors" value="false"/>
|
||||||
|
<property key="optimization-level" value=""/>
|
||||||
|
<property key="place-data-into-section" value="false"/>
|
||||||
|
<property key="post-instruction-scheduling" value="default"/>
|
||||||
|
<property key="pre-instruction-scheduling" value="default"/>
|
||||||
|
<property key="preprocessor-macros" value=""/>
|
||||||
|
<property key="rtti" value="true"/>
|
||||||
|
<property key="strict-ansi" value="false"/>
|
||||||
|
<property key="use-cci" value="false"/>
|
||||||
|
<property key="use-iar" value="false"/>
|
||||||
|
<property key="use-indirect-calls" value="false"/>
|
||||||
</C32CPP>
|
</C32CPP>
|
||||||
<C32Global>
|
<C32Global>
|
||||||
|
<property key="legacy-libc" value="false"/>
|
||||||
|
<property key="save-temps" value="false"/>
|
||||||
|
<property key="wpo-lto" value="false"/>
|
||||||
</C32Global>
|
</C32Global>
|
||||||
|
<PKOBSKDEPlatformTool>
|
||||||
|
<property key="AutoSelectMemRanges" value="auto"/>
|
||||||
|
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
|
||||||
|
<property key="ToolFirmwareFilePath"
|
||||||
|
value="Press to browse for a specific firmware version"/>
|
||||||
|
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
|
||||||
|
<property key="memories.configurationmemory" value="false"/>
|
||||||
|
<property key="memories.eeprom" value="false"/>
|
||||||
|
<property key="memories.id" value="false"/>
|
||||||
|
<property key="memories.programmemory" value="true"/>
|
||||||
|
<property key="memories.programmemory.end" value="0x1d07ffff"/>
|
||||||
|
<property key="memories.programmemory.start" value="0x1d000000"/>
|
||||||
|
<property key="poweroptions.powerenable" value="false"/>
|
||||||
|
<property key="programoptions.eraseb4program" value="true"/>
|
||||||
|
<property key="programoptions.preserveeeprom" value="false"/>
|
||||||
|
<property key="programoptions.preserveprogramrange" value="false"/>
|
||||||
|
<property key="programoptions.preserveprogramrange.end" value="0x1d0001ff"/>
|
||||||
|
<property key="programoptions.preserveprogramrange.start" value="0x1d000000"/>
|
||||||
|
<property key="programoptions.usehighvoltageonmclr" value="false"/>
|
||||||
|
<property key="programoptions.uselvpprogramming" value="false"/>
|
||||||
|
<property key="voltagevalue" value="3.25"/>
|
||||||
|
</PKOBSKDEPlatformTool>
|
||||||
<SKDEPIC32PlatformTool>
|
<SKDEPIC32PlatformTool>
|
||||||
|
<property key="whatToProgram" value="all"/>
|
||||||
</SKDEPIC32PlatformTool>
|
</SKDEPIC32PlatformTool>
|
||||||
</conf>
|
</conf>
|
||||||
</confs>
|
</confs>
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
||||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||||
<configuration>
|
<configuration>
|
||||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||||
|
@@ -13,8 +13,8 @@
|
|||||||
<logicalFolder name="SourceFiles"
|
<logicalFolder name="SourceFiles"
|
||||||
displayName="Source Files"
|
displayName="Source Files"
|
||||||
projectFiles="true">
|
projectFiles="true">
|
||||||
<itemPath>main.c</itemPath>
|
|
||||||
<itemPath>../../ctaocrypt/test/test.c</itemPath>
|
<itemPath>../../ctaocrypt/test/test.c</itemPath>
|
||||||
|
<itemPath>../../mplabx/test_main.c</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<logicalFolder name="ExternalFiles"
|
<logicalFolder name="ExternalFiles"
|
||||||
displayName="Important Files"
|
displayName="Important Files"
|
||||||
@@ -22,6 +22,9 @@
|
|||||||
<itemPath>Makefile</itemPath>
|
<itemPath>Makefile</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
|
<sourceRootList>
|
||||||
|
<Elem>../../mplabx</Elem>
|
||||||
|
</sourceRootList>
|
||||||
<projectmakefile>Makefile</projectmakefile>
|
<projectmakefile>Makefile</projectmakefile>
|
||||||
<confs>
|
<confs>
|
||||||
<conf name="default" type="2">
|
<conf name="default" type="2">
|
||||||
@@ -32,8 +35,8 @@
|
|||||||
<targetPluginBoard></targetPluginBoard>
|
<targetPluginBoard></targetPluginBoard>
|
||||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||||
<languageToolchain>XC32</languageToolchain>
|
<languageToolchain>XC32</languageToolchain>
|
||||||
<languageToolchainVersion>1.10</languageToolchainVersion>
|
<languageToolchainVersion>1.30</languageToolchainVersion>
|
||||||
<platform>4</platform>
|
<platform>3</platform>
|
||||||
</toolsSet>
|
</toolsSet>
|
||||||
<compileType>
|
<compileType>
|
||||||
<linkerTool>
|
<linkerTool>
|
||||||
@@ -108,6 +111,7 @@
|
|||||||
<property key="strict-ansi" value="false"/>
|
<property key="strict-ansi" value="false"/>
|
||||||
<property key="support-ansi" value="false"/>
|
<property key="support-ansi" value="false"/>
|
||||||
<property key="use-cci" value="false"/>
|
<property key="use-cci" value="false"/>
|
||||||
|
<property key="use-iar" value="false"/>
|
||||||
<property key="use-indirect-calls" value="false"/>
|
<property key="use-indirect-calls" value="false"/>
|
||||||
</C32>
|
</C32>
|
||||||
<C32-AS>
|
<C32-AS>
|
||||||
@@ -141,6 +145,7 @@
|
|||||||
<property key="linker-symbols" value=""/>
|
<property key="linker-symbols" value=""/>
|
||||||
<property key="map-file" value=""/>
|
<property key="map-file" value=""/>
|
||||||
<property key="no-startup-files" value="false"/>
|
<property key="no-startup-files" value="false"/>
|
||||||
|
<property key="oXC32ld-extra-opts" value=""/>
|
||||||
<property key="optimization-level" value="-Os"/>
|
<property key="optimization-level" value="-Os"/>
|
||||||
<property key="preprocessor-macros" value=""/>
|
<property key="preprocessor-macros" value=""/>
|
||||||
<property key="remove-unused-sections" value="true"/>
|
<property key="remove-unused-sections" value="true"/>
|
||||||
@@ -176,7 +181,31 @@
|
|||||||
</C32CPP>
|
</C32CPP>
|
||||||
<C32Global>
|
<C32Global>
|
||||||
<property key="legacy-libc" value="false"/>
|
<property key="legacy-libc" value="false"/>
|
||||||
|
<property key="save-temps" value="false"/>
|
||||||
|
<property key="wpo-lto" value="false"/>
|
||||||
</C32Global>
|
</C32Global>
|
||||||
|
<PKOBSKDEPlatformTool>
|
||||||
|
<property key="AutoSelectMemRanges" value="auto"/>
|
||||||
|
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
|
||||||
|
<property key="ToolFirmwareFilePath"
|
||||||
|
value="Press to browse for a specific firmware version"/>
|
||||||
|
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
|
||||||
|
<property key="memories.configurationmemory" value="false"/>
|
||||||
|
<property key="memories.eeprom" value="false"/>
|
||||||
|
<property key="memories.id" value="false"/>
|
||||||
|
<property key="memories.programmemory" value="true"/>
|
||||||
|
<property key="memories.programmemory.end" value="0x1d07ffff"/>
|
||||||
|
<property key="memories.programmemory.start" value="0x1d000000"/>
|
||||||
|
<property key="poweroptions.powerenable" value="false"/>
|
||||||
|
<property key="programoptions.eraseb4program" value="true"/>
|
||||||
|
<property key="programoptions.preserveeeprom" value="false"/>
|
||||||
|
<property key="programoptions.preserveprogramrange" value="false"/>
|
||||||
|
<property key="programoptions.preserveprogramrange.end" value="0x1d0001ff"/>
|
||||||
|
<property key="programoptions.preserveprogramrange.start" value="0x1d000000"/>
|
||||||
|
<property key="programoptions.usehighvoltageonmclr" value="false"/>
|
||||||
|
<property key="programoptions.uselvpprogramming" value="false"/>
|
||||||
|
<property key="voltagevalue" value="3.25"/>
|
||||||
|
</PKOBSKDEPlatformTool>
|
||||||
<SKDEPIC32PlatformTool>
|
<SKDEPIC32PlatformTool>
|
||||||
<property key="whatToProgram" value="all"/>
|
<property key="whatToProgram" value="all"/>
|
||||||
</SKDEPIC32PlatformTool>
|
</SKDEPIC32PlatformTool>
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
||||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||||
<configuration>
|
<configuration>
|
||||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||||
|
@@ -52,6 +52,7 @@
|
|||||||
<itemPath>../../mcapi/crypto.c</itemPath>
|
<itemPath>../../mcapi/crypto.c</itemPath>
|
||||||
<itemPath>../../ctaocrypt/src/compress.c</itemPath>
|
<itemPath>../../ctaocrypt/src/compress.c</itemPath>
|
||||||
<itemPath>../../ctaocrypt/src/camellia.c</itemPath>
|
<itemPath>../../ctaocrypt/src/camellia.c</itemPath>
|
||||||
|
<itemPath>../../ctaocrypt/src/port.c</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<logicalFolder name="ExternalFiles"
|
<logicalFolder name="ExternalFiles"
|
||||||
displayName="Important Files"
|
displayName="Important Files"
|
||||||
@@ -61,6 +62,7 @@
|
|||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<sourceRootList>
|
<sourceRootList>
|
||||||
<Elem>..</Elem>
|
<Elem>..</Elem>
|
||||||
|
<Elem>../../ctaocrypt/src</Elem>
|
||||||
</sourceRootList>
|
</sourceRootList>
|
||||||
<projectmakefile>Makefile</projectmakefile>
|
<projectmakefile>Makefile</projectmakefile>
|
||||||
<confs>
|
<confs>
|
||||||
@@ -72,8 +74,8 @@
|
|||||||
<targetPluginBoard></targetPluginBoard>
|
<targetPluginBoard></targetPluginBoard>
|
||||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||||
<languageToolchain>XC32</languageToolchain>
|
<languageToolchain>XC32</languageToolchain>
|
||||||
<languageToolchainVersion>1.10</languageToolchainVersion>
|
<languageToolchainVersion>1.30</languageToolchainVersion>
|
||||||
<platform>4</platform>
|
<platform>3</platform>
|
||||||
</toolsSet>
|
</toolsSet>
|
||||||
<compileType>
|
<compileType>
|
||||||
<archiverTool>
|
<archiverTool>
|
||||||
@@ -109,6 +111,7 @@
|
|||||||
<property key="strict-ansi" value="false"/>
|
<property key="strict-ansi" value="false"/>
|
||||||
<property key="support-ansi" value="false"/>
|
<property key="support-ansi" value="false"/>
|
||||||
<property key="use-cci" value="false"/>
|
<property key="use-cci" value="false"/>
|
||||||
|
<property key="use-iar" value="false"/>
|
||||||
<property key="use-indirect-calls" value="false"/>
|
<property key="use-indirect-calls" value="false"/>
|
||||||
</C32>
|
</C32>
|
||||||
<C32-AS>
|
<C32-AS>
|
||||||
@@ -142,6 +145,7 @@
|
|||||||
<property key="linker-symbols" value=""/>
|
<property key="linker-symbols" value=""/>
|
||||||
<property key="map-file" value=""/>
|
<property key="map-file" value=""/>
|
||||||
<property key="no-startup-files" value="false"/>
|
<property key="no-startup-files" value="false"/>
|
||||||
|
<property key="oXC32ld-extra-opts" value=""/>
|
||||||
<property key="optimization-level" value="-Os"/>
|
<property key="optimization-level" value="-Os"/>
|
||||||
<property key="preprocessor-macros" value=""/>
|
<property key="preprocessor-macros" value=""/>
|
||||||
<property key="remove-unused-sections" value="true"/>
|
<property key="remove-unused-sections" value="true"/>
|
||||||
@@ -177,6 +181,8 @@
|
|||||||
</C32CPP>
|
</C32CPP>
|
||||||
<C32Global>
|
<C32Global>
|
||||||
<property key="legacy-libc" value="false"/>
|
<property key="legacy-libc" value="false"/>
|
||||||
|
<property key="save-temps" value="false"/>
|
||||||
|
<property key="wpo-lto" value="false"/>
|
||||||
</C32Global>
|
</C32Global>
|
||||||
<SKDEPIC32PlatformTool>
|
<SKDEPIC32PlatformTool>
|
||||||
<property key="whatToProgram" value="all"/>
|
<property key="whatToProgram" value="all"/>
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
||||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||||
<configuration>
|
<configuration>
|
||||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||||
|
@@ -44,16 +44,24 @@
|
|||||||
#define USE_CERT_BUFFERS_1024
|
#define USE_CERT_BUFFERS_1024
|
||||||
#include <cyassl/certs_test.h>
|
#include <cyassl/certs_test.h>
|
||||||
|
|
||||||
/* c stdlib headers */
|
#if defined(CYASSL_MICROCHIP_PIC32MZ)
|
||||||
#include <stdio.h>
|
#define MICROCHIP_PIC32
|
||||||
|
#include <xc.h>
|
||||||
/* pic32 specific */
|
#pragma config ICESEL = ICS_PGx2
|
||||||
#ifdef MICROCHIP_PIC32
|
/* ICE/ICD Comm Channel Select (Communicate on PGEC2/PGED2) */
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "PIC32MZ-serial.h"
|
||||||
|
#define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */
|
||||||
|
#else
|
||||||
#define PIC32_STARTER_KIT
|
#define PIC32_STARTER_KIT
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <p32xxxx.h>
|
#include <p32xxxx.h>
|
||||||
#include <plib.h>
|
#include <plib.h>
|
||||||
|
#include <sys/appio.h>
|
||||||
|
#define init_serial() /* void out init_serial() */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define OUR_DATA_SIZE 1024
|
#define OUR_DATA_SIZE 1024
|
||||||
static byte ourData[OUR_DATA_SIZE];
|
static byte ourData[OUR_DATA_SIZE];
|
||||||
static byte* key = NULL;
|
static byte* key = NULL;
|
||||||
@@ -85,10 +93,9 @@ int main(int argc, char** argv)
|
|||||||
(void)argc;
|
(void)argc;
|
||||||
(void)argv;
|
(void)argv;
|
||||||
|
|
||||||
#ifdef MICROCHIP_PIC32
|
init_serial() ; /* initialize PIC32MZ serial I/O */
|
||||||
SYSTEMConfigPerformance(80000000);
|
SYSTEMConfigPerformance(80000000);
|
||||||
DBINIT();
|
DBINIT();
|
||||||
#endif
|
|
||||||
|
|
||||||
/* align key, iv pointers */
|
/* align key, iv pointers */
|
||||||
key = (byte*)XMALLOC(32, NULL, DYNAMIC_TYPE_KEY);
|
key = (byte*)XMALLOC(32, NULL, DYNAMIC_TYPE_KEY);
|
@@ -44,8 +44,8 @@
|
|||||||
<targetPluginBoard></targetPluginBoard>
|
<targetPluginBoard></targetPluginBoard>
|
||||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||||
<languageToolchain>XC32</languageToolchain>
|
<languageToolchain>XC32</languageToolchain>
|
||||||
<languageToolchainVersion>1.10</languageToolchainVersion>
|
<languageToolchainVersion>1.30</languageToolchainVersion>
|
||||||
<platform>4</platform>
|
<platform>3</platform>
|
||||||
</toolsSet>
|
</toolsSet>
|
||||||
<compileType>
|
<compileType>
|
||||||
<archiverTool>
|
<archiverTool>
|
||||||
@@ -80,6 +80,7 @@
|
|||||||
<property key="strict-ansi" value="false"/>
|
<property key="strict-ansi" value="false"/>
|
||||||
<property key="support-ansi" value="false"/>
|
<property key="support-ansi" value="false"/>
|
||||||
<property key="use-cci" value="false"/>
|
<property key="use-cci" value="false"/>
|
||||||
|
<property key="use-iar" value="false"/>
|
||||||
<property key="use-indirect-calls" value="false"/>
|
<property key="use-indirect-calls" value="false"/>
|
||||||
</C32>
|
</C32>
|
||||||
<C32-AS>
|
<C32-AS>
|
||||||
@@ -113,6 +114,7 @@
|
|||||||
<property key="linker-symbols" value=""/>
|
<property key="linker-symbols" value=""/>
|
||||||
<property key="map-file" value=""/>
|
<property key="map-file" value=""/>
|
||||||
<property key="no-startup-files" value="false"/>
|
<property key="no-startup-files" value="false"/>
|
||||||
|
<property key="oXC32ld-extra-opts" value=""/>
|
||||||
<property key="optimization-level" value=""/>
|
<property key="optimization-level" value=""/>
|
||||||
<property key="preprocessor-macros" value=""/>
|
<property key="preprocessor-macros" value=""/>
|
||||||
<property key="remove-unused-sections" value="false"/>
|
<property key="remove-unused-sections" value="false"/>
|
||||||
@@ -148,6 +150,8 @@
|
|||||||
</C32CPP>
|
</C32CPP>
|
||||||
<C32Global>
|
<C32Global>
|
||||||
<property key="legacy-libc" value="false"/>
|
<property key="legacy-libc" value="false"/>
|
||||||
|
<property key="save-temps" value="false"/>
|
||||||
|
<property key="wpo-lto" value="false"/>
|
||||||
</C32Global>
|
</C32Global>
|
||||||
<SKDEPIC32PlatformTool>
|
<SKDEPIC32PlatformTool>
|
||||||
<property key="whatToProgram" value="all"/>
|
<property key="whatToProgram" value="all"/>
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
||||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||||
<configuration>
|
<configuration>
|
||||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||||
|
10
mplabx/PIC32MZ-Putc.c
Normal file
10
mplabx/PIC32MZ-Putc.c
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
#ifdef MICROCHIP_PIC32
|
||||||
|
#if defined (__32MZ2048ECH144__) || defined (__32MZ2048ECM144__)
|
||||||
|
void _mon_putc (char c)
|
||||||
|
{
|
||||||
|
while (U2STAbits.UTXBF);
|
||||||
|
U2TXREG = c;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
28
mplabx/PIC32MZ-serial.h
Normal file
28
mplabx/PIC32MZ-serial.h
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
void _mon_putc(char c);
|
||||||
|
|
||||||
|
static void init_serial() {
|
||||||
|
#ifdef MICROCHIP_PIC32
|
||||||
|
#if defined (__32MZ2048ECH144__) || (__32MZ2048ECM144__)
|
||||||
|
/* Set up PB2 divisor for UART2 */
|
||||||
|
SYSKEY = 0x00000000;
|
||||||
|
SYSKEY = 0xAA996655;
|
||||||
|
SYSKEY = 0x556699AA;
|
||||||
|
PB2DIV = 0x00008018;
|
||||||
|
SYSKEY = 0x33333333;
|
||||||
|
|
||||||
|
/* UART2 Init */
|
||||||
|
// U2BRG = 0x0C;
|
||||||
|
U2BRG = 0x7;
|
||||||
|
ANSELBCLR = 0x4000;
|
||||||
|
ANSELGCLR = 0x0040;
|
||||||
|
RPB14R = 0x02;
|
||||||
|
U2RXR = 0x01;
|
||||||
|
U2MODE = 0x8000;
|
||||||
|
U2STA = 0x400;
|
||||||
|
#elif defined __PIC32MX__
|
||||||
|
SYSTEMConfigPerformance(80000000);
|
||||||
|
DBINIT();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
@@ -1,4 +1,4 @@
|
|||||||
/* main.c
|
/* benchmark_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2013 wolfSSL Inc.
|
* Copyright (C) 2006-2013 wolfSSL Inc.
|
||||||
*
|
*
|
||||||
@@ -18,12 +18,20 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
#if defined(CYASSL_MICROCHIP_PIC32MZ)
|
||||||
#define PIC32_STARTER_KIT
|
#define MICROCHIP_PIC32
|
||||||
|
#include <xc.h>
|
||||||
#include <p32xxxx.h>
|
#pragma config ICESEL = ICS_PGx2
|
||||||
#include <plib.h>
|
/* ICE/ICD Comm Channel Select (Communicate on PGEC2/PGED2) */
|
||||||
#include <sys/appio.h>
|
#include "PIC32MZ-serial.h"
|
||||||
|
#define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */
|
||||||
|
#else
|
||||||
|
#define PIC32_STARTER_KIT
|
||||||
|
#include <p32xxxx.h>
|
||||||
|
#include <plib.h>
|
||||||
|
#include <sys/appio.h>
|
||||||
|
#define init_serial() /* void out init_serial() ; */
|
||||||
|
#endif
|
||||||
|
|
||||||
void bench_des(void);
|
void bench_des(void);
|
||||||
void bench_arc4(void);
|
void bench_arc4(void);
|
||||||
@@ -50,11 +58,14 @@ void bench_eccKeyAgree(void);
|
|||||||
* Main driver for CTaoCrypt benchmarks.
|
* Main driver for CTaoCrypt benchmarks.
|
||||||
*/
|
*/
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
volatile int i ;
|
||||||
|
int j ;
|
||||||
|
|
||||||
|
init_serial() ; /* initialize PIC32MZ serial I/O */
|
||||||
SYSTEMConfigPerformance(80000000);
|
SYSTEMConfigPerformance(80000000);
|
||||||
|
|
||||||
DBINIT();
|
DBINIT();
|
||||||
printf("CTaoCrypt Benchmark:\n");
|
|
||||||
|
printf("wolfCrypt Benchmark:\n");
|
||||||
|
|
||||||
#ifndef NO_AES
|
#ifndef NO_AES
|
||||||
bench_aes(0);
|
bench_aes(0);
|
||||||
@@ -110,7 +121,7 @@ int main(int argc, char** argv) {
|
|||||||
bench_eccKeyGen();
|
bench_eccKeyGen();
|
||||||
bench_eccKeyAgree();
|
bench_eccKeyAgree();
|
||||||
#endif
|
#endif
|
||||||
|
printf("End of wolfCrypt Benchmark:\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@@ -12,8 +12,8 @@
|
|||||||
<logicalFolder name="SourceFiles"
|
<logicalFolder name="SourceFiles"
|
||||||
displayName="Source Files"
|
displayName="Source Files"
|
||||||
projectFiles="true">
|
projectFiles="true">
|
||||||
<itemPath>main.c</itemPath>
|
|
||||||
<itemPath>../../ctaocrypt/benchmark/benchmark.c</itemPath>
|
<itemPath>../../ctaocrypt/benchmark/benchmark.c</itemPath>
|
||||||
|
<itemPath>../benchmark_main.c</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<logicalFolder name="ExternalFiles"
|
<logicalFolder name="ExternalFiles"
|
||||||
displayName="Important Files"
|
displayName="Important Files"
|
||||||
@@ -21,6 +21,9 @@
|
|||||||
<itemPath>Makefile</itemPath>
|
<itemPath>Makefile</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
|
<sourceRootList>
|
||||||
|
<Elem>..</Elem>
|
||||||
|
</sourceRootList>
|
||||||
<projectmakefile>Makefile</projectmakefile>
|
<projectmakefile>Makefile</projectmakefile>
|
||||||
<confs>
|
<confs>
|
||||||
<conf name="default" type="2">
|
<conf name="default" type="2">
|
||||||
@@ -31,8 +34,8 @@
|
|||||||
<targetPluginBoard></targetPluginBoard>
|
<targetPluginBoard></targetPluginBoard>
|
||||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||||
<languageToolchain>XC32</languageToolchain>
|
<languageToolchain>XC32</languageToolchain>
|
||||||
<languageToolchainVersion>1.10</languageToolchainVersion>
|
<languageToolchainVersion>1.30</languageToolchainVersion>
|
||||||
<platform>4</platform>
|
<platform>3</platform>
|
||||||
</toolsSet>
|
</toolsSet>
|
||||||
<compileType>
|
<compileType>
|
||||||
<linkerTool>
|
<linkerTool>
|
||||||
@@ -44,8 +47,8 @@
|
|||||||
AC="true"
|
AC="true"
|
||||||
BL="true"
|
BL="true"
|
||||||
WD="../cyassl.X"
|
WD="../cyassl.X"
|
||||||
BC="${MAKE} -f Makefile CONF=default"
|
BC="${MAKE} MAKE_OPTIONS="" -f Makefile CONF=default"
|
||||||
DBC="${MAKE} -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
|
DBC="${MAKE} MAKE_OPTIONS="" -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
|
||||||
CC="rm -rf "build/default" "dist/default""
|
CC="rm -rf "build/default" "dist/default""
|
||||||
OP="dist/default/production/cyassl.X.a"
|
OP="dist/default/production/cyassl.X.a"
|
||||||
DOP="dist/default/debug/cyassl.X.a"
|
DOP="dist/default/debug/cyassl.X.a"
|
||||||
@@ -81,7 +84,7 @@
|
|||||||
<property key="generate-16-bit-code" value="false"/>
|
<property key="generate-16-bit-code" value="false"/>
|
||||||
<property key="isolate-each-function" value="false"/>
|
<property key="isolate-each-function" value="false"/>
|
||||||
<property key="make-warnings-into-errors" value="false"/>
|
<property key="make-warnings-into-errors" value="false"/>
|
||||||
<property key="optimization-level" value="-O3"/>
|
<property key="optimization-level" value="-O1"/>
|
||||||
<property key="place-data-into-section" value="false"/>
|
<property key="place-data-into-section" value="false"/>
|
||||||
<property key="post-instruction-scheduling" value="default"/>
|
<property key="post-instruction-scheduling" value="default"/>
|
||||||
<property key="pre-instruction-scheduling" value="default"/>
|
<property key="pre-instruction-scheduling" value="default"/>
|
||||||
@@ -90,6 +93,7 @@
|
|||||||
<property key="strict-ansi" value="false"/>
|
<property key="strict-ansi" value="false"/>
|
||||||
<property key="support-ansi" value="false"/>
|
<property key="support-ansi" value="false"/>
|
||||||
<property key="use-cci" value="false"/>
|
<property key="use-cci" value="false"/>
|
||||||
|
<property key="use-iar" value="false"/>
|
||||||
<property key="use-indirect-calls" value="false"/>
|
<property key="use-indirect-calls" value="false"/>
|
||||||
</C32>
|
</C32>
|
||||||
<C32-AS>
|
<C32-AS>
|
||||||
@@ -123,6 +127,7 @@
|
|||||||
<property key="linker-symbols" value=""/>
|
<property key="linker-symbols" value=""/>
|
||||||
<property key="map-file" value=""/>
|
<property key="map-file" value=""/>
|
||||||
<property key="no-startup-files" value="false"/>
|
<property key="no-startup-files" value="false"/>
|
||||||
|
<property key="oXC32ld-extra-opts" value=""/>
|
||||||
<property key="optimization-level" value="-O3"/>
|
<property key="optimization-level" value="-O3"/>
|
||||||
<property key="preprocessor-macros" value=""/>
|
<property key="preprocessor-macros" value=""/>
|
||||||
<property key="remove-unused-sections" value="false"/>
|
<property key="remove-unused-sections" value="false"/>
|
||||||
@@ -158,9 +163,10 @@
|
|||||||
</C32CPP>
|
</C32CPP>
|
||||||
<C32Global>
|
<C32Global>
|
||||||
<property key="legacy-libc" value="false"/>
|
<property key="legacy-libc" value="false"/>
|
||||||
|
<property key="save-temps" value="false"/>
|
||||||
|
<property key="wpo-lto" value="false"/>
|
||||||
</C32Global>
|
</C32Global>
|
||||||
<SKDEPIC32PlatformTool>
|
<SKDEPIC32PlatformTool>
|
||||||
<property key="whatToProgram" value="all"/>
|
|
||||||
</SKDEPIC32PlatformTool>
|
</SKDEPIC32PlatformTool>
|
||||||
</conf>
|
</conf>
|
||||||
</confs>
|
</confs>
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
||||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||||
<configuration>
|
<configuration>
|
||||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||||
|
@@ -13,8 +13,8 @@
|
|||||||
<logicalFolder name="SourceFiles"
|
<logicalFolder name="SourceFiles"
|
||||||
displayName="Source Files"
|
displayName="Source Files"
|
||||||
projectFiles="true">
|
projectFiles="true">
|
||||||
<itemPath>main.c</itemPath>
|
|
||||||
<itemPath>../../ctaocrypt/test/test.c</itemPath>
|
<itemPath>../../ctaocrypt/test/test.c</itemPath>
|
||||||
|
<itemPath>../test_main.c</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<logicalFolder name="ExternalFiles"
|
<logicalFolder name="ExternalFiles"
|
||||||
displayName="Important Files"
|
displayName="Important Files"
|
||||||
@@ -22,6 +22,9 @@
|
|||||||
<itemPath>Makefile</itemPath>
|
<itemPath>Makefile</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
|
<sourceRootList>
|
||||||
|
<Elem>..</Elem>
|
||||||
|
</sourceRootList>
|
||||||
<projectmakefile>Makefile</projectmakefile>
|
<projectmakefile>Makefile</projectmakefile>
|
||||||
<confs>
|
<confs>
|
||||||
<conf name="default" type="2">
|
<conf name="default" type="2">
|
||||||
@@ -32,8 +35,8 @@
|
|||||||
<targetPluginBoard></targetPluginBoard>
|
<targetPluginBoard></targetPluginBoard>
|
||||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||||
<languageToolchain>XC32</languageToolchain>
|
<languageToolchain>XC32</languageToolchain>
|
||||||
<languageToolchainVersion>1.10</languageToolchainVersion>
|
<languageToolchainVersion>1.30</languageToolchainVersion>
|
||||||
<platform>4</platform>
|
<platform>3</platform>
|
||||||
</toolsSet>
|
</toolsSet>
|
||||||
<compileType>
|
<compileType>
|
||||||
<linkerTool>
|
<linkerTool>
|
||||||
@@ -45,8 +48,8 @@
|
|||||||
AC="true"
|
AC="true"
|
||||||
BL="true"
|
BL="true"
|
||||||
WD="../cyassl.X"
|
WD="../cyassl.X"
|
||||||
BC="${MAKE} -f Makefile CONF=default"
|
BC="${MAKE} MAKE_OPTIONS="" -f Makefile CONF=default"
|
||||||
DBC="${MAKE} -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
|
DBC="${MAKE} MAKE_OPTIONS="" -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
|
||||||
CC="rm -rf "build/default" "dist/default""
|
CC="rm -rf "build/default" "dist/default""
|
||||||
OP="dist/default/production/cyassl.X.a"
|
OP="dist/default/production/cyassl.X.a"
|
||||||
DOP="dist/default/debug/cyassl.X.a"
|
DOP="dist/default/debug/cyassl.X.a"
|
||||||
@@ -82,7 +85,7 @@
|
|||||||
<property key="generate-16-bit-code" value="false"/>
|
<property key="generate-16-bit-code" value="false"/>
|
||||||
<property key="isolate-each-function" value="false"/>
|
<property key="isolate-each-function" value="false"/>
|
||||||
<property key="make-warnings-into-errors" value="false"/>
|
<property key="make-warnings-into-errors" value="false"/>
|
||||||
<property key="optimization-level" value="-Os"/>
|
<property key="optimization-level" value="-O3"/>
|
||||||
<property key="place-data-into-section" value="false"/>
|
<property key="place-data-into-section" value="false"/>
|
||||||
<property key="post-instruction-scheduling" value="default"/>
|
<property key="post-instruction-scheduling" value="default"/>
|
||||||
<property key="pre-instruction-scheduling" value="default"/>
|
<property key="pre-instruction-scheduling" value="default"/>
|
||||||
@@ -91,6 +94,7 @@
|
|||||||
<property key="strict-ansi" value="false"/>
|
<property key="strict-ansi" value="false"/>
|
||||||
<property key="support-ansi" value="false"/>
|
<property key="support-ansi" value="false"/>
|
||||||
<property key="use-cci" value="false"/>
|
<property key="use-cci" value="false"/>
|
||||||
|
<property key="use-iar" value="false"/>
|
||||||
<property key="use-indirect-calls" value="false"/>
|
<property key="use-indirect-calls" value="false"/>
|
||||||
</C32>
|
</C32>
|
||||||
<C32-AS>
|
<C32-AS>
|
||||||
@@ -124,6 +128,7 @@
|
|||||||
<property key="linker-symbols" value=""/>
|
<property key="linker-symbols" value=""/>
|
||||||
<property key="map-file" value=""/>
|
<property key="map-file" value=""/>
|
||||||
<property key="no-startup-files" value="false"/>
|
<property key="no-startup-files" value="false"/>
|
||||||
|
<property key="oXC32ld-extra-opts" value=""/>
|
||||||
<property key="optimization-level" value="-Os"/>
|
<property key="optimization-level" value="-Os"/>
|
||||||
<property key="preprocessor-macros" value=""/>
|
<property key="preprocessor-macros" value=""/>
|
||||||
<property key="remove-unused-sections" value="true"/>
|
<property key="remove-unused-sections" value="true"/>
|
||||||
@@ -159,9 +164,10 @@
|
|||||||
</C32CPP>
|
</C32CPP>
|
||||||
<C32Global>
|
<C32Global>
|
||||||
<property key="legacy-libc" value="false"/>
|
<property key="legacy-libc" value="false"/>
|
||||||
|
<property key="save-temps" value="false"/>
|
||||||
|
<property key="wpo-lto" value="false"/>
|
||||||
</C32Global>
|
</C32Global>
|
||||||
<SKDEPIC32PlatformTool>
|
<SKDEPIC32PlatformTool>
|
||||||
<property key="whatToProgram" value="all"/>
|
|
||||||
</SKDEPIC32PlatformTool>
|
</SKDEPIC32PlatformTool>
|
||||||
</conf>
|
</conf>
|
||||||
</confs>
|
</confs>
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
||||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||||
<configuration>
|
<configuration>
|
||||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||||
|
@@ -49,6 +49,7 @@
|
|||||||
<itemPath>../../ctaocrypt/src/sha256.c</itemPath>
|
<itemPath>../../ctaocrypt/src/sha256.c</itemPath>
|
||||||
<itemPath>../../ctaocrypt/src/sha512.c</itemPath>
|
<itemPath>../../ctaocrypt/src/sha512.c</itemPath>
|
||||||
<itemPath>../../ctaocrypt/src/tfm.c</itemPath>
|
<itemPath>../../ctaocrypt/src/tfm.c</itemPath>
|
||||||
|
<itemPath>../../ctaocrypt/src/port.c</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<logicalFolder name="ExternalFiles"
|
<logicalFolder name="ExternalFiles"
|
||||||
displayName="Important Files"
|
displayName="Important Files"
|
||||||
@@ -58,6 +59,8 @@
|
|||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<sourceRootList>
|
<sourceRootList>
|
||||||
<Elem>..</Elem>
|
<Elem>..</Elem>
|
||||||
|
<Elem>../../cyassl/ctaocrypt</Elem>
|
||||||
|
<Elem>../../ctaocrypt/src</Elem>
|
||||||
</sourceRootList>
|
</sourceRootList>
|
||||||
<projectmakefile>Makefile</projectmakefile>
|
<projectmakefile>Makefile</projectmakefile>
|
||||||
<confs>
|
<confs>
|
||||||
@@ -69,8 +72,8 @@
|
|||||||
<targetPluginBoard></targetPluginBoard>
|
<targetPluginBoard></targetPluginBoard>
|
||||||
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
<platformTool>SKDEPIC32PlatformTool</platformTool>
|
||||||
<languageToolchain>XC32</languageToolchain>
|
<languageToolchain>XC32</languageToolchain>
|
||||||
<languageToolchainVersion>1.10</languageToolchainVersion>
|
<languageToolchainVersion>1.30</languageToolchainVersion>
|
||||||
<platform>4</platform>
|
<platform>3</platform>
|
||||||
</toolsSet>
|
</toolsSet>
|
||||||
<compileType>
|
<compileType>
|
||||||
<archiverTool>
|
<archiverTool>
|
||||||
@@ -92,11 +95,11 @@
|
|||||||
<property key="enable-symbols" value="false"/>
|
<property key="enable-symbols" value="false"/>
|
||||||
<property key="enable-unroll-loops" value="false"/>
|
<property key="enable-unroll-loops" value="false"/>
|
||||||
<property key="exclude-floating-point" value="false"/>
|
<property key="exclude-floating-point" value="false"/>
|
||||||
<property key="extra-include-directories" value="../../"/>
|
<property key="extra-include-directories" value="../../;..\"/>
|
||||||
<property key="generate-16-bit-code" value="false"/>
|
<property key="generate-16-bit-code" value="false"/>
|
||||||
<property key="isolate-each-function" value="false"/>
|
<property key="isolate-each-function" value="false"/>
|
||||||
<property key="make-warnings-into-errors" value="false"/>
|
<property key="make-warnings-into-errors" value="false"/>
|
||||||
<property key="optimization-level" value="-Os"/>
|
<property key="optimization-level" value="-O3"/>
|
||||||
<property key="place-data-into-section" value="false"/>
|
<property key="place-data-into-section" value="false"/>
|
||||||
<property key="post-instruction-scheduling" value="default"/>
|
<property key="post-instruction-scheduling" value="default"/>
|
||||||
<property key="pre-instruction-scheduling" value="default"/>
|
<property key="pre-instruction-scheduling" value="default"/>
|
||||||
@@ -105,6 +108,7 @@
|
|||||||
<property key="strict-ansi" value="false"/>
|
<property key="strict-ansi" value="false"/>
|
||||||
<property key="support-ansi" value="false"/>
|
<property key="support-ansi" value="false"/>
|
||||||
<property key="use-cci" value="false"/>
|
<property key="use-cci" value="false"/>
|
||||||
|
<property key="use-iar" value="false"/>
|
||||||
<property key="use-indirect-calls" value="false"/>
|
<property key="use-indirect-calls" value="false"/>
|
||||||
</C32>
|
</C32>
|
||||||
<C32-AS>
|
<C32-AS>
|
||||||
@@ -138,6 +142,7 @@
|
|||||||
<property key="linker-symbols" value=""/>
|
<property key="linker-symbols" value=""/>
|
||||||
<property key="map-file" value=""/>
|
<property key="map-file" value=""/>
|
||||||
<property key="no-startup-files" value="false"/>
|
<property key="no-startup-files" value="false"/>
|
||||||
|
<property key="oXC32ld-extra-opts" value=""/>
|
||||||
<property key="optimization-level" value="-Os"/>
|
<property key="optimization-level" value="-Os"/>
|
||||||
<property key="preprocessor-macros" value=""/>
|
<property key="preprocessor-macros" value=""/>
|
||||||
<property key="remove-unused-sections" value="true"/>
|
<property key="remove-unused-sections" value="true"/>
|
||||||
@@ -173,6 +178,8 @@
|
|||||||
</C32CPP>
|
</C32CPP>
|
||||||
<C32Global>
|
<C32Global>
|
||||||
<property key="legacy-libc" value="false"/>
|
<property key="legacy-libc" value="false"/>
|
||||||
|
<property key="save-temps" value="false"/>
|
||||||
|
<property key="wpo-lto" value="false"/>
|
||||||
</C32Global>
|
</C32Global>
|
||||||
<SKDEPIC32PlatformTool>
|
<SKDEPIC32PlatformTool>
|
||||||
<property key="whatToProgram" value="all"/>
|
<property key="whatToProgram" value="all"/>
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
||||||
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
|
||||||
<configuration>
|
<configuration>
|
||||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||||
|
@@ -19,13 +19,24 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PIC32_STARTER_KIT
|
#if defined(CYASSL_MICROCHIP_PIC32MZ)
|
||||||
|
#define MICROCHIP_PIC32
|
||||||
#include <stdio.h>
|
#include <xc.h>
|
||||||
#include <stdlib.h>
|
#pragma config ICESEL = ICS_PGx2
|
||||||
#include <p32xxxx.h>
|
/* ICE/ICD Comm Channel Select (Communicate on PGEC2/PGED2) */
|
||||||
#include <plib.h>
|
#include <stdio.h>
|
||||||
#include <sys/appio.h>
|
#include <stdlib.h>
|
||||||
|
#include "PIC32MZ-serial.h"
|
||||||
|
#define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */
|
||||||
|
#else
|
||||||
|
#define PIC32_STARTER_KIT
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <p32xxxx.h>
|
||||||
|
#include <plib.h>
|
||||||
|
#include <sys/appio.h>
|
||||||
|
#define init_serial() /* void out init_serial() */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* func_args from test.h, so don't have to pull in other junk */
|
/* func_args from test.h, so don't have to pull in other junk */
|
||||||
typedef struct func_args {
|
typedef struct func_args {
|
||||||
@@ -38,12 +49,12 @@ typedef struct func_args {
|
|||||||
* Main driver for CTaoCrypt tests.
|
* Main driver for CTaoCrypt tests.
|
||||||
*/
|
*/
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
int i ;
|
||||||
|
|
||||||
|
init_serial() ; /* initialize PIC32MZ serial I/O */
|
||||||
SYSTEMConfigPerformance(80000000);
|
SYSTEMConfigPerformance(80000000);
|
||||||
|
|
||||||
DBINIT();
|
DBINIT();
|
||||||
printf("CTaoCrypt Test:\n");
|
printf("CTaoCrypt Test:\n");
|
||||||
|
|
||||||
func_args args;
|
func_args args;
|
||||||
|
|
||||||
args.argc = argc;
|
args.argc = argc;
|
Reference in New Issue
Block a user