In this week, I have been assigned to work on IDE project which seems very interesting and completely new experience for me. In this project, we aim to build a simulator for our board which makes the user able to debug the code line by line while visualizing the effect of the written code at the same time. This project was already built previously by other interns. My task is to improve it adding new features to it after fixing the issues that it has. First, we need to understand the tools that this project needs to be done. This project was mainly built using Witty framework that I have talked about last week. Furthermore, CodeMirror library was used for the code simulation, and JointJs was used for the schematic visualization.
Third, I would like to talk about the issues I am assigned to fix. The first problem was that the simulation was not working properly on “CodeMirror” side. When we run the simulation, the first and last addresses of the equivalent binary code of current line was supposed to be returned, however, only zeros were returns as addresses. The solution was discovered by Dr. Shawn when he was elaborating the issue to me. The problem was that we were missing the “-g” flag when compiling the code. If you want to compile a C++ code, you run this command in the terminal:
This will produce an executable in the same directory called
a.out which you can run by typing this in your terminal:
To specify the name of the compiled output file, so that it is not named
a.out, use-o` with your g++ command.
g++ -o output foo.cpp
This will compile
foo.cpp to the binary file named,
output and you can type
./output to run the compiled code.
However, we needed to add “-g” flag to the previous compile command in order to include appropriate debug information on the binary generated, thus making it possible to inspect it.
The second issue was that there is no effect on the schematic while the code is running. To be able to solve this problem, I spent some time learning JointJs library to get familiar with it. I kind of found a solution, however, I was not sure how I can integrate the solution with code that was already made by previous interns as a result of the many problems and difficulties that I have faced. First of all, the code is very long and there are many tools are used in this project which makes it a bit too hard for me to understand how it works especially that I haven’t worked on such a big project before, however, it is a nice experience so far because I think the project is pretty interesting. Moreover, I usually take some time to adapt to a new environment and new experience. For these two reasons, I feel that I was a little bit slow trying to learn so many things and adapt. It is really interesting to learn new things, however, I am kind of disappointed because I haven’t achieved so many things yet. Hopefully, I will be able to adapt and learn fast and achieve my project successfully and perfectly.
Last but not least, I would like to mention that my colleagues and I had fun this week because we were invited by Dr Shawn to a farewell lunch for one of the interns, and to the cinema as well. It had been a good time to get to talk and know each other even more. Thanks, dr. Shawn for the invitation! 🙂