Custom compilers basic implementation is finished.
Now it is possible to define your compilers or modify the already existing.
There are also new separate dialogs for Editor and Compilers (see video at the end).
Compiler are defined in xml files that must be placed in:
SimulIDE_1.x.x/data/codeeditor/compilers/compilers
SimulIDE_1.x.x/data/codeeditor/compilers/assemblers
There are some substitutions that can be done:
$filePath - Complete path to file in Editor.
$fileDir - Complete path to file folder.
$fileName - File name without extension.
$fileExt - File extension with dot.
$inclPath - Include path defined in dialog or xml file.
$buildPath - build path define in xml file.
$family - Family/Architecture defined in dialog or source file.
$device - Device name defined in dialog or source file.
There are some compiler already available, for example this one for avr-gcc.
Here you can have an idea of how to create or modify a compiler:
In some cases it is possible to debug.
There is support to debug for these compilers/assemblers:
- Arduino.
- Avr-gcc.
- SDCC.
- GcBasic.
- Avra.
- Gavrasm.
- Gpasm.
But in some cases it is possible to debug for other compilers if they provide a .lst file, don't use relative adressing and just happens that simulide can undestand it.
For PIC, AVR and 8051 asm is very likely that the debuger can work for not-supported assemblers.
The type of compiler/assembler can be defined in "type" field in xml file.
It can be a known one, like "avrgcc" or an unknown one with a number like "asm1" (this still need some work).
In this video you can get an idea of how it works:
Other features added:
- Defining Device, Family/Architecture or Board (Arduino) in source file.
- 8051 asm automatic recognition and highlighting.
- Hex files basic highlighting.
Any suggestions, ideas, etc are very welcome.
Now it is possible to define your compilers or modify the already existing.
There are also new separate dialogs for Editor and Compilers (see video at the end).
Compiler are defined in xml files that must be placed in:
SimulIDE_1.x.x/data/codeeditor/compilers/compilers
SimulIDE_1.x.x/data/codeeditor/compilers/assemblers
There are some substitutions that can be done:
$filePath - Complete path to file in Editor.
$fileDir - Complete path to file folder.
$fileName - File name without extension.
$fileExt - File extension with dot.
$inclPath - Include path defined in dialog or xml file.
$buildPath - build path define in xml file.
$family - Family/Architecture defined in dialog or source file.
$device - Device name defined in dialog or source file.
There are some compiler already available, for example this one for avr-gcc.
Here you can have an idea of how to create or modify a compiler:
- Code:
<compiler name="Avrgcc" type="avrgcc" buildPath="build_$fileName" useDevice="true">
<step
command="avr-gcc"
arguments=" -mmcu=$device -Wall -g -Os -o $buildPath$fileName.elf $filePath"
/>
<step
command="avr-objcopy"
arguments=" -j .text -j .data -O ihex $buildPath$fileName.elf $buildPath$fileName.hex"
/>
</compiler>
In some cases it is possible to debug.
There is support to debug for these compilers/assemblers:
- Arduino.
- Avr-gcc.
- SDCC.
- GcBasic.
- Avra.
- Gavrasm.
- Gpasm.
But in some cases it is possible to debug for other compilers if they provide a .lst file, don't use relative adressing and just happens that simulide can undestand it.
For PIC, AVR and 8051 asm is very likely that the debuger can work for not-supported assemblers.
The type of compiler/assembler can be defined in "type" field in xml file.
It can be a known one, like "avrgcc" or an unknown one with a number like "asm1" (this still need some work).
In this video you can get an idea of how it works:
Other features added:
- Defining Device, Family/Architecture or Board (Arduino) in source file.
- 8051 asm automatic recognition and highlighting.
- Hex files basic highlighting.
Any suggestions, ideas, etc are very welcome.
Last edited by arcachofo on Mon Mar 20, 2023 2:43 pm; edited 1 time in total