IAR template project for tinyusb
An IAR template project to build TinyUSB examples.
TUSB_DIR
configuration variable in IAR.
Tools -> Configure Custom Argument Variables
, switch to Global
tabNew Group …
, name it to TUSB
Add Variable …
, name it to TUSB_DIR
, change it’s value to the path of your TinyUSB stack, for example C:\tinyusb
In workspace, choose configuration according to the board, eg.TUSB_STM32F723E-DISCO
.
In workspace, uncheck Exclude from build
of the example in interest, eg.cdc_dual_ports
Ensure it's checked for other projects.
In Project Option -> C/C++ Compiler -> Preprocessor
, ensure example path is listed in include, eg.$TUSB_DIR$\examples\device\cdc_dual_ports\src
, Also ensure other examples' path are NOT included, eg. NO $TUSB_DIR$\examples\device\uac2_headset\src
.
build project and profit.