# Manual compilation and customization

Once exported and customized you need to upload manually the firmware, this requires some extra steps to get the right PID/VID signature and usb name

## Sketch customization

All the configuration constants are available in `externaldefines.h`

If you want to port the protocol to another platform MCU the serial protocol is visible in `protocol.h`

## Compiling

### Environment installation

* Install a legacy Arduino IDE 1.8.X (<https://www.arduino.cc/en/software>)

### Add a custom board to the Arduino IDE with your PID/VID

* Go into the Arduino IDE installation folder and inside the hardware\arduino\avr folder (ie : C:\Program Files (x86)\Arduino\hardware\arduino\avr on a standard installation)
* Make a backup of the boards.txt file
* Open the notepad as an administrator and edit the “boards.txt” file and add to the content of the boards.txt provided in the firmware export
* Save the file

### Uploading the sketch

* Choose your board in the boards menu (NB : See annexes if the custom board is not visible)

![](https://user-images.githubusercontent.com/2207331/213188072-3c3e77aa-0f93-42a6-918c-ebeeefdc565a.png)

* Select the serial port and upload

Notes :

* If upload protection was enabled to upload once again the sketch, unplug/plug back the board to allow upload (see Upload protection settings in sketch), or you can use the provided utility.
* After the first upload, device serial port name will change (as it is linked to the PID/VID)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.simhubdash.com/standard-serial-firmware-builder/manual-compilation-and-customization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
