FreeRTOS + IP stack on a ATMEL ATSAME70Q21

Hi We have been using FreeRTOS with lwIP stack. We would like to consider the possibility of using instead the IP stack supplied with FreeRTOS. We are using an ATMEL ATSAME70Q21 on our embedded system. The MAC driver for the lwIP stack is provided already with ATMEL ASF. I would like to know if the ATMEL ATSAME70Q21 MAC is already supported by the FreeRTOS IP stack. Do I need to develop a driver? Can I use the driver supplied by ATMEL ASF? Is there any working example that is supplied in the FreeRTOS package that can run on a demo board? We have an ATMEL SAM V71 Xplained Ultra. thanks

FreeRTOS + IP stack on a ATMEL ATSAME70Q21

Will this link help you? https://sourceforge.net/p/freertos/discussion/382005/thread/d6de20d393/?limit=25#2020

FreeRTOS + IP stack on a ATMEL ATSAME70Q21

thanks for the answer and link. I’m trying to bring the project to Eclipse (since I don’t have Atmel Studio, nor Keil, nor IAR) and I’m encountering some compilation problems most likely related with ARM architecture: instruction not allowed in IT block — msr psp,r0' FreeRTOS_IP line 690, external location: /tmp/ccjYz9a1.s C/C++ Problem instruction not allowed in IT block --stmdb r0!,{r4-r11,r14}’ FreeRTOSIP line 666, external location: /tmp/ccjYz9a1.s C/C++ Problem make: *** [src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7/port.o] Error 1 FreeRTOSIP C/C++ Problem recipe for target ‘src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7/port.o’ failed subdir.mk /FreeRTOSIP/Debug/src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7 line 18 C/C++ Problem selected processor does not support vldmiaeq r0!,{s16-s31}' in Thumb mode FreeRTOS_IP line 688, external location: /tmp/ccjYz9a1.s C/C++ Problem selected processor does not supportvstmdbeq r0!,{s16-s31}’ in Thumb mode FreeRTOS_IP line 664, external location: /tmp/ccjYz9a1.s C/C++ Problem It seems that the compiler is generating code that is not supported by the Thumb instruction set… I’m using an ATMEL SAME70, so I have set the project properties to cortex-m7 architecture toolchain default instruction Thumb Do you have any ideas about this? thanks

FreeRTOS + IP stack on a ATMEL ATSAME70Q21

In the meantime I found that these errors como from the port.c file. The file in use is from GCC/ARM_CM7, so since I use the ATSAM70E it should be the right file. I believe that is the project configuration in Eclipse that is set with the wrong ARM processor.

FreeRTOS + IP stack on a ATMEL ATSAME70Q21

In the meantime I found that these errors com from the port.c file. The file in use is from GCC/ARM_CM7, so since I use the ATSAM70E it should be the right file. I believe that is the project configuration in Eclipse that is set with the wrong ARM processor.

FreeRTOS + IP stack on a ATMEL ATSAME70Q21

This is the console output of Eclipse: make all Building file: ../src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7/port.c Invoking: GNU ARM Cross C Compiler arm-none-eabi-gcc -mcpu=cortex-m7 -mthumb -mthumb-interwork -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g3 -I”/home/user/svn/FreeRTOSIP/src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/include” -I”/home/user/svn/FreeRTOSIP/src/Config” -I”/home/user/svn/FreeRTOSIP/src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7″ -std=gnu11 -MMD -MP -MF”src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7/port.d” -MT”src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7/port.o” -c -o “src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7/port.o” “../src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7/port.c” /tmp/ccNEesp1.s: Assembler messages: /tmp/ccNEesp1.s:664: Error: selected processor does not support vstmdbeq r0!,{s16-s31}' in Thumb mode /tmp/ccNEesp1.s:666: Error: instruction not allowed in IT block --stmdb r0!,{r4-r11,r14}’ /tmp/ccNEesp1.s:688: Error: selected processor does not support vldmiaeq r0!,{s16-s31}' in Thumb mode /tmp/ccNEesp1.s:690: Error: instruction not allowed in IT block --msr psp,r0′ src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7/subdir.mk:18: recipe for target ‘src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7/port.o’ failed make: *** [src/thirdparty/RTOS/freertos/FreeRTOSV10.0.0/Source/portable/GCC/ARMCM7/port.o] Error 1

FreeRTOS + IP stack on a ATMEL ATSAME70Q21

Not read the rest of this thread, but just looking at these errors it is almost certain the compiler command line is not setting the target MCU correctly. You have to tell it which MCU architecture you are building for, and which floating point library to use (which might be software emulation if there is no floating point unit, or the architecture of the floating point unit if there is).

FreeRTOS + IP stack on a ATMEL ATSAME70Q21

thanks for the answer. I think I solved that one. At the moment I have another problem. Some files seem to be missing… Several files try to include sam.h (which is the file that includes several others in my case should be same70q21.h. None of these files are present… I copied them from a complete FreeRTOS distribution. Now I get another error (unrelated I think) on NetworkInterface.c regarding the declaration: typedef struct gmacdevice { Gmac *phw declaration in: I cannot find the file that defines Gmac!