I made my first commit in git this week, by creating a repository and adding all the necessary files to the project. First I had to go through the git flow chart which was a very helpful graphical aid in understanding the branches associated with github. I first added the unchanged initial files of TCPIP stack provided by MICROCHIP. I then removed the unnecessary include and library files and committed them to a release branch. I also learned the ways of version naming for the releases. Naturally the naming method is dependent on the workplace and the person. After the first release I was on the development branch.

Moreover while on this branch I tried to compile the existing codes in my MPLABX, I kept on facing some difficulties. At that point I had to remove all the include files and libraries added before and change my directory to the new git files I added. Furthermore after adding the files I still kept facing some problems and the compiler gave an error saying that some files are not found. Upon investigation I realized that the include files had “TCPIP Stack / TCPIP.h” written in it and since my files were not in a folder labeled TCPIP Stack the compiler kept looking at the wrong place. Hence I had to remove “TCPIP Stack” from all the include files.

I still kept on facing more errors and when I tried to follow the code, I kept getting different files for the same name which baffled me a lot. After consulting with my supervisor I came to the realization that I still had the TCPIP stack in my project file and the git directory, the compiler was having difficulty deciding which file to use and kept giving an error. Deleting the files from my project directory fixed this problem.

Compilation of the code then kept giving a TCB_URAM error which indicated that the code exceeds the memory of the PIC. This was overcome by commenting and hence removing the TCP socket used in testing the receive rate of TCP Performance test.

I then started work on the TELNET server application. To document the work I created a new feature branch in git, and added the initial application provided from MICROCHIP. I then stripped off the application specific codes and kept the minimum requirements for just opening and closing a telnet socket. I then added my own applications to enter a character add one, and send back the character through telnet. When testing out this program I found that the program does not send back a value. After intensive testing through checking the packets sent through the network by wireshark we realized that the PC side was not flushing the buffer since it is not full and hence the MCU does not receive a byte and hence we do not receive an output character. In order to send the byte and flush the PC buffer user has to press return and then the program works perfectly.

After getting the telnet server up and running I moved onto a Generic TCP Client working with HTTP. Again I started work by adding the initial file to a new feature branch and then removing the application specific data and making it to a bare minimum. In order to run this client I had to uncomment STACK_USE_GENERIC_TCP_CLIENT from TCPIP ETH97.h. The program uses the stacks existing UART to output the results, however I changed the program to use the USART 1 of the PIC  by including usart.h, and after the compilation and testing the program worked fine.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.