• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..10-Feb-2022-

Kinetis_FlashPlacement.xmlH A D10-Feb-20221.9 KiB3029

README.mdH A D10-Feb-20223.6 KiB6343

arm_startup.cH A D10-Feb-202218.7 KiB311233

benchmark_main.cH A D10-Feb-20226.6 KiB17739

hw.hH A D10-Feb-2022415 2413

include.amH A D10-Feb-2022688 1614

kinetis_hw.cH A D10-Feb-202211.1 KiB346224

retarget.cH A D10-Feb-20222.6 KiB12678

test_main.cH A D10-Feb-20222.5 KiB10239

user_settings.hH A D10-Feb-202210.1 KiB434238

wolfssl.hzpH A D10-Feb-202217.9 KiB444443

wolfssl_ltc.hzpH A D10-Feb-202228.1 KiB641640

README.md

1# Rowley CrossWorks ARM Project for wolfSSL and wolfCrypt
2
3This directory contains a CrossWorks solution named wolfssl.hzp.
4
5Inside are three projects:
6
71. libwolfssl:
8This generates a library file named "libwolfssl_ARM_Debug/libwolfssl_v7em_t_le_eabi.a"
92. benchmark:
10This is a sample benchmark application. It runs the "benchmark_test" suite repeatedly until a failure occurs.
113. test:
12This is a sample test application. It runs "wolfcrypt_test" suite suite repeatedly until a failure occurs.
13
14# Prerequisites
15
16+You will need to install the "Freescale Kinetis CPU Support Package" and "ARM CPU Support Package" in the Rowley Package Manager under Tools -> Package Manager.
17
18# Hardware Support
19
20All 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 build for the `TWR-K64F120M` or `FRDM-K64F`, define `WOLFSSL_FRDM_K64` in the Preprocessor Definitions section of CrossStudio, or define it in "user_settings.h".
21
22To create support for a new ARM microcontroller the functions in `hw.h` will need to be implemented.
23
24Also you will need to configure the ARM Architecture and ARM Core Type in the "Solution Properties" -> "ARM".
25Also the "Target Processor" in each of the projects ("Project Properties" -> "Target Processor")
26
27## Hardware Crypto Acceleration
28
29To enable NXP/Freescale MMCAU:
30
311. [Download the MMCAU library](http://www.freescale.com/products/arm-processors/kinetis-cortex-m/k-series/k7x-glcd-mcus/crypto-acceleration-unit-cau-and-mmcau-software-library:CAUAP).
322. Copy the `lib_mmcau.a` and `cau_api.h` files into the project.
333. Define `USE_NXP_MMCAU` to enable in `user_settings.h`.
344. Add the `lib_mmcau.a` file to `Source Files` in the application project.
355. Open the wolfssl_ltc.hzp CrossWorks project
366. Build and run
37
38To enable the NXP/Freescale MMCAU and/or LTC:
39
401. [Download the NXP KSDK 2.0](https://nxp.flexnetoperations.com/control/frse/download?agree=Accept&element=7353807)
412. Copy the following folders into IDE/ROWLEY-CROSSWORKS-ARM: drivers, mmcau_2.0.0 and CMSIS.
423. 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.
434. Define `USE_NXP_LTX` to enable in `user_settings.h`.
445. Open the wolfssl_ltc.hzp CrossWorks project
456. Build and run
46
47# Project Files
48
49* `arm_startup.c`: Handles startup from `reset_handler`. Disabled watchdog, initializes sections, initializes heap, starts hardware and starts main.
50* `benchmark_main.c`: The main function entrypoint for benchmark application.
51* `hw.h`: The hardware API interface. These hardware interface functions are required for all platforms.
52* `kinetis_hw.c`: The most basic hardware implementation required for Kinetis.
53* `test_main.c`: The main function entrypoint for test application.
54* `user_libc.c`: Defines stubs for functions required by libc. It also wraps hardware functions for UART, RTC and Random Number Generator (RNG).
55* `user_settings.h`: This is the custom user configuration file for WolfSSL.
56
57# Functions required by the WolfSSL Library
58
59If you are writing your own application, the following functions need to be implemented to support the WolfSSL library:
60
61* `double current_time(int reset)`: Returns a double as seconds.milliseconds.
62* `int custom_rand_generate(void)`: Returns a 32-bit randomly generated number.
63