From b6cda41dafe51dd7d7a28c8b9473929bfe36c933 Mon Sep 17 00:00:00 2001 From: MasterPhi Date: Tue, 7 Sep 2021 12:32:27 +0200 Subject: [PATCH] Add doc for IAR. --- docs/reference/getting_started.rst | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/reference/getting_started.rst b/docs/reference/getting_started.rst index 5f3227927..be2e1b5ea 100644 --- a/docs/reference/getting_started.rst +++ b/docs/reference/getting_started.rst @@ -151,3 +151,39 @@ Some board use uf2 bootloader for drag & drop in to mass storage device, uf2 can .. code-block:: $ make BOARD=feather_nrf52840_express all uf2 + +IAR Support +----------- + +IAR Project Connection files are provided to import TinyUSB stack into your project. + +* A buldable project of your MCU need to be created in advance. + + + * Take example of STM32F0: + + - You need `stm32l0xx.h`, `startup_stm32f0xx.s`, `system_stm32f0xx.c`. + + - `STM32L0xx_HAL_Driver` is only needed to run examples, TinyUSB stack itself doesn't rely on MCU's SDKs. + +* Open `Tools -> Configure Custom Argument Variables` (Switch to `Global` tab if you want to do it for all your projects) + Click `New Group ...`, name it to `TUSB`, Click `Add Variable ...`, name it to `TUSB_DIR`, change it's value to the path of your TinyUSB stack, + for example `C:\\tinyusb` + +Import stack only +^^^^^^^^^^^^^^^^^ + +1. Open `Project -> Add project Connection ...`, click `OK`, choose `tinyusb\\tools\\iar_template.ipcf`. + +Run examples +^^^^^^^^^^^^ + +1. (Python3 is needed) Run `iar_gen.py` to generate .ipcf files of examples: + + .. code-block:: + + cd C:\tinyusb\tools + python iar_gen.py + +2. Open `Project -> Add project Connection ...`, click `OK`, choose `tinyusb\\examples\\(.ipcf of example)`. + For example `C:\\tinyusb\\examples\\device\\cdc_msc\\iar_cdc_msc.ipcf`