David Garske 911b6f95f8 Release v3.12.2 (lib 14.0.0). Updated copywright. 7 years ago
..
Kinetis_FlashPlacement.xml 16ba3138a1 Added support for the Rowley CrossWorks for ARM IDE. Added new "WOLFSSL_ROWLEY_ARM" setting define. Added a sample solution (wolfssl.hzp) for building the WolfSSL library and sample test/benchmark applications. The sample applications are written for the Freescale Kinetis K64, but easily be customized for any Kinetis or further extended to support other ARM micro-controllers. 9 years ago
README.md ae75842021 Fix build issues with rebase for ECC and RSA. Changed user_settings.h example when LTC is enabled to disable Shamir and ECC-521. Cleanup to add USE_NXP_MMCAU and USE_NXP_LTC for the example user_settings.h, so the project file can automatically configure. 8 years ago
arm_startup.c 911b6f95f8 Release v3.12.2 (lib 14.0.0). Updated copywright. 7 years ago
benchmark_main.c 911b6f95f8 Release v3.12.2 (lib 14.0.0). Updated copywright. 7 years ago
hw.h 726703e903 Added details on RTC oscillator startup delay and implemented a delay_us function. Added information about NO_INLINE and USE_SLOW_SHOW to example user_settings.h. Moved the USE_SLOW_SHA2 into the SHA512 area. 8 years ago
include.am a6b96b17ff Fixes to include path for NXP ksdk_port. Fixes for time USER/OVERRIDES so their #ifdef's are checked first. Fix to initialize LTC via new "ksdk_port_init" function. Cleanup of the ksdk_port.c for formatting, macros, statics and line length. Cleanup of the AES code for key size. Cleanup of the wolfCrypt sha.c for readability. Added support for the KSDK bare metal drivers to the IDE Rowley CrossWorks example. Updated the settings.h to allow for overrides in Freescale section. Updated README with info for using LTC. 8 years ago
kinetis_hw.c 911b6f95f8 Release v3.12.2 (lib 14.0.0). Updated copywright. 7 years ago
retarget.c 911b6f95f8 Release v3.12.2 (lib 14.0.0). Updated copywright. 7 years ago
test_main.c 911b6f95f8 Release v3.12.2 (lib 14.0.0). Updated copywright. 7 years ago
user_settings.h 171796e8e2 Fix up for building without `./configure` to warn if hardening options are not enabled. Currently `./configure` defaults to `--enable-harden`, but if building sources directly and using `settings.h` or `user_settings.h` the hardening defines will not be set by default. If a user wants to use without hardening they can suppress the warning by defining `WC_NO_HARDEN`. 7 years ago
wolfssl.hzp 3763b88397 rename the file io.h to wolfio.h 7 years ago
wolfssl_ltc.hzp 3763b88397 rename the file io.h to wolfio.h 7 years ago

README.md

Rowley CrossWorks ARM Project for wolfSSL and wolfCrypt

This directory contains a CrossWorks solution named wolfssl.hzp.

Inside are three projects:

  1. libwolfssl: This generates a library file named "libwolfssl_ARM_Debug/libwolfssl_v7em_t_le_eabi.a"
  2. benchmark: This is a sample benchmark application. It runs the "benchmark_test" suite repeatedly until a failure occurs.
  3. test: This is a sample test application. It runs "wolfcrypt_test" suite suite repeatedly until a failure occurs.

Prerequisits

You will need to install the "Freescale Kinetis CPU Support Package" in the Rowley Package Manager under Tools -> Pacakge Manager.

Harware Support

All hardware functions are defined in kinetis_hw.c and are currently setup for a Freescale Kinetis K64 Coretx-M4 microcontroller. This file can be customized to work with other Kinetis microcontrollers by editing the top part of the file. Testing for this project was done with the Freescale Kinetis MK64FN1M0xxx12 using the TWR-K64F120M.

To create support for a new ARM microcontroller the functions in hw.h will need to be implemented.

Also you will need to configure the ARM Architecture and ARM Core Type in the "Solution Properties" -> "ARM". Also the "Target Processor" in each of the projects ("Project Properties" -> "Target Processor")

Hardware Crypto Acceleration

To enable NXP/Freescale MMCAU:

  1. Download the MMCAU library.
  2. Copy the lib_mmcau.a and cau_api.h files into the project.
  3. Define USE_NXP_MMCAU to enable in user_settings.h.
  4. Add the lib_mmcau.a file to Source Files in the application project.
  5. Open the wolfssl_ltc.hzp CrossWorks project
  6. Build and run

To enable the NXP/Freescale MMCAU and/or LTC:

  1. Download the NXP KSDK 2.0
  2. Copy the following folders into IDE/ROWLEY-CROSSWORKS-ARM: drivers, mmcau_2.0.0 and CMSIS.
  3. Copy the following files into IDE/ROWLEY-CROSSWORKS-ARM: clock_config.c, clock_config.h, fsl_debug_console.c, fsl_debug_console.h, fsl_device_registers.h, system_MK82F25615.c, system_MK82F25615.h, MK82F25615.h and MK82F25615_features.h.
  4. Define USE_NXP_LTX to enable in user_settings.h.
  5. Open the wolfssl_ltc.hzp CrossWorks project
  6. Build and run

Project Files

  • arm_startup.c: Handles startup from reset_handler. Disabled watchdog, initializes sections, initializes heap, starts harware and starts main.
  • benchmark_main.c: The main function entrypoint for benchmark application.
  • hw.h: The hardware API interface. These hardware interface functions are required for all platforms.
  • kinetis_hw.c: The most basic hardware implementation required for Kinetis.
  • test_main.c: The main function entrypoint for test application.
  • user_libc.c: Defines stubs for functions required by libc. It also wraps hardware functions for UART, RTC and Random Number Generator (RNG).
  • user_settings.h: This is the custom user configuration file for WolfSSL.

Functions required by the WolfSSL Library

If you are writting your own application, the following functions need to be implemented to support the WolfSSL library:

  • double current_time(int reset): Returns a doulbe as seconds.milliseconds.
  • int custom_rand_generate(void): Returns a 32-bit randomly generated number.