> For the complete documentation index, see [llms.txt](https://dev.tesa.or.th/tesa-developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.tesa.or.th/tesa-developer/tesa-university-program/rt-thread-iot-os/university-program/edge-ai-workshop/installation-and-first-coding.md).

# Installation & First Coding

1. Download and install RT-Thread Studio. Note that the installation location must be `C:`

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2FbhqLJotXxI1I5qg8QB52%2F0.1.png?alt=media&amp;token=c7df9a4d-e078-472c-8ba7-e485d91d34fe" alt=""><figcaption></figcaption></figure>

2. Click SDK Manager button in toolbar

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2FztgekIX3aQzeMjiheGGQ%2F0.2.png?alt=media&amp;token=06756c54-f5f2-4088-936a-74595d84e40a" alt=""><figcaption></figcaption></figure>

3. Choose Board\_Support\_Packages --> Renesas --> VISION-BOARD and choose version 1.3.0

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2FJeJoc9IuYOfHoLaAdrTJ%2F0.3.png?alt=media&amp;token=c2fa531c-418e-4707-96db-4e928dbfb0a6" alt=""><figcaption></figcaption></figure>

4. Choose Debugger\_Support\_Packages --> PyOCD, and choose version 0.2.3

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2FpgPzkbRh6mK16BMLswYJ%2F0.4.png?alt=media&amp;token=66113ff8-7071-4733-a41d-0fc03776cccb" alt=""><figcaption></figcaption></figure>

5. Choose menu File -->  New --> RT-Thread Project to create a new project for VISION- BOARD with Template and DAP-LINK settings

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2F6YnY9qxG5aMcY3PYBzij%2F0.5.png?alt=media&amp;token=bbcedd22-43a0-45fc-8993-a5300d6ee601" alt=""><figcaption></figcaption></figure>

6. Check the source code in Project Explorer `\blink\src\hal_entry.c`

```c
rt_kprintf("\nHello RT-Thread!\n");
	while (1)
	{
     	rt_pin_write(LED_PIN, IN_HIGH);
        	rt_thread_mdelay(500);
        	rt_pin_write(LED_PIN, PIN_LOW);
        	rt_thread_mdelay(500);
    	}
```

7. Use menu Project --> Build All or Build button in toolbar to build project

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2FRpz4LHybB77vODNdJWcG%2F0.6.png?alt=media&amp;token=e7cf674f-7683-4642-b06b-4fef428f2dfe" alt=""><figcaption></figcaption></figure>

8. Connect USB-DBG port of VISION-BOARD to the computer
9. Press `Window+X button` --> Device Manager, then check DAP-Link driver is installed properly

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2F2NmbY7FDiQrX7wFesNkG%2F0.9.png?alt=media&amp;token=dc682216-d4b1-4059-b781-73fecfb955e4" alt=""><figcaption></figcaption></figure>

10. Click Flash Download button to program the board&#x20;

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2FNITmKX5MvNVqqsnh4oD8%2F0.10.png?alt=media&amp;token=84e9b171-14fb-4f39-9e04-d2a77755ca95" alt=""><figcaption></figcaption></figure>

10. Check the 1-Hz blinking of blue LED on the board

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2Fqesj6QwdFJucLcUY4wm1%2F0.11.png?alt=media&amp;token=ce4de570-f03d-483e-84fd-0eb066b299bb" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**(Optional)** try blink in other LED colour
{% endhint %}

11. Click Open a Terminal button in toolbar to start serial terminal

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2FTdbCftiZ5nf2qk2ghfE4%2F0.12.png?alt=media&amp;token=61985d43-06a1-459e-a9c1-2354e34a80ba" alt=""><figcaption></figcaption></figure>

12. Click Debug launch button to start debug perspective

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2Fymj5mdISiYgEWSlcV1Am%2F0.13.png?alt=media&amp;token=901dae50-ec8c-43f9-a5ff-42a4c168cb72" alt=""><figcaption></figcaption></figure>

13. Click Resume button to start running, then Terminate button to stop

<figure><img src="https://2179313969-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4cbrznEv1DwPp6m0FjGI%2Fuploads%2FjvJ2i6X9MkG06sJSGxMs%2F0.14.png?alt=media&amp;token=93f576a6-0bec-4447-8908-128a03e0cb24" alt=""><figcaption></figcaption></figure>
