How to support new hardware architectures
From Pigmeo Development Wiki
These are the instructions you need to follow for being able to generate assembly language code for hardware architectures not supported yet.
First of all you must choose a good name for the new target architecture. Examples are PIC, dsPIC... If you aren't sure about this name, talk about it on the development mailing list. This name won't be allowed to be changed in the future, and no other architectures going to be implemented ever will be able to share this name. As an example, we'll call this new architecture "NewArch".
Choose the first model/branch your architecture will support. We'll call it NewBranch
Modifications on Pigmeo Framework
- Create the folder pigmeo-framework/src/internal/YourArch.
- Add NewArch and NewBranch to the list of available architectures and branches (pigmeo-framework/src/GlobalEnums.cs)
- Add at least one device from the new architecture (pigmeo-framework/src/devices/NewBranch.cs)
Modifications on Pigmeo Compiler
- Create folders pigmeo-compiler/src/BackendNewArch and pigmeo-compiler/src/BackendNewArch/instructions
- Add all the assembly-language instructions supported by NewArch to pigmeo-compiler/src/BackendNewArch/instructions. One instruction per file/class
- Look for switch(target.arch) within pigmeo-compiler/src/Backend.cs. Add a new case for NewArch which calls the backend for this new architecture
- Using an already implemented backend for another architecture as template, begin working on the backend for the new architecture
Modifications on the website
Look for the full list of supported architectures and granches and update it
Now you need to begin adding tutorials and code examples for the new architecture, so end-users can easily develop applications for it.
If the new architecture implementation on Pigmeo Compiler has special features or behavior not found on the implementations of other architectures, you need to write at least one article about it and publish it in the Documentation for Developers section.

