Submission for screening task 6
By :-
Deepam Priyadarshi
deepam.priyadarshi2019@vitstudent.ac.in
deepam.odhisha@gmail.com (personal)
Since the initial django docker image present at docker.pkg.github.com/frg-fossee/esim-cloud/django:dev has only avr-gcc toolchain support, so I can only implement C inline Assembly programming in which the avr-gcc compiles .c files. For using .asm file we require avra assembler, for which I have to rebuild the comtainer images.
For the swithcing between the programming languages, the users have the liberty to select the type of programming language from the editor' drop down menu as shown in the figure:-
- To compile the
.cfile received from the frontend we use the commandavr-gcc -Os -DF_CPU=16000000UL -mmcu=atmega328p -c -o {obj_name} {ino_name} - The above step generates an object file
sketch.owhich is then converted to a binary file namedsketchusing the commandavr-gcc -mmcu=atmega328p {obj_name} -o {bin_name} - The binary file is then converted to IntelHEX format using the command
avr-objcopy -O ihex -R .eeprom {bin_name} {out_name}
- A new form element was added in the
code-editor.component.htmlfile which takes the input of the desired programming laguage in the form of a drop down menu. - A new property
progLangwas introduced in thewindowobject which keeps the track of programming language used. - A new function
CompileInlineASMis introduced in thetask.pyfile which compiles the C Inline assembly code usingavr-gcc. - A new class
CompileSketchInlineASMin introduced in theviews.pyfile - New routes and urls are added in the
urls.pyandapi.service.tsfiles. And the respective apis are called in theworkspace.tsfile according to the requirement.
eSim-Cloud/esim-cloud-backend/arduinoAPI/tasks.pyeSim-Cloud/esim-cloud-backend/arduinoAPI/views.pyeSim-Cloud/esim-cloud-backend/arduinoAPI/urls.pyeSim-Cloud/ArduinoFrontend/src/app/Libs/Workspace.tseSim-Cloud/ArduinoFrontend/src/app/Libs/Workspace.tseSim-Cloud/ArduinoFrontend/src/app/code-editor/code-editor.component.tseSim-Cloud/ArduinoFrontend/src/app/code-editor/code-editor.component.html
