mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-25 10:43:44 +00:00
Update IAR template.
This commit is contained in:
parent
56c6d2feab
commit
b35621fc63
@ -1,8 +1,11 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import xml.dom.minidom as XML
|
||||
import glob
|
||||
|
||||
def Main():
|
||||
# Read base configuration
|
||||
base = ""
|
||||
with open("iar_template.ipcf") as f:
|
||||
@ -49,3 +52,33 @@ for dir_2 in dir_1:
|
||||
#print(cfg_str)
|
||||
with open("../examples/{0}/{1}/iar_{1}.ipcf".format(dir_2, example), 'w') as f:
|
||||
f.write(cfg_str)
|
||||
|
||||
def ListPath(path, blacklist=[]):
|
||||
# Get all .c files
|
||||
files = glob.glob(f'../{path}/**/*.c', recursive=True)
|
||||
# Filter
|
||||
files = [x for x in files if all(y not in x for y in blacklist)]
|
||||
# Get common dir list
|
||||
dirs = []
|
||||
for file in files:
|
||||
dir = os.path.dirname(file)
|
||||
if dir not in dirs:
|
||||
dirs.append(dir)
|
||||
# Print .c groupped by dir
|
||||
for dir in dirs:
|
||||
print('<group name="' + dir.replace('../', '').replace('\\','/') + '">')
|
||||
for file in files:
|
||||
if os.path.dirname(file) == dir:
|
||||
print(' <path>$TUSB_DIR$/' + file.replace('../','').replace('\\','/')+'</path>')
|
||||
print('</group>')
|
||||
|
||||
def List():
|
||||
ListPath('src', [ 'template.c', 'dcd_synopsys.c', 'dcd_esp32sx.c' ])
|
||||
ListPath('lib/SEGGER_RTT')
|
||||
|
||||
if __name__ == "__main__":
|
||||
if (len(sys.argv) > 1):
|
||||
if (sys.argv[1] == 'l'):
|
||||
List()
|
||||
else:
|
||||
Main()
|
||||
|
@ -4,15 +4,12 @@
|
||||
<includePath>
|
||||
<path>$TUSB_DIR$/src</path>
|
||||
<path>$TUSB_DIR$/lib/SEGGER_RTT/RTT</path>
|
||||
<path>$TUSB_DIR$/lib/SEGGER_RTT/Config</path>
|
||||
<path>$PROJ_DIR$</path>
|
||||
</includePath>
|
||||
<files>
|
||||
<group name="src/device">
|
||||
<path>$TUSB_DIR$/src/device/usbd.c</path>
|
||||
<path>$TUSB_DIR$/src/device/usbd_control.c</path>
|
||||
</group>
|
||||
<group name="src/common">
|
||||
<path>$TUSB_DIR$/src/common/tusb_fifo.c</path>
|
||||
<group name="src">
|
||||
<path>$TUSB_DIR$/src/tusb.c</path>
|
||||
</group>
|
||||
<group name="src/class/audio">
|
||||
<path>$TUSB_DIR$/src/class/audio/audio_device.c</path>
|
||||
@ -51,36 +48,49 @@
|
||||
<path>$TUSB_DIR$/src/class/vendor/vendor_device.c</path>
|
||||
<path>$TUSB_DIR$/src/class/vendor/vendor_host.c</path>
|
||||
</group>
|
||||
<group name="src">
|
||||
<path>$TUSB_DIR$/src/tusb.c</path>
|
||||
<group name="src/class/video">
|
||||
<path>$TUSB_DIR$/src/class/video/video_device.c</path>
|
||||
</group>
|
||||
<group name="src/common">
|
||||
<path>$TUSB_DIR$/src/common/tusb_fifo.c</path>
|
||||
</group>
|
||||
<group name="src/device">
|
||||
<path>$TUSB_DIR$/src/device/usbd.c</path>
|
||||
<path>$TUSB_DIR$/src/device/usbd_control.c</path>
|
||||
</group>
|
||||
<group name="src/host">
|
||||
<path>$TUSB_DIR$/src/host/hub.c</path>
|
||||
<path>$TUSB_DIR$/src/host/usbh.c</path>
|
||||
</group>
|
||||
<group name="src/portable/analog/max3421">
|
||||
<path>$TUSB_DIR$/src/portable/analog/max3421/hcd_max3421.c</path>
|
||||
</group>
|
||||
<group name="src/portable/bridgetek/ft9xx">
|
||||
<path>$TUSB_DIR$/src/portable/bridgetek/ft9xx/dcd_ft9xx.c</path>
|
||||
</group>
|
||||
<group name="src/portable/chipidea/ci_fs">
|
||||
<path>$TUSB_DIR$/src/portable/chipidea/ci_fs/dcd_ci_fs.c</path>
|
||||
</group>
|
||||
<group name="src/portable/chipidea/ci_hs">
|
||||
<path>$TUSB_DIR$/src/portable/chipidea/ci_hs/dcd_ci_hs.c</path>
|
||||
<path>$TUSB_DIR$/src/portable/chipidea/ci_hs/hcd_ci_hs.c</path>
|
||||
</group>
|
||||
<group name="src/portable/synopsys/dwc2">
|
||||
<path>$TUSB_DIR$/src/portable/synopsys/dwc2/dcd_dwc2.c</path>
|
||||
</group>
|
||||
<group name="src/portable/dialog/da146xx">
|
||||
<path>$TUSB_DIR$/src/portable/dialog/da146xx/dcd_da146xx.c</path>
|
||||
</group>
|
||||
<group name="src/portable/ehci">
|
||||
<path>$TUSB_DIR$/src/portable/ehci/ehci.c</path>
|
||||
</group>
|
||||
<group name="src/portable/espressif/esp32sx">
|
||||
<path>$TUSB_DIR$/src/portable/espressif/esp32sx/dcd_esp32sx.c</path>
|
||||
</group>
|
||||
<group name="src/portable/mentor/musb">
|
||||
<path>$TUSB_DIR$/src/portable/mentor/musb/dcd_musb.c</path>
|
||||
<path>$TUSB_DIR$/src/portable/mentor/musb/hcd_musb.c</path>
|
||||
</group>
|
||||
<group name="src/portable/microchip/pic">
|
||||
<path>$TUSB_DIR$/src/portable/microchip/pic/dcd_pic.c</path>
|
||||
</group>
|
||||
<group name="src/portable/microchip/pic32mz">
|
||||
<path>$TUSB_DIR$/src/portable/microchip/pic32mz/dcd_pic32mz.c</path>
|
||||
</group>
|
||||
<group name="src/portable/microchip/samd">
|
||||
<path>$TUSB_DIR$/src/portable/microchip/samd/dcd_samd.c</path>
|
||||
</group>
|
||||
@ -90,12 +100,6 @@
|
||||
<group name="src/portable/microchip/samx7x">
|
||||
<path>$TUSB_DIR$/src/portable/microchip/samx7x/dcd_samx7x.c</path>
|
||||
</group>
|
||||
<group name="src/portable/microchip/pic">
|
||||
<path>$TUSB_DIR$/src/portable/microchip/pic/dcd_pic.c</path>
|
||||
</group>
|
||||
<group name="src/portable/microchip/pic32mz">
|
||||
<path>$TUSB_DIR$/src/portable/microchip/pic32mz/dcd_pic32mz.c</path>
|
||||
</group>
|
||||
<group name="src/portable/mindmotion/mm32">
|
||||
<path>$TUSB_DIR$/src/portable/mindmotion/mm32/dcd_mm32f327x_otg.c</path>
|
||||
</group>
|
||||
@ -122,10 +126,6 @@
|
||||
<group name="src/portable/nxp/lpc_ip3511">
|
||||
<path>$TUSB_DIR$/src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c</path>
|
||||
</group>
|
||||
<group name="src/portable/nxp/transdimension">
|
||||
<path>$TUSB_DIR$/src/portable/nxp/transdimension/dcd_transdimension.c</path>
|
||||
<path>$TUSB_DIR$/src/portable/nxp/transdimension/hcd_transdimension.c</path>
|
||||
</group>
|
||||
<group name="src/portable/ohci">
|
||||
<path>$TUSB_DIR$/src/portable/ohci/ohci.c</path>
|
||||
</group>
|
||||
@ -136,10 +136,12 @@
|
||||
<group name="src/portable/raspberrypi/rp2040">
|
||||
<path>$TUSB_DIR$/src/portable/raspberrypi/rp2040/dcd_rp2040.c</path>
|
||||
<path>$TUSB_DIR$/src/portable/raspberrypi/rp2040/hcd_rp2040.c</path>
|
||||
<path>$TUSB_DIR$/src/portable/raspberrypi/rp2040/rp2040_usb.c</path>
|
||||
</group>
|
||||
<group name="src/portable/renesas/rusb2">
|
||||
<path>$TUSB_DIR$/src/portable/renesas/rusb2/dcd_rusb2.c</path>
|
||||
<path>$TUSB_DIR$/src/portable/renesas/rusb2/hcd_rusb2.c</path>
|
||||
<path>$TUSB_DIR$/src/portable/renesas/rusb2/rusb2_common.c</path>
|
||||
</group>
|
||||
<group name="src/portable/sony/cxd56">
|
||||
<path>$TUSB_DIR$/src/portable/sony/cxd56/dcd_cxd56.c</path>
|
||||
@ -147,9 +149,15 @@
|
||||
<group name="src/portable/st/stm32_fsdev">
|
||||
<path>$TUSB_DIR$/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c</path>
|
||||
</group>
|
||||
<group name="src/portable/st/typec">
|
||||
<path>$TUSB_DIR$/src/portable/st/typec/typec_stm32.c</path>
|
||||
</group>
|
||||
<group name="src/portable/sunxi">
|
||||
<path>$TUSB_DIR$/src/portable/sunxi/dcd_sunxi_musb.c</path>
|
||||
</group>
|
||||
<group name="src/portable/synopsys/dwc2">
|
||||
<path>$TUSB_DIR$/src/portable/synopsys/dwc2/dcd_dwc2.c</path>
|
||||
</group>
|
||||
<group name="src/portable/ti/msp430x5xx">
|
||||
<path>$TUSB_DIR$/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c</path>
|
||||
</group>
|
||||
@ -159,10 +167,12 @@
|
||||
<group name="src/portable/wch/ch32v307">
|
||||
<path>$TUSB_DIR$/src/portable/wch/ch32v307/dcd_usbhs.c</path>
|
||||
</group>
|
||||
<group name="lib/SEGGER_RTT">
|
||||
<group name="src/typec">
|
||||
<path>$TUSB_DIR$/src/typec/usbc.c</path>
|
||||
</group>
|
||||
<group name="lib/SEGGER_RTT/RTT">
|
||||
<path>$TUSB_DIR$/lib/SEGGER_RTT/RTT/SEGGER_RTT.c</path>
|
||||
<path>$TUSB_DIR$/lib/SEGGER_RTT/RTT/SEGGER_RTT_printf.c</path>
|
||||
<path>$TUSB_DIR$/lib/SEGGER_RTT/Syscalls/SEGGER_RTT_Syscalls_IAR.c</path>
|
||||
</group>
|
||||
</files>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user