|
| 1 | +# wolfSSL MPLAB X Project Files for XC16 |
| 2 | + |
| 3 | +This directory contains project files for the Microchip MPLAB X IDE. These |
| 4 | +projects have been set up to use the Microchip PIC24 Starter Kit |
| 5 | +and the Microchip XC16 compiler. |
| 6 | + |
| 7 | +In order to generate the necessary auto-generated MPLAB X files, make sure |
| 8 | +to import the wolfssl.X project into your MPLAB X workspace before trying to |
| 9 | +build the wolfCrypt test. This will correctly set up the respective project's |
| 10 | +Makefiles. |
| 11 | + |
| 12 | +## Included Project Files |
| 13 | + |
| 14 | +### wolfSSL library (wolfssl.X) |
| 15 | + |
| 16 | +This project builds a static wolfSSL library. The settings for this project are in `user_settings.h`: |
| 17 | +``` |
| 18 | +<wolfssl_root>/IDE/MPLABX16/user_settings.h |
| 19 | +``` |
| 20 | + |
| 21 | +After this project has been built, the compiled library will be located at: |
| 22 | +``` |
| 23 | +<wolfssl_root>/IDE/MPLABX16/wolfssl.X/dist/default/production/wolfssl.X.a |
| 24 | +``` |
| 25 | + |
| 26 | +### wolfCrypt Test App (wolfcrypt_test.X) |
| 27 | + |
| 28 | +This project tests the wolfCrypt cryptography modules. It is generally a good |
| 29 | +idea to run this first on an embedded system after compiling wolfSSL in order |
| 30 | +to verify all underlying crypto is working correctly. This project depends on |
| 31 | +files generated by Microchip's MCC tool to view the UART output. Follow the |
| 32 | +steps below to generate that code. |
| 33 | + |
| 34 | +## Generating MCC UART code |
| 35 | + |
| 36 | +1. Open the MPLAB Code Configurator application. |
| 37 | + |
| 38 | +2. Set the Project path to the wolfSSL/IDE/MPLABX16 and enter your PIC device |
| 39 | +into the interface. |
| 40 | + |
| 41 | +3. Select MCC Clasic as the content type and click `Finish`. |
| 42 | + |
| 43 | +4. Under the Device Resources section, find the UART entry and add the UART1 |
| 44 | +peripheral. |
| 45 | + |
| 46 | +5. Note the UART settings and check the `Enable UART Interrupts` and |
| 47 | +`Redirect Printf to UART` boxes. |
| 48 | + |
| 49 | +6. Click the `Generate` button. |
| 50 | + |
| 51 | + |
| 52 | +**Note** : If using an older version of `xc16`, you may have to add the |
| 53 | +following to `user_settings.h`. |
| 54 | +``` |
| 55 | +#define WOLFSSL_HAVE_MIN |
| 56 | +#define WOLFSSL_HAVE_MAX |
| 57 | +``` |
| 58 | + |
| 59 | +## Support |
| 60 | + |
| 61 | +Please send questions or comments to support@wolfssl.com |
| 62 | + |
0 commit comments