What I meant is that we shouldn’t redefine ipconfigETHERNET_MINIMUM_PACKET_BYTES
to be greater than baMINIMAL_BUFFER_SIZE
.
Just wanted to confirm if thats really the case.
What I meant is that we shouldn’t redefine ipconfigETHERNET_MINIMUM_PACKET_BYTES
to be greater than baMINIMAL_BUFFER_SIZE
.
Just wanted to confirm if thats really the case.
github. com/gewin1988/FreeRTOS_forum_attempt
Please remove the whitespace after . because your site says i can not insert links into reply…
Hey @madaf ,
As I have mentioned in my previous reply you have a redefinition of ipconfigETHERNET_MINIMUM_PACKET_BYTES
in here:
#define ipconfigETHERNET_MINIMUM_PACKET_BYTES ( 200 )
Please remove it or keep it less than or equal to baMINIMAL_BUFFER_SIZE
.
You can read more information about it here.
done. Still not compiling. Error is the same: “./src/BufferAllocation_2.c:76:29: error: enumerator value for ‘assert_line_78’ is not an integer constant”
Hey @madaf ,
That seems strange as the only reason to trigger that assert is the condition ipconfigETHERNET_MINIMUM_PACKET_BYTES <= baMINIMAL_BUFFER_SIZE
being false.
Also I don’t see any of the FreeRTOS+TCP header files in the project you have uploaded in the github. Are those git ignored?
They are added to the include path.
As it written in the tutorial:
Add the following core TCP/IP directories into your compiler’s include path:
FreeRTOS-Plus/FreeRTOS_Plus_TCP/source/include FreeRTOS-Plus/FreeRTOS_Plus_TCP/source/portable/Compiler/[compiler] (where [compiler] is the compiler in use).
Hey @madaf ,
We are setting up the xilinx’s vitis tools, will try building your project and will get back to you.
Thank you very much!
Hey @madaf,
There was a couple of project build and configuration settings we had to modify to make your project build on the Vitis IDE.
Note: Your FreeRTOSIPConfig.h
is in ForFreeRTOSForumApp\src
, so make sure to include that path as well.
Add the entire source files in the FreeRTOS-Plus-TCP\source\portable\NetworkInterface\Zynq
to ForFreeRTOSForumApp\src\Zynq
to the project.
Add source files inside FreeRTOS-Plus-TCP\source\portable\NetworkInterface\Common
to the project.
Updated the FreeRTOSIPConfig.h
with following settings (NOTE: This can be configured as per your requirement, these changes are for a minimal build to succeed):
//#define TEST 1 /* UN DEFINE THIS */
#define ipconfigDHCP_REGISTER_HOSTNAME 0
#define ipconfigUSE_DHCP_HOOK 0
#define ipconfigNIC_N_TX_DESC ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS
#define ipconfigNIC_N_RX_DESC ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS
#define ipconfigSUPPORT_OUTGOING_PINGS 0
#define ipconfigUSE_NBNS ( 0 )
#define ipconfigUSE_LLMNR ( 0 )
//#define ipconfigETHERNET_MINIMUM_PACKET_BYTES ( 200 ) /* UN DEFINE THIS */
ForFreeRTOSForumApp/src/freertos_hello_world.c
in your case):vApplicationIPNetworkEventHook
ulApplicationGetNextSequenceNumber
xApplicationGetRandomNumber
Here is the patch file (containing the above changes):
0001-wip.zip (22.1 KB)
Note: This doesn’t include IDE project/config file changes as the paths might be different for you.
Hello, Thank you very much!
- “Included/edited the following freeRTOS+TCP include paths”
I did it:
Add the entire source files in the FreeRTOS-Plus-TCP\source\portable\NetworkInterface\Zynq to ForFreeRTOSForumApp\src\Zynq to the project. Add source files inside FreeRTOS-Plus-TCP\source\portable\NetworkInterface\Common to the project. Updated the FreeRTOSIPConfig.h with following settings (NOTE: This can be configured as per your requirement, these changes are for a minimal build to succeed):
I did it as well.
Define the following user defined hooks in your application source file (maybe,
ForFreeRTOSForumApp/src/freertos_hello_world.c
in your case):
I did it as well.
Now it says
“/src/Zynq/x_emacpsif_dma.c:70:42: error: ‘ipconfigNIC_N_TX_DESC’ undeclared here (not in a function)”
Even if it exists (as define) in FreeRTOSIPConfig.h. Even it i added a new folder “myinlcudes” next to “folder src” and added it to the include paths and moved the FreeRTOSIPConfig.h from “src” to this folder.
Hey @madaf,
I tried building the latest version of your project (in Github). I dont get the build error you mentioned in the reply.
The only changes that was missing to be added are:
diff --git a/ForFreeRTOSForumApp/src/FreeRTOSIPConfig.h b/ForFreeRTOSForumApp/src/FreeRTOSIPConfig.h
index a94601f..3df3533 100644
--- a/ForFreeRTOSForumApp/src/FreeRTOSIPConfig.h
+++ b/ForFreeRTOSForumApp/src/FreeRTOSIPConfig.h
@@ -139,7 +139,7 @@ extern uint32_t ulRand();
* reason. The static configuration used is that passed into the stack by the
* FreeRTOS_IPInit() function call. */
#define ipconfigUSE_DHCP 1
-#define ipconfigDHCP_REGISTER_HOSTNAME 1
+#define ipconfigDHCP_REGISTER_HOSTNAME 0
#define ipconfigDHCP_USES_UNICAST 1
/* If ipconfigDHCP_USES_USER_HOOK is set to 1 then the application writer must
diff --git a/ForFreeRTOSForumApp/src/freertos_hello_world.c b/ForFreeRTOSForumApp/src/freertos_hello_world.c
index 84a9942..abf1e3c 100644
--- a/ForFreeRTOSForumApp/src/freertos_hello_world.c
+++ b/ForFreeRTOSForumApp/src/freertos_hello_world.c
@@ -16,6 +16,11 @@
#include "task.h"
#include "queue.h"
#include "timers.h"
+
+/* +TCP */
+
+#include "FreeRTOS_IP.h"
+
/* Xilinx includes. */
#include "xil_printf.h"
#include "xparameters.h"
This is the final status we get when its build:
08:35:07 **** Build of configuration Debug for project ForFreeRTOSForumApp_system ****
make all
Generating bif file for the system project
generate_system_bif.bat 56275 C:/Users/Administrator/Documents/Projects/temp/FreeRTOS_forum_attempt/ForFreeRTOSForum/export/ForFreeRTOSForum/ForFreeRTOSForum.xpfm freertos10_xilinx_domain C:/Users/Administrator/Documents/Projects/temp/FreeRTOS_forum_attempt/ForFreeRTOSForumApp_system/Debug/system.bif
sdcard_gen --xpfm C:/Users/Administrator/Documents/Projects/temp/FreeRTOS_forum_attempt/ForFreeRTOSForum/export/ForFreeRTOSForum/ForFreeRTOSForum.xpfm --sys_config ForFreeRTOSForum --bif C:/Users/Administrator/Documents/Projects/temp/FreeRTOS_forum_attempt/ForFreeRTOSForumApp_system/Debug/system.bif --no_bitstream --elf C:/Users/Administrator/Documents/Projects/temp/FreeRTOS_forum_attempt/ForFreeRTOSForumApp/Debug/ForFreeRTOSForumApp.elf,ps7_cortexa9_0
Running C:/Xilinx/Vitis/2022.2/bin/bootgen -image C:/Users/Administrator/Documents/Projects/temp/FreeRTOS_forum_attempt/ForFreeRTOSForumApp_system/Debug/sd_card_temp/boot.bif -w -o i BOOT.BIN
08:35:13 Build Finished (took 6s.69ms)
I added the Register Hostname define to 0. and still has the error message.
Im using this version(official, downloaded, installed, not a single option was changed)
Hi @madaf ,
I don’t know if it is helpful, but I also have been through the pain of getting Vitis working with FreeRTOS + TCP and +FAT. In the end I stopped using the Vitis generated FreeRTOS code and just did my own thing. Here is a complete project which I created and published for the Zedboard as a template for the open source community (All MIT license) It runs an asymmetrical multi-processing implementation with a FreeRTOS instance on each core. May be it could be useful to give you some ideas on how to go about getting Vitis to integrate with the latest FreeRTOS+ projects. At the very least you can download it and follow the instructions in the ‘readme’ and the project will build in Vitis. You could then hack the source to make it work with a different Zynq board if necessary… It would certainly be easy to get it going on the ZC702 for example…
I hope it helps.
Kind Regards,
Pete
Hey @madaf,
I’m using the same Vitis IDE version.
If you can add me (tony-josi-aws) as a collaborator to your Github repo. I can push the entire setup I’m using to test your build to a different branch.
Hello, thank you.
Its done.
Hey @madaf,
I have pushed the version of the project that’s building on my system to this branch of your repo.
Note that FreeRTOS+TCP library is added as a git submodule in the branch and is only used to accessing the header files as your project didn’t included any FreeRTOS+TCP headers (make sure to update the submodule as well when using the branch). The FreeRTOS+TCP source files used are the ones that you already had in your project.
Hello, thank you.
Just check out your branch,
still errors.
(multiple definition errors which i can remove of course but i can not understand how it is compiled at your side :S:S )
We were able to set up tcp for freeRTOS in Vitis IDe with the help of @tony-josi-aws .
Thank you very - very - very much for your time and help and support!!!
@tony-josi-aws One more question: the same solution is works with Vitis + e.g. FreeRTOS-Plus-IO?