I would really appeciate if someone could explain me the steps to compile mbedTLS for a PIC32MX processor using the Microchip Technolgy’s XC32 compiler, because I was not able to do it.
I’m using Windows 10.
What I tried so far:
(0) Installed CMake (cmake-gui) 3.16.2
(1) Downloaded mbedtls-2.16.3-apache (on 31-december-2019) and extracted it to C:\source
(2) Went to folder \configs, selected file config-mini-tls1_1.h, did a copy of it, renamed it to config.h, copied it to folder \include\mbedtls replacing the existing file.
(3) Opened CMD/prompt, and did on it:
(3.a) mkdir C:\compiled then cd C:\compiled
(3.b) SET CC=C:\Program Files (x86)\Microchip\xc32\v1.43\bin (XC32 compiler folder)
(3.c) cmake c:\source
It does not compile correctly, and Im not figuring out what’s happening.
Please, could you help me?
Note that CC is the compiler itself, and not the folder of the toolchain.
You should set CC to be the compiler itself.
please try the following for step 3.b:
SET CC=C:\Program Files (x86)\Microchip\xc32\v1.43\bin\xc32-gcc.exe
It fails with the following output:
Change Dir: C;/compiled/CMakFiles/CMakeTmp
I believe this is related to windows path vs. Linux path, and the failure is because the path is separated with /.
Please try to run in cygwin for example, and not windows command prompt
Regards,
Ron
Hi Jeferson,
For some reason, the cmake didn’t recognize you setting the toolchain, and it tried using c1 as a compiler.
maybe cmake CC=/cygdrive/c/v1.43/bin/x32-gcc.exe . will work?
Please also check that, I deleted c:\compiled folder and tried to create the folder again with cygwin, but the folder is not present on c:\
That’s because you didn’t create c:\compiled
You have created a folder named c:compiled in your user folder. cygwin work swith Linux style paths. You should create the folder /cygdrive/c/source`. ( Maybe mkdir c:\source would also work)
Regards