Skip to content

Commit 35615ec

Browse files
committed
Update doc.
1 parent 3eb7d6e commit 35615ec

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

docs/reference/getting_started.rst

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,10 @@ Some board use uf2 bootloader for drag & drop in to mass storage device, uf2 can
178178
$ make BOARD=feather_nrf52840_express all uf2
179179
180180
IAR Support
181-
^^^^^^^^^^^
181+
-----------
182+
183+
Use project connection
184+
^^^^^^^^^^^^^^^^^^^^^^
182185

183186
IAR Project Connection files are provided to import TinyUSB stack into your project.
184187

@@ -191,19 +194,19 @@ IAR Project Connection files are provided to import TinyUSB stack into your proj
191194

192195
- `STM32L0xx_HAL_Driver` is only needed to run examples, TinyUSB stack itself doesn't rely on MCU's SDKs.
193196

194-
* Open `Tools -> Configure Custom Argument Variables` (Switch to `Global` tab if you want to do it for all your projects)
197+
* Open ``Tools -> Configure Custom Argument Variables`` (Switch to `Global` tab if you want to do it for all your projects)
195198
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,
196199
for example `C:\\tinyusb`
197200

198201
Import stack only
199202
~~~~~~~~~~~~~~~~~
200203

201-
1. Open `Project -> Add project Connection ...`, click `OK`, choose `tinyusb\\tools\\iar_template.ipcf`.
204+
1. Open ``Project -> Add project Connection ...``, click `OK`, choose `tinyusb\\tools\\iar_template.ipcf`.
202205

203206
Run examples
204207
~~~~~~~~~~~~
205208

206-
1. (Python3 is needed) Run `iar_gen.py` to generate .ipcf files of examples:
209+
1. (Python3 is needed) Run ``iar_gen.py`` to generate .ipcf files of examples:
207210

208211
.. code-block::
209212
@@ -212,3 +215,15 @@ Run examples
212215
213216
2. Open `Project -> Add project Connection ...`, click `OK`, choose `tinyusb\\examples\\(.ipcf of example)`.
214217
For example `C:\\tinyusb\\examples\\device\\cdc_msc\\iar_cdc_msc.ipcf`
218+
219+
Native CMake support (9.50.1+)
220+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
221+
222+
With 9.50.1 release, IAR added experimental native CMake support (strangely not mentioned in public release note). Now it's possible to import CMakeLists.txt then build and debug as a normal project.
223+
224+
Following these steps:
225+
226+
1. Add IAR compiler binary path to system ``PATH`` environment variable, such as ``C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm\bin``.
227+
2. Create new project in IAR, in Tool chain dropdown menu, choose CMake for Arm then Import ``CMakeLists.txt`` from chosen example directory.
228+
3. Set up board option in ``Option - CMake/CMSIS-TOOLBOX - CMake``, for example :code:`-DBOARD=stm32f439nucleo -DTOOLCHAIN=iar`, **Uncheck 'Override tools in env'**.
229+
4. (For debug only) Choose correct CPU model in ``Option - General Options - Target``, to profit register and memory view.

0 commit comments

Comments
 (0)