1 (edited by zhouhaohua.tech 2017-02-01 10:48:05)

Topic: wolfSSL with FreeRTOS Porting to NXP LPC43xx problem

my goal is to get an example of wolfSSL running in  NXP LPCXpresso, I have NXP LPC43xx device,
what is the step to porting the wolfSSL example?  any configure file need change?
            I have downloaded the  "FreeRTOS_Plus_WolfSSL_Windows_Simulator", when I compile in LPCxpresso, I keep getting all kinds of errors.
========================================
   arm-none-eabi-gcc -D__MULTICORE_NONE -D__NEWLIB__ -DDEBUG -D__CODE_RED -DCORE_M4 -D__USE_LPCOPEN -DNO_BOARD_LIB -DCPP_USE_HEAP -D__LPC43XX__ -I"C:\nxp\workspace\wolfssl_test1\inc" -I"C:\nxp\workspace\lpc_chip_43xx\inc" -I"C:\nxp\workspace\lpc_chip_43xx\inc\usbd" -I"C:\nxp\workspace\wolfssl_test1\FreeRTOS-Plus\Source\WolfSSL" -O0 -fno-common -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"src/SecureTCPClientTask.d" -MT"src/SecureTCPClientTask.o" -MT"src/SecureTCPClientTask.d" -o "src/SecureTCPClientTask.o" "../src/SecureTCPClientTask.c"
In file included from ../src/SecureTCPClientTask.c:76:0:
../src/wolfssl/ssl.h:931:33: fatal error: sys/uio.h: No such file or directory
compilation terminated.

2  and I have tried to  copy the file one by one to LPCxpresso enviroment, but I cannot find
WInSock2.h and   sys/uio.h
===================
fatal error: WinSock2.h: No such file or directory
wolfssl/ssl.h:931:33: fatal error: sys/uio.h: No such file or directory
compilation terminated.

Share

Re: wolfSSL with FreeRTOS Porting to NXP LPC43xx problem

Hi zhouhaohua,

Please uncomment the define for FREERTOS in <wolfssl-root>/wolfssl/wolfcrypt/settings.h header file when building for FREERTOS. The default settings for FREERTOS will define NO_WRITEV which will prevent the attempt to include either uio.h (standard unix/linux builds or others that implement uio.h) or WinSock2.h (for windows builds).


Best,

Kaleb

Re: wolfSSL with FreeRTOS Porting to NXP LPC43xx problem

Where can I get FreeRTOSConfig.h for LPC43S67? Here is error I have got right now
=====================================================

C:\nxp\workspace\wolfssl_test1\FreeRTOS\Source\include/FreeRTOS.h:98:28: fatal error: FreeRTOSConfig.h: No such file or directory
compilation terminated.
make: *** [src/SecureTCPClientTask.o] Error 1

Share

Re: wolfSSL with FreeRTOS Porting to NXP LPC43xx problem

Hi zhouhaohua,

The download from FreeRTOS has many many examples of FreeRTOSConfig.h
The directory structure is like so:

FreeRTOSv9.0.0/FreeRTOS/Demo/<project demo>/FreeRTOSConfig.h (and other project files)
OR
FreeRTOSv9.0.0/FreeRTOS-Plus/Demo/<project demo>/FreeRTOSConfig.h

For example see: FreeRTOSv9.0.0/FreeRTOS-Plus/Demo/FreeRTOS_Plus_WolfSSL_Windows_Simulator/FreeRTOSConfig.h


- Kaleb

5 (edited by zhouhaohua.tech 2017-02-09 00:29:39)

Re: wolfSSL with FreeRTOS Porting to NXP LPC43xx problem

now I get this Error, the SOCKET is not defined, do I missing some file?  I not using windows socket, I am running on FreeRTOS, please which socket related file need to be included

  SOCKET xClientSocket;
===================
Building file: ../src/SecureTCPClientTask.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__MULTICORE_NONE -D__NEWLIB__ -DDEBUG -D__CODE_RED -DCORE_M4 -D__USE_LPCOPEN -DNO_BOARD_LIB -DCPP_USE_HEAP -D__LPC43XX__ -I"C:\nxp\workspace\wolfssl_test1\inc" -I"C:\nxp\workspace\lpc_chip_43xx\inc" -I"C:\nxp\workspace\lpc_chip_43xx\inc\usbd" -I"C:\nxp\workspace\wolfssl_test1\FreeRTOS-Plus\Source\WolfSSL" -I"C:\nxp\workspace\wolfssl_test1\FreeRTOS\Source\include" -I"C:\nxp\workspace\lpc_board_nxp_lpcxpresso_4337\inc" -O0 -fno-common -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fsingle-precision-constant -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -MMD -MP -MF"src/SecureTCPClientTask.d" -MT"src/SecureTCPClientTask.o" -MT"src/SecureTCPClientTask.d" -o "src/SecureTCPClientTask.o" "../src/SecureTCPClientTask.c"
../src/SecureTCPClientTask.c: In function 'vSecureTCPClientTask':
../src/SecureTCPClientTask.c:96:1: error: unknown type name 'SOCKET'
SOCKET xClientSocket;

Share

Re: wolfSSL with FreeRTOS Porting to NXP LPC43xx problem

Hi Zhouhaohua,

Is there are reason you aren't using Visual Studio to build the Windows wolfSSL simulator with the FreeRTOS_Plus_WolfSSL.sln file? I wouldn't expect the Windows Simulator to build correctly with the ARM GCC compiler (cross-compiling).

See the following page for details with using the FreeRTOS wolfSSL example:
http://www.freertos.org/FreeRTOS-Plus/W … mple.shtml

We do support FreeRTOS with ARM and have many customers using this configuration. However this example is for Windows. We make it very easy to build with FreeRTOS as the OS using the define "FREERTOS". Next step is to setup the socket handling. If you are using FreeRTOS TCP then you'd want to define "FREERTOS_TCP" or if using LWIP define "WOLFSSL_LWIP".

It looks like you are building for an LPC part. Have you seen our LPC example here located here?
https://github.com/wolfSSL/wolfssl/tree … LPCXPRESSO

Thanks, David Garske, wolfSSL

Share

7 (edited by BurchSung 2019-04-02 12:53:00)

Re: wolfSSL with FreeRTOS Porting to NXP LPC43xx problem

Hi...I use arm-none-eabi-gcc. I took arm7 lpc23xx port for gcc as base. Then I compared assembler parts whith iar at91sam9xe port. They are the same. Now, my LPC use only one interrupt - TIMER0_MATCH. All other are disabled. So I installed the vPortTick function as ARM IRQ  handler. Then I installed vPortYieldProcessor function as SWI handler.

seo consultant

Share