Compiling mbedTLS for PIC32MX processor with XC32 compiler of Microchip Technology

I am not sure why you need to use Cygwin. It is probably a lot easier to use the MPLABX IDE with the XC32 compiler and build the project from the IDE instead of the command line.

I use the mbedTLS library for all my PIC32MZ (2MB code space, 512KB data space) based AWS IoT projects with great success. I use the library to talk to AWS MQTT broker and perform OTA firmware upgrade via HTTPS connection to the AWS S3 Bucket for file download.

The MX series may not have enough code space and data memory for job.

1 Like

Hi @acpie360
I think I just need to get a compiled static library (.a extension?), to be included in my current MPLABX project later. First, I was not able to compile mbedTLS using DOS, then it was recommended to me to use cygwin instead, and it also not compiling.

How would I do that what you said directly on MPLAB X? Should I create a new project, then select the MCU and the compiler, then add the mbedTLS files to the project and compile? The question is that I don’t know how do I need to add the files exactly on the MPLABX project in order to be able to compile…

I just add the mbedTLS source code into my project and I don’t see any benefit to build the mbedTLS into a library file.

Check your PM.

1 Like

Hi @roneld01, I still want to get it compiled.
What do you think I can try now?
Regards.

Hi Jeferson,
If you can add the source code to your project and build it there, as suggested by @acpie360, it would be much simpler.
I just noticed I had a typo in the compiler. It is xc32-gcc.exe

Please try the following:

cd /cygdrive/c/source
rm CmakeCache.txt
rm -r CMakeFiles/
CC=/cygdrive/c/v1.43/bin/xc32-gcc.exe cmake  .
make

Regards

1 Like