diff --git a/.obsidian/app.json b/.obsidian/app.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/.obsidian/app.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.obsidian/appearance.json b/.obsidian/appearance.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/.obsidian/appearance.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json new file mode 100644 index 00000000..b977c255 --- /dev/null +++ b/.obsidian/core-plugins.json @@ -0,0 +1,31 @@ +{ + "file-explorer": true, + "global-search": true, + "switcher": true, + "graph": true, + "backlink": true, + "canvas": true, + "outgoing-link": true, + "tag-pane": true, + "properties": false, + "page-preview": true, + "daily-notes": true, + "templates": true, + "note-composer": true, + "command-palette": true, + "slash-command": false, + "editor-status": true, + "bookmarks": true, + "markdown-importer": false, + "zk-prefixer": false, + "random-note": false, + "outline": true, + "word-count": true, + "slides": false, + "audio-recorder": false, + "workspaces": false, + "file-recovery": true, + "publish": false, + "sync": true, + "webviewer": false +} \ No newline at end of file diff --git a/.obsidian/graph.json b/.obsidian/graph.json new file mode 100644 index 00000000..e21a18dc --- /dev/null +++ b/.obsidian/graph.json @@ -0,0 +1,22 @@ +{ + "collapse-filter": true, + "search": "", + "showTags": false, + "showAttachments": false, + "hideUnresolved": false, + "showOrphans": true, + "collapse-color-groups": true, + "colorGroups": [], + "collapse-display": true, + "showArrow": false, + "textFadeMultiplier": 0, + "nodeSizeMultiplier": 1, + "lineSizeMultiplier": 1, + "collapse-forces": true, + "centerStrength": 0.518713248970312, + "repelStrength": 10, + "linkStrength": 1, + "linkDistance": 250, + "scale": 1, + "close": false +} \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json new file mode 100644 index 00000000..899f58c1 --- /dev/null +++ b/.obsidian/workspace.json @@ -0,0 +1,175 @@ +{ + "main": { + "id": "469034f7e9b5fb3b", + "type": "split", + "children": [ + { + "id": "8e99f7b5372abfbb", + "type": "tabs", + "children": [ + { + "id": "ba28e77977832bda", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "firmware/components/mainboard/README.md", + "mode": "source", + "source": false + }, + "icon": "lucide-file", + "title": "README" + } + } + ] + } + ], + "direction": "vertical" + }, + "left": { + "id": "ee3e9cd73bfd4e67", + "type": "split", + "children": [ + { + "id": "866588de05537010", + "type": "tabs", + "children": [ + { + "id": "6e0b1f0e736aa473", + "type": "leaf", + "state": { + "type": "file-explorer", + "state": { + "sortOrder": "alphabetical", + "autoReveal": false + }, + "icon": "lucide-folder-closed", + "title": "Files" + } + }, + { + "id": "380606aba917ae27", + "type": "leaf", + "state": { + "type": "search", + "state": { + "query": "", + "matchingCase": false, + "explainSearch": false, + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical" + }, + "icon": "lucide-search", + "title": "Search" + } + }, + { + "id": "90e76482bb16cc8e", + "type": "leaf", + "state": { + "type": "bookmarks", + "state": {}, + "icon": "lucide-bookmark", + "title": "Bookmarks" + } + } + ] + } + ], + "direction": "horizontal", + "width": 300 + }, + "right": { + "id": "53f5c09c52c4d751", + "type": "split", + "children": [ + { + "id": "c3079a730d631ea3", + "type": "tabs", + "children": [ + { + "id": "0e64e3236d7f1370", + "type": "leaf", + "state": { + "type": "backlink", + "state": { + "file": "firmware/components/mainboard/README.md", + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical", + "showSearch": false, + "searchQuery": "", + "backlinkCollapsed": false, + "unlinkedCollapsed": true + }, + "icon": "links-coming-in", + "title": "Backlinks for README" + } + }, + { + "id": "9e6f7140a09c1bc7", + "type": "leaf", + "state": { + "type": "outgoing-link", + "state": { + "file": "firmware/components/mainboard/README.md", + "linksCollapsed": false, + "unlinkedCollapsed": true + }, + "icon": "links-going-out", + "title": "Outgoing links from README" + } + }, + { + "id": "0167222091d8db4d", + "type": "leaf", + "state": { + "type": "tag", + "state": { + "sortOrder": "frequency", + "useHierarchy": true, + "showSearch": false, + "searchQuery": "" + }, + "icon": "lucide-tags", + "title": "Tags" + } + }, + { + "id": "37866ffcbb8ebcff", + "type": "leaf", + "state": { + "type": "outline", + "state": { + "file": "firmware/components/mainboard/README.md", + "followCursor": false, + "showSearch": false, + "searchQuery": "" + }, + "icon": "lucide-list", + "title": "Outline of README" + } + } + ] + } + ], + "direction": "horizontal", + "width": 300, + "collapsed": true + }, + "left-ribbon": { + "hiddenItems": { + "switcher:Open quick switcher": false, + "graph:Open graph view": false, + "canvas:Create new canvas": false, + "daily-notes:Open today's daily note": false, + "templates:Insert template": false, + "command-palette:Open command palette": false + } + }, + "active": "ba28e77977832bda", + "lastOpenFiles": [ + "docs/Software Documentation.md" + ] +} \ No newline at end of file diff --git a/README.md b/README.md index f44e34e1..0f7337b8 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,4 @@ docs: BOM, build instructions, and documentation for functions if necessary firmware: Code for the microcontrollers or modules -hardware: KiCad/EasyEDA files for the PCB \ No newline at end of file +hardware: KiCad/EasyEDA files for the PCBMainboard for the keyboard. diff --git a/firmware/components/CAN/MainCAN/.gitignore b/firmware/components/CAN/MainCAN/.gitignore deleted file mode 100644 index 89cc49cb..00000000 --- a/firmware/components/CAN/MainCAN/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.pio -.vscode/.browse.c_cpp.db* -.vscode/c_cpp_properties.json -.vscode/launch.json -.vscode/ipch diff --git a/firmware/components/CAN/MainCAN/platformio.ini b/firmware/components/CAN/MainCAN/platformio.ini deleted file mode 100644 index e90ce8b7..00000000 --- a/firmware/components/CAN/MainCAN/platformio.ini +++ /dev/null @@ -1,11 +0,0 @@ -[env:bluepill_F103C8] -platform = ststm32 -board = genericSTM32F103C8 -framework = stm32cube -upload_protocol = stlink -upload_flags = -c CPUTAPID 0x2ba01477 -build_src_filter = +<*> . -build_flags = - -Isrc/Core/Inc - -Isrc/USB_DEVICE/App - -Isrc/USB_DEVICE/Target \ No newline at end of file diff --git a/firmware/components/CAN/MainCAN/src/.mxproject b/firmware/components/CAN/MainCAN/src/.mxproject deleted file mode 100644 index 6427bf02..00000000 --- a/firmware/components/CAN/MainCAN/src/.mxproject +++ /dev/null @@ -1,37 +0,0 @@ -[PreviousLibFiles] -LibFiles=Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h;Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_can.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_can.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pcd_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_usb.h;Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_bus.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_system.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_utils.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_exti.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_can.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h;Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h;Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xb.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h;Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/tz_context.h; - -[PreviousUsedIarFiles] -SourceFiles=../Core/Src/main.c;../USB_DEVICE/App/usb_device.c;../USB_DEVICE/Target/usbd_conf.c;../USB_DEVICE/App/usbd_desc.c;../USB_DEVICE/App/usbd_cdc_if.c;../Core/Src/stm32f1xx_it.c;../Core/Src/stm32f1xx_hal_msp.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_can.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;../Core/Src/system_stm32f1xx.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_can.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;../Core/Src/system_stm32f1xx.c;;;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c; -HeaderPath=/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Inc;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Inc;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Device/ST/STM32F1xx/Include;/home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/CMSIS/Include;../USB_DEVICE/App;../USB_DEVICE/Target;../Core/Inc; -CDefines=USE_HAL_DRIVER;STM32F103xB;USE_HAL_DRIVER;USE_HAL_DRIVER; - -[PreviousGenFiles] -AdvancedFolderStructure=true -HeaderFileListSize=7 -HeaderFiles#0=../USB_DEVICE/App/usb_device.h -HeaderFiles#1=../USB_DEVICE/Target/usbd_conf.h -HeaderFiles#2=../USB_DEVICE/App/usbd_desc.h -HeaderFiles#3=../USB_DEVICE/App/usbd_cdc_if.h -HeaderFiles#4=../Core/Inc/stm32f1xx_it.h -HeaderFiles#5=../Core/Inc/stm32f1xx_hal_conf.h -HeaderFiles#6=../Core/Inc/main.h -HeaderFolderListSize=3 -HeaderPath#0=../USB_DEVICE/App -HeaderPath#1=../USB_DEVICE/Target -HeaderPath#2=../Core/Inc -HeaderFiles=; -SourceFileListSize=7 -SourceFiles#0=../USB_DEVICE/App/usb_device.c -SourceFiles#1=../USB_DEVICE/Target/usbd_conf.c -SourceFiles#2=../USB_DEVICE/App/usbd_desc.c -SourceFiles#3=../USB_DEVICE/App/usbd_cdc_if.c -SourceFiles#4=../Core/Src/stm32f1xx_it.c -SourceFiles#5=../Core/Src/stm32f1xx_hal_msp.c -SourceFiles#6=../Core/Src/main.c -SourceFolderListSize=3 -SourcePath#0=../USB_DEVICE/App -SourcePath#1=../USB_DEVICE/Target -SourcePath#2=../Core/Src -SourceFiles=; - diff --git a/firmware/components/CAN/MainCAN/src/Core/Src/main.c b/firmware/components/CAN/MainCAN/src/Core/Src/main.c deleted file mode 100644 index a8dbc212..00000000 --- a/firmware/components/CAN/MainCAN/src/Core/Src/main.c +++ /dev/null @@ -1,154 +0,0 @@ -#include "main.h" -#include "usb_device.h" - -CAN_HandleTypeDef hcan; - -void SystemClock_Config(void); -static void MX_GPIO_Init(void); - -int main(void) -{ - - HAL_Init(); - SystemClock_Config(); - MX_GPIO_Init(); - MX_CAN_Init(); - MX_USB_DEVICE_Init(); - - while (1) - { - uint8_t buf[] = "USB Serial Test!"; - HAL_Delay(1000); - HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13); - } - -} - -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; - - /** Initializes the RCC Oscillators according to the specified parameters - * in the RCC_OscInitTypeDef structure. - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; - RCC_OscInitStruct.HSEState = RCC_HSE_ON; - RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; - RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - Error_Handler(); - } - - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK - |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) - { - Error_Handler(); - } - PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB; - PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL; - if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) - { - Error_Handler(); - } -} - -/** - * @brief CAN Initialization Function - * @param None - * @retval None - */ -static void MX_CAN_Init(void) -{ - - /* USER CODE BEGIN CAN_Init 0 */ - - /* USER CODE END CAN_Init 0 */ - - /* USER CODE BEGIN CAN_Init 1 */ - - /* USER CODE END CAN_Init 1 */ - hcan.Instance = CAN1; - hcan.Init.Prescaler = 15; - hcan.Init.Mode = CAN_MODE_NORMAL; - hcan.Init.SyncJumpWidth = CAN_SJW_1TQ; - hcan.Init.TimeSeg1 = CAN_BS1_1TQ; - hcan.Init.TimeSeg2 = CAN_BS2_1TQ; - hcan.Init.TimeTriggeredMode = DISABLE; - hcan.Init.AutoBusOff = DISABLE; - hcan.Init.AutoWakeUp = DISABLE; - hcan.Init.AutoRetransmission = DISABLE; - hcan.Init.ReceiveFifoLocked = DISABLE; - hcan.Init.TransmitFifoPriority = DISABLE; - if (HAL_CAN_Init(&hcan) != HAL_OK) - { - Error_Handler(); - } - /* USER CODE BEGIN CAN_Init 2 */ - - /* USER CODE END CAN_Init 2 */ - -} - -/** - * @brief GPIO Initialization Function - * @param None - * @retval None - */ -static void MX_GPIO_Init(void) -{ - GPIO_InitTypeDef GPIO_InitStruct = {0}; -/* USER CODE BEGIN MX_GPIO_Init_1 */ -/* USER CODE END MX_GPIO_Init_1 */ - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOC_CLK_ENABLE(); - __HAL_RCC_GPIOD_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET); - - /*Configure GPIO pin : PC13 */ - GPIO_InitStruct.Pin = GPIO_PIN_13; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - -/* USER CODE BEGIN MX_GPIO_Init_2 */ -/* USER CODE END MX_GPIO_Init_2 */ -} - -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -void Error_Handler(void) -{ - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - __disable_irq(); - while (1) - { - } - /* USER CODE END Error_Handler_Debug */ -} diff --git a/firmware/components/CAN/MainCAN/src/Core/Src/stm32f1xx_hal_msp.c b/firmware/components/CAN/MainCAN/src/Core/Src/stm32f1xx_hal_msp.c deleted file mode 100644 index 310e2cb6..00000000 --- a/firmware/components/CAN/MainCAN/src/Core/Src/stm32f1xx_hal_msp.c +++ /dev/null @@ -1,172 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f1xx_hal_msp.c - * @brief This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - * @attention - * - * Copyright (c) 2025 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN Define */ - -/* USER CODE END Define */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN Macro */ - -/* USER CODE END Macro */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* External functions --------------------------------------------------------*/ -/* USER CODE BEGIN ExternalFunctions */ - -/* USER CODE END ExternalFunctions */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ -/** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_AFIO_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); - - /* System interrupt init*/ - - /** NOJTAG: JTAG-DP Disabled and SW-DP Enabled - */ - __HAL_AFIO_REMAP_SWJ_NOJTAG(); - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - -/** -* @brief CAN MSP Initialization -* This function configures the hardware resources used in this example -* @param hcan: CAN handle pointer -* @retval None -*/ -void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan) -{ - GPIO_InitTypeDef GPIO_InitStruct = {0}; - if(hcan->Instance==CAN1) - { - /* USER CODE BEGIN CAN1_MspInit 0 */ - - /* USER CODE END CAN1_MspInit 0 */ - /* Peripheral clock enable */ - __HAL_RCC_CAN1_CLK_ENABLE(); - - __HAL_RCC_GPIOB_CLK_ENABLE(); - /**CAN GPIO Configuration - PB8 ------> CAN_RX - PB9 ------> CAN_TX - */ - GPIO_InitStruct.Pin = GPIO_PIN_8; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); - - GPIO_InitStruct.Pin = GPIO_PIN_9; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; - HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); - - __HAL_AFIO_REMAP_CAN1_2(); - - /* CAN1 interrupt Init */ - HAL_NVIC_SetPriority(USB_LP_CAN1_RX0_IRQn, 0, 0); - HAL_NVIC_EnableIRQ(USB_LP_CAN1_RX0_IRQn); - HAL_NVIC_SetPriority(CAN1_RX1_IRQn, 0, 0); - HAL_NVIC_EnableIRQ(CAN1_RX1_IRQn); - /* USER CODE BEGIN CAN1_MspInit 1 */ - - /* USER CODE END CAN1_MspInit 1 */ - - } - -} - -/** -* @brief CAN MSP De-Initialization -* This function freeze the hardware resources used in this example -* @param hcan: CAN handle pointer -* @retval None -*/ -void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan) -{ - if(hcan->Instance==CAN1) - { - /* USER CODE BEGIN CAN1_MspDeInit 0 */ - - /* USER CODE END CAN1_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_CAN1_CLK_DISABLE(); - - /**CAN GPIO Configuration - PB8 ------> CAN_RX - PB9 ------> CAN_TX - */ - HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8|GPIO_PIN_9); - - /* CAN1 interrupt DeInit */ - /* USER CODE BEGIN CAN1:USB_LP_CAN1_RX0_IRQn disable */ - /** - * Uncomment the line below to disable the "USB_LP_CAN1_RX0_IRQn" interrupt - * Be aware, disabling shared interrupt may affect other IPs - */ - /* HAL_NVIC_DisableIRQ(USB_LP_CAN1_RX0_IRQn); */ - /* USER CODE END CAN1:USB_LP_CAN1_RX0_IRQn disable */ - - HAL_NVIC_DisableIRQ(CAN1_RX1_IRQn); - /* USER CODE BEGIN CAN1_MspDeInit 1 */ - - /* USER CODE END CAN1_MspDeInit 1 */ - } - -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ diff --git a/firmware/components/CAN/MainCAN/src/Core/Src/system_stm32f1xx.c b/firmware/components/CAN/MainCAN/src/Core/Src/system_stm32f1xx.c deleted file mode 100644 index 3afa78db..00000000 --- a/firmware/components/CAN/MainCAN/src/Core/Src/system_stm32f1xx.c +++ /dev/null @@ -1,406 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32f1xx.c - * @author MCD Application Team - * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. - * - * 1. This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier - * factors, AHB/APBx prescalers and Flash settings). - * This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32f1xx_xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * 2. After each device reset the HSI (8 MHz) is used as system clock source. - * Then SystemInit() function is called, in "startup_stm32f1xx_xx.s" file, to - * configure the system clock before to branch to main program. - * - * 4. The default value of HSE crystal is set to 8 MHz (or 25 MHz, depending on - * the product used), refer to "HSE_VALUE". - * When HSE is used as system clock source, directly or through PLL, and you - * are using different crystal you have to adapt the HSE value to your own - * configuration. - * - ****************************************************************************** - * @attention - * - * Copyright (c) 2017-2021 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f1xx_system - * @{ - */ - -/** @addtogroup STM32F1xx_System_Private_Includes - * @{ - */ - -#include "stm32f1xx.h" - -/** - * @} - */ - -/** @addtogroup STM32F1xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F1xx_System_Private_Defines - * @{ - */ - -#if !defined (HSE_VALUE) - #define HSE_VALUE 8000000U /*!< Default value of the External oscillator in Hz. - This value can be provided and adapted by the user application. */ -#endif /* HSE_VALUE */ - -#if !defined (HSI_VALUE) - #define HSI_VALUE 8000000U /*!< Default value of the Internal oscillator in Hz. - This value can be provided and adapted by the user application. */ -#endif /* HSI_VALUE */ - -/*!< Uncomment the following line if you need to use external SRAM */ -#if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) || defined(STM32F103xG) -/* #define DATA_IN_ExtSRAM */ -#endif /* STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */ - -/* Note: Following vector table addresses must be defined in line with linker - configuration. */ -/*!< Uncomment the following line if you need to relocate the vector table - anywhere in Flash or Sram, else the vector table is kept at the automatic - remap of boot address selected */ -/* #define USER_VECT_TAB_ADDRESS */ - -#if defined(USER_VECT_TAB_ADDRESS) -/*!< Uncomment the following line if you need to relocate your vector Table - in Sram else user remap will be done in Flash. */ -/* #define VECT_TAB_SRAM */ -#if defined(VECT_TAB_SRAM) -#define VECT_TAB_BASE_ADDRESS SRAM_BASE /*!< Vector Table base address field. - This value must be a multiple of 0x200. */ -#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. - This value must be a multiple of 0x200. */ -#else -#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field. - This value must be a multiple of 0x200. */ -#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table base offset field. - This value must be a multiple of 0x200. */ -#endif /* VECT_TAB_SRAM */ -#endif /* USER_VECT_TAB_ADDRESS */ - -/******************************************************************************/ - -/** - * @} - */ - -/** @addtogroup STM32F1xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F1xx_System_Private_Variables - * @{ - */ - - /* This variable is updated in three ways: - 1) by calling CMSIS function SystemCoreClockUpdate() - 2) by calling HAL API function HAL_RCC_GetHCLKFreq() - 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency - Note: If you use this function to configure the system clock; then there - is no need to call the 2 first functions listed above, since SystemCoreClock - variable is updated automatically. - */ -uint32_t SystemCoreClock = 8000000; -const uint8_t AHBPrescTable[16U] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; -const uint8_t APBPrescTable[8U] = {0, 0, 0, 0, 1, 2, 3, 4}; - -/** - * @} - */ - -/** @addtogroup STM32F1xx_System_Private_FunctionPrototypes - * @{ - */ - -#if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) || defined(STM32F103xG) -#ifdef DATA_IN_ExtSRAM - static void SystemInit_ExtMemCtl(void); -#endif /* DATA_IN_ExtSRAM */ -#endif /* STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */ - -/** - * @} - */ - -/** @addtogroup STM32F1xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system - * Initialize the Embedded Flash Interface, the PLL and update the - * SystemCoreClock variable. - * @note This function should be used only after reset. - * @param None - * @retval None - */ -void SystemInit (void) -{ -#if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) || defined(STM32F103xG) - #ifdef DATA_IN_ExtSRAM - SystemInit_ExtMemCtl(); - #endif /* DATA_IN_ExtSRAM */ -#endif - - /* Configure the Vector Table location -------------------------------------*/ -#if defined(USER_VECT_TAB_ADDRESS) - SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */ -#endif /* USER_VECT_TAB_ADDRESS */ -} - -/** - * @brief Update SystemCoreClock variable according to Clock Register Values. - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32f1xx.h file (default value - * 8 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32f1xx.h file (default value - * 8 MHz or 25 MHz, depending on the product used), user has to ensure - * that HSE_VALUE is same as the real frequency of the crystal used. - * Otherwise, this function may have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * @param None - * @retval None - */ -void SystemCoreClockUpdate (void) -{ - uint32_t tmp = 0U, pllmull = 0U, pllsource = 0U; - -#if defined(STM32F105xC) || defined(STM32F107xC) - uint32_t prediv1source = 0U, prediv1factor = 0U, prediv2factor = 0U, pll2mull = 0U; -#endif /* STM32F105xC */ - -#if defined(STM32F100xB) || defined(STM32F100xE) - uint32_t prediv1factor = 0U; -#endif /* STM32F100xB or STM32F100xE */ - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00U: /* HSI used as system clock */ - SystemCoreClock = HSI_VALUE; - break; - case 0x04U: /* HSE used as system clock */ - SystemCoreClock = HSE_VALUE; - break; - case 0x08U: /* PLL used as system clock */ - - /* Get PLL clock source and multiplication factor ----------------------*/ - pllmull = RCC->CFGR & RCC_CFGR_PLLMULL; - pllsource = RCC->CFGR & RCC_CFGR_PLLSRC; - -#if !defined(STM32F105xC) && !defined(STM32F107xC) - pllmull = ( pllmull >> 18U) + 2U; - - if (pllsource == 0x00U) - { - /* HSI oscillator clock divided by 2 selected as PLL clock entry */ - SystemCoreClock = (HSI_VALUE >> 1U) * pllmull; - } - else - { - #if defined(STM32F100xB) || defined(STM32F100xE) - prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1U; - /* HSE oscillator clock selected as PREDIV1 clock entry */ - SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull; - #else - /* HSE selected as PLL clock entry */ - if ((RCC->CFGR & RCC_CFGR_PLLXTPRE) != (uint32_t)RESET) - {/* HSE oscillator clock divided by 2 */ - SystemCoreClock = (HSE_VALUE >> 1U) * pllmull; - } - else - { - SystemCoreClock = HSE_VALUE * pllmull; - } - #endif - } -#else - pllmull = pllmull >> 18U; - - if (pllmull != 0x0DU) - { - pllmull += 2U; - } - else - { /* PLL multiplication factor = PLL input clock * 6.5 */ - pllmull = 13U / 2U; - } - - if (pllsource == 0x00U) - { - /* HSI oscillator clock divided by 2 selected as PLL clock entry */ - SystemCoreClock = (HSI_VALUE >> 1U) * pllmull; - } - else - {/* PREDIV1 selected as PLL clock entry */ - - /* Get PREDIV1 clock source and division factor */ - prediv1source = RCC->CFGR2 & RCC_CFGR2_PREDIV1SRC; - prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1U; - - if (prediv1source == 0U) - { - /* HSE oscillator clock selected as PREDIV1 clock entry */ - SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull; - } - else - {/* PLL2 clock selected as PREDIV1 clock entry */ - - /* Get PREDIV2 division factor and PLL2 multiplication factor */ - prediv2factor = ((RCC->CFGR2 & RCC_CFGR2_PREDIV2) >> 4U) + 1U; - pll2mull = ((RCC->CFGR2 & RCC_CFGR2_PLL2MUL) >> 8U) + 2U; - SystemCoreClock = (((HSE_VALUE / prediv2factor) * pll2mull) / prediv1factor) * pllmull; - } - } -#endif /* STM32F105xC */ - break; - - default: - SystemCoreClock = HSI_VALUE; - break; - } - - /* Compute HCLK clock frequency ----------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4U)]; - /* HCLK clock frequency */ - SystemCoreClock >>= tmp; -} - -#if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) || defined(STM32F103xG) -/** - * @brief Setup the external memory controller. Called in startup_stm32f1xx.s - * before jump to __main - * @param None - * @retval None - */ -#ifdef DATA_IN_ExtSRAM -/** - * @brief Setup the external memory controller. - * Called in startup_stm32f1xx_xx.s/.c before jump to main. - * This function configures the external SRAM mounted on STM3210E-EVAL - * board (STM32 High density devices). This SRAM will be used as program - * data memory (including heap and stack). - * @param None - * @retval None - */ -void SystemInit_ExtMemCtl(void) -{ - __IO uint32_t tmpreg; - /*!< FSMC Bank1 NOR/SRAM3 is used for the STM3210E-EVAL, if another Bank is - required, then adjust the Register Addresses */ - - /* Enable FSMC clock */ - RCC->AHBENR = 0x00000114U; - - /* Delay after an RCC peripheral clock enabling */ - tmpreg = READ_BIT(RCC->AHBENR, RCC_AHBENR_FSMCEN); - - /* Enable GPIOD, GPIOE, GPIOF and GPIOG clocks */ - RCC->APB2ENR = 0x000001E0U; - - /* Delay after an RCC peripheral clock enabling */ - tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_IOPDEN); - - (void)(tmpreg); - -/* --------------- SRAM Data lines, NOE and NWE configuration ---------------*/ -/*---------------- SRAM Address lines configuration -------------------------*/ -/*---------------- NOE and NWE configuration --------------------------------*/ -/*---------------- NE3 configuration ----------------------------------------*/ -/*---------------- NBL0, NBL1 configuration ---------------------------------*/ - - GPIOD->CRL = 0x44BB44BBU; - GPIOD->CRH = 0xBBBBBBBBU; - - GPIOE->CRL = 0xB44444BBU; - GPIOE->CRH = 0xBBBBBBBBU; - - GPIOF->CRL = 0x44BBBBBBU; - GPIOF->CRH = 0xBBBB4444U; - - GPIOG->CRL = 0x44BBBBBBU; - GPIOG->CRH = 0x444B4B44U; - -/*---------------- FSMC Configuration ---------------------------------------*/ -/*---------------- Enable FSMC Bank1_SRAM Bank ------------------------------*/ - - FSMC_Bank1->BTCR[4U] = 0x00001091U; - FSMC_Bank1->BTCR[5U] = 0x00110212U; -} -#endif /* DATA_IN_ExtSRAM */ -#endif /* STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ diff --git a/firmware/components/CAN/MainCAN/src/EWARM/MainCAN.ewd b/firmware/components/CAN/MainCAN/src/EWARM/MainCAN.ewd deleted file mode 100644 index 718a7a43..00000000 --- a/firmware/components/CAN/MainCAN/src/EWARM/MainCAN.ewd +++ /dev/null @@ -1,1485 +0,0 @@ - - - 3 - - MainCAN - - ARM - - 1 - - C-SPY - 2 - - 30 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ARMSIM_ID - 2 - - 1 - 1 - 1 - - - - - - - - CADI_ID - 2 - - 0 - 1 - 1 - - - - - - - - - CMSISDAP_ID - 2 - - 4 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GDBSERVER_ID - 2 - - 0 - 1 - 1 - - - - - - - - - - - IJET_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JLINK_ID - 2 - - 16 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LMIFTDI_ID - 2 - - 2 - 1 - 1 - - - - - - - - - - NULINK_ID - 2 - - 0 - 1 - 1 - - - - - - - PEMICRO_ID - 2 - - 3 - 1 - 1 - - - - - - - - STLINK_ID - 2 - - 6 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - THIRDPARTY_ID - 2 - - 0 - 1 - 1 - - - - - - - - TIFET_ID - 2 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - XDS100_ID - 2 - - 8 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8BE.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin - 0 - - - $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - diff --git a/firmware/components/CAN/MainCAN/src/EWARM/MainCAN.ewp b/firmware/components/CAN/MainCAN/src/EWARM/MainCAN.ewp deleted file mode 100644 index 04f8768c..00000000 --- a/firmware/components/CAN/MainCAN/src/EWARM/MainCAN.ewp +++ /dev/null @@ -1,1175 +0,0 @@ - - - 3 - - MainCAN - - ARM - - 1 - - General - 3 - - 31 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCARM - 2 - - 35 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AARM - 2 - - 10 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 1 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - - - - - - ILINK - 0 - - 22 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 0 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - Coder - 0 - - - - - Application - - EWARM - - $PROJ_DIR$/startup_stm32f103xb.s - - - - User - - Core - - $PROJ_DIR$/../Core/Src/main.c - - - $PROJ_DIR$/../Core/Src/stm32f1xx_it.c - - - $PROJ_DIR$/../Core/Src/stm32f1xx_hal_msp.c - - - - USB_DEVICE - - App - - $PROJ_DIR$/../USB_DEVICE/App/usb_device.c - - - $PROJ_DIR$/../USB_DEVICE/App/usbd_desc.c - - - $PROJ_DIR$/../USB_DEVICE/App/usbd_cdc_if.c - - - - Target - - $PROJ_DIR$/../USB_DEVICE/Target/usbd_conf.c - - - - - - - Drivers - - STM32F1xx_HAL_Driver - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_can.c - - - - CMSIS - - $PROJ_DIR$/../Core/Src/system_stm32f1xx.c - - - - - Middlewares - - USB_Device_Library - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c - - - /home/kymkim/STM32Cube/Repository/STM32Cube_FW_F1_V1.8.6/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c - - - - - diff --git a/firmware/components/CAN/MainCAN/src/EWARM/Project.eww b/firmware/components/CAN/MainCAN/src/EWARM/Project.eww deleted file mode 100644 index c44e2844..00000000 --- a/firmware/components/CAN/MainCAN/src/EWARM/Project.eww +++ /dev/null @@ -1,7 +0,0 @@ - - - - $WS_DIR$\MainCAN.ewp - - - diff --git a/firmware/components/CAN/MainCAN/src/EWARM/startup_stm32f103xb.s b/firmware/components/CAN/MainCAN/src/EWARM/startup_stm32f103xb.s deleted file mode 100644 index 91bccf1d..00000000 --- a/firmware/components/CAN/MainCAN/src/EWARM/startup_stm32f103xb.s +++ /dev/null @@ -1,390 +0,0 @@ -;******************** (C) COPYRIGHT 2017 STMicroelectronics ******************** -;* File Name : startup_stm32f103xb.s -;* Author : MCD Application Team -;* Description : STM32F103xB Performance Line Devices vector table for -;* EWARM toolchain. -;* This module performs: -;* - Set the initial SP -;* - Configure the clock system -;* - Set the initial PC == __iar_program_start, -;* - Set the vector table entries with the exceptions ISR -;* address. -;* After Reset the Cortex-M3 processor is in Thread mode, -;* priority is Privileged, and the Stack is set to Main. -;******************************************************************************** -;* -;* Copyright (c) 2017-2021 STMicroelectronics. -;* All rights reserved. -;* -;* This software is licensed under terms that can be found in the LICENSE file -;* in the root directory of this software component. -;* If no LICENSE file comes with this software, it is provided AS-IS. -; -;******************************************************************************* -; -; -; The modules in this file are included in the libraries, and may be replaced -; by any user-defined modules that define the PUBLIC symbol _program_start or -; a user defined start symbol. -; To override the cstartup defined in the library, simply add your modified -; version to the workbench project. -; -; The vector table is normally located at address 0. -; When debugging in RAM, it can be located in RAM, aligned to at least 2^6. -; The name "__vector_table" has special meaning for C-SPY: -; it is where the SP start value is found, and the NVIC vector -; table register (VTOR) is initialized to this address if != 0. -; -; Cortex-M version -; - - MODULE ?cstartup - - ;; Forward declaration of sections. - SECTION CSTACK:DATA:NOROOT(3) - - SECTION .intvec:CODE:NOROOT(2) - - EXTERN __iar_program_start - EXTERN SystemInit - PUBLIC __vector_table - - DATA -__vector_table - DCD sfe(CSTACK) - DCD Reset_Handler ; Reset Handler - DCD NMI_Handler ; NMI Handler - DCD HardFault_Handler ; Hard Fault Handler - DCD MemManage_Handler ; MPU Fault Handler - DCD BusFault_Handler ; Bus Fault Handler - DCD UsageFault_Handler ; Usage Fault Handler - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD SVC_Handler ; SVCall Handler - DCD DebugMon_Handler ; Debug Monitor Handler - DCD 0 ; Reserved - DCD PendSV_Handler ; PendSV Handler - DCD SysTick_Handler ; SysTick Handler - - ; External Interrupts - DCD WWDG_IRQHandler ; Window Watchdog - DCD PVD_IRQHandler ; PVD through EXTI Line detect - DCD TAMPER_IRQHandler ; Tamper - DCD RTC_IRQHandler ; RTC - DCD FLASH_IRQHandler ; Flash - DCD RCC_IRQHandler ; RCC - DCD EXTI0_IRQHandler ; EXTI Line 0 - DCD EXTI1_IRQHandler ; EXTI Line 1 - DCD EXTI2_IRQHandler ; EXTI Line 2 - DCD EXTI3_IRQHandler ; EXTI Line 3 - DCD EXTI4_IRQHandler ; EXTI Line 4 - DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 - DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2 - DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3 - DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4 - DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5 - DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6 - DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7 - DCD ADC1_2_IRQHandler ; ADC1 & ADC2 - DCD USB_HP_CAN1_TX_IRQHandler ; USB High Priority or CAN1 TX - DCD USB_LP_CAN1_RX0_IRQHandler ; USB Low Priority or CAN1 RX0 - DCD CAN1_RX1_IRQHandler ; CAN1 RX1 - DCD CAN1_SCE_IRQHandler ; CAN1 SCE - DCD EXTI9_5_IRQHandler ; EXTI Line 9..5 - DCD TIM1_BRK_IRQHandler ; TIM1 Break - DCD TIM1_UP_IRQHandler ; TIM1 Update - DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation - DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare - DCD TIM2_IRQHandler ; TIM2 - DCD TIM3_IRQHandler ; TIM3 - DCD TIM4_IRQHandler ; TIM4 - DCD I2C1_EV_IRQHandler ; I2C1 Event - DCD I2C1_ER_IRQHandler ; I2C1 Error - DCD I2C2_EV_IRQHandler ; I2C2 Event - DCD I2C2_ER_IRQHandler ; I2C2 Error - DCD SPI1_IRQHandler ; SPI1 - DCD SPI2_IRQHandler ; SPI2 - DCD USART1_IRQHandler ; USART1 - DCD USART2_IRQHandler ; USART2 - DCD USART3_IRQHandler ; USART3 - DCD EXTI15_10_IRQHandler ; EXTI Line 15..10 - DCD RTC_Alarm_IRQHandler ; RTC Alarm through EXTI Line - DCD USBWakeUp_IRQHandler ; USB Wakeup from suspend - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; Default interrupt handlers. -;; - THUMB - - PUBWEAK Reset_Handler - SECTION .text:CODE:REORDER:NOROOT(2) -Reset_Handler - LDR R0, =SystemInit - BLX R0 - LDR R0, =__iar_program_start - BX R0 - - PUBWEAK NMI_Handler - SECTION .text:CODE:REORDER:NOROOT(1) -NMI_Handler - B NMI_Handler - - PUBWEAK HardFault_Handler - SECTION .text:CODE:REORDER:NOROOT(1) -HardFault_Handler - B HardFault_Handler - - PUBWEAK MemManage_Handler - SECTION .text:CODE:REORDER:NOROOT(1) -MemManage_Handler - B MemManage_Handler - - PUBWEAK BusFault_Handler - SECTION .text:CODE:REORDER:NOROOT(1) -BusFault_Handler - B BusFault_Handler - - PUBWEAK UsageFault_Handler - SECTION .text:CODE:REORDER:NOROOT(1) -UsageFault_Handler - B UsageFault_Handler - - PUBWEAK SVC_Handler - SECTION .text:CODE:REORDER:NOROOT(1) -SVC_Handler - B SVC_Handler - - PUBWEAK DebugMon_Handler - SECTION .text:CODE:REORDER:NOROOT(1) -DebugMon_Handler - B DebugMon_Handler - - PUBWEAK PendSV_Handler - SECTION .text:CODE:REORDER:NOROOT(1) -PendSV_Handler - B PendSV_Handler - - PUBWEAK SysTick_Handler - SECTION .text:CODE:REORDER:NOROOT(1) -SysTick_Handler - B SysTick_Handler - - PUBWEAK WWDG_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -WWDG_IRQHandler - B WWDG_IRQHandler - - PUBWEAK PVD_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -PVD_IRQHandler - B PVD_IRQHandler - - PUBWEAK TAMPER_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -TAMPER_IRQHandler - B TAMPER_IRQHandler - - PUBWEAK RTC_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -RTC_IRQHandler - B RTC_IRQHandler - - PUBWEAK FLASH_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -FLASH_IRQHandler - B FLASH_IRQHandler - - PUBWEAK RCC_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -RCC_IRQHandler - B RCC_IRQHandler - - PUBWEAK EXTI0_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -EXTI0_IRQHandler - B EXTI0_IRQHandler - - PUBWEAK EXTI1_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -EXTI1_IRQHandler - B EXTI1_IRQHandler - - PUBWEAK EXTI2_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -EXTI2_IRQHandler - B EXTI2_IRQHandler - - PUBWEAK EXTI3_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -EXTI3_IRQHandler - B EXTI3_IRQHandler - - PUBWEAK EXTI4_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -EXTI4_IRQHandler - B EXTI4_IRQHandler - - PUBWEAK DMA1_Channel1_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -DMA1_Channel1_IRQHandler - B DMA1_Channel1_IRQHandler - - PUBWEAK DMA1_Channel2_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -DMA1_Channel2_IRQHandler - B DMA1_Channel2_IRQHandler - - PUBWEAK DMA1_Channel3_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -DMA1_Channel3_IRQHandler - B DMA1_Channel3_IRQHandler - - PUBWEAK DMA1_Channel4_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -DMA1_Channel4_IRQHandler - B DMA1_Channel4_IRQHandler - - PUBWEAK DMA1_Channel5_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -DMA1_Channel5_IRQHandler - B DMA1_Channel5_IRQHandler - - PUBWEAK DMA1_Channel6_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -DMA1_Channel6_IRQHandler - B DMA1_Channel6_IRQHandler - - PUBWEAK DMA1_Channel7_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -DMA1_Channel7_IRQHandler - B DMA1_Channel7_IRQHandler - - PUBWEAK ADC1_2_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -ADC1_2_IRQHandler - B ADC1_2_IRQHandler - - PUBWEAK USB_HP_CAN1_TX_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -USB_HP_CAN1_TX_IRQHandler - B USB_HP_CAN1_TX_IRQHandler - - PUBWEAK USB_LP_CAN1_RX0_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -USB_LP_CAN1_RX0_IRQHandler - B USB_LP_CAN1_RX0_IRQHandler - - PUBWEAK CAN1_RX1_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -CAN1_RX1_IRQHandler - B CAN1_RX1_IRQHandler - - PUBWEAK CAN1_SCE_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -CAN1_SCE_IRQHandler - B CAN1_SCE_IRQHandler - - PUBWEAK EXTI9_5_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -EXTI9_5_IRQHandler - B EXTI9_5_IRQHandler - - PUBWEAK TIM1_BRK_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -TIM1_BRK_IRQHandler - B TIM1_BRK_IRQHandler - - PUBWEAK TIM1_UP_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -TIM1_UP_IRQHandler - B TIM1_UP_IRQHandler - - PUBWEAK TIM1_TRG_COM_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -TIM1_TRG_COM_IRQHandler - B TIM1_TRG_COM_IRQHandler - - PUBWEAK TIM1_CC_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -TIM1_CC_IRQHandler - B TIM1_CC_IRQHandler - - PUBWEAK TIM2_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -TIM2_IRQHandler - B TIM2_IRQHandler - - PUBWEAK TIM3_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -TIM3_IRQHandler - B TIM3_IRQHandler - - PUBWEAK TIM4_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -TIM4_IRQHandler - B TIM4_IRQHandler - - PUBWEAK I2C1_EV_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -I2C1_EV_IRQHandler - B I2C1_EV_IRQHandler - - PUBWEAK I2C1_ER_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -I2C1_ER_IRQHandler - B I2C1_ER_IRQHandler - - PUBWEAK I2C2_EV_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -I2C2_EV_IRQHandler - B I2C2_EV_IRQHandler - - PUBWEAK I2C2_ER_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -I2C2_ER_IRQHandler - B I2C2_ER_IRQHandler - - PUBWEAK SPI1_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -SPI1_IRQHandler - B SPI1_IRQHandler - - PUBWEAK SPI2_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -SPI2_IRQHandler - B SPI2_IRQHandler - - PUBWEAK USART1_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -USART1_IRQHandler - B USART1_IRQHandler - - PUBWEAK USART2_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -USART2_IRQHandler - B USART2_IRQHandler - - PUBWEAK USART3_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -USART3_IRQHandler - B USART3_IRQHandler - - PUBWEAK EXTI15_10_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -EXTI15_10_IRQHandler - B EXTI15_10_IRQHandler - - PUBWEAK RTC_Alarm_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -RTC_Alarm_IRQHandler - B RTC_Alarm_IRQHandler - - PUBWEAK USBWakeUp_IRQHandler - SECTION .text:CODE:REORDER:NOROOT(1) -USBWakeUp_IRQHandler - B USBWakeUp_IRQHandler - - END diff --git a/firmware/components/CAN/MainCAN/src/EWARM/stm32f103xb_flash.icf b/firmware/components/CAN/MainCAN/src/EWARM/stm32f103xb_flash.icf deleted file mode 100644 index f8bebd43..00000000 --- a/firmware/components/CAN/MainCAN/src/EWARM/stm32f103xb_flash.icf +++ /dev/null @@ -1,31 +0,0 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x08000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ; -define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20000000; -define symbol __ICFEDIT_region_RAM_end__ = 0x20004FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 0x400; -define symbol __ICFEDIT_size_heap__ = 0x200; -/**** End of ICF editor section. ###ICF###*/ - - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; diff --git a/firmware/components/CAN/MainCAN/src/EWARM/stm32f103xb_sram.icf b/firmware/components/CAN/MainCAN/src/EWARM/stm32f103xb_sram.icf deleted file mode 100644 index a56da742..00000000 --- a/firmware/components/CAN/MainCAN/src/EWARM/stm32f103xb_sram.icf +++ /dev/null @@ -1,31 +0,0 @@ -/*###ICF### Section handled by ICF editor, don't touch! ****/ -/*-Editor annotation file-*/ -/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -/*-Specials-*/ -define symbol __ICFEDIT_intvec_start__ = 0x20000000; -/*-Memory Regions-*/ -define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ; -define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF; -define symbol __ICFEDIT_region_RAM_start__ = 0x20001400; -define symbol __ICFEDIT_region_RAM_end__ = 0x20004FFF; -/*-Sizes-*/ -define symbol __ICFEDIT_size_cstack__ = 0x400; -define symbol __ICFEDIT_size_heap__ = 0x200; -/**** End of ICF editor section. ###ICF###*/ - - -define memory mem with size = 4G; -define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__]; -define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__]; - -define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; -define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; - -initialize by copy { readwrite }; -do not initialize { section .noinit }; - -place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; - -place in ROM_region { readonly }; -place in RAM_region { readwrite, - block CSTACK, block HEAP }; diff --git a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_cdc_if.c b/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_cdc_if.c deleted file mode 100644 index c0f7fd17..00000000 --- a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_cdc_if.c +++ /dev/null @@ -1,303 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : usbd_cdc_if.c - * @version : v2.0_Cube - * @brief : Usb device for Virtual Com Port. - ****************************************************************************** - * @attention - * - * Copyright (c) 2025 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "usbd_cdc_if.h" - -/* USER CODE BEGIN INCLUDE */ - -/* USER CODE END INCLUDE */ - -/* Private typedef -----------------------------------------------------------*/ -/* Private define ------------------------------------------------------------*/ -/* Private macro -------------------------------------------------------------*/ - -/* USER CODE BEGIN PV */ -/* Private variables ---------------------------------------------------------*/ - -/* USER CODE END PV */ - -/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY - * @brief Usb device library. - * @{ - */ - -/** @addtogroup USBD_CDC_IF - * @{ - */ - -/** @defgroup USBD_CDC_IF_Private_TypesDefinitions USBD_CDC_IF_Private_TypesDefinitions - * @brief Private types. - * @{ - */ - -/* USER CODE BEGIN PRIVATE_TYPES */ - -/* USER CODE END PRIVATE_TYPES */ - -/** - * @} - */ - -/** @defgroup USBD_CDC_IF_Private_Defines USBD_CDC_IF_Private_Defines - * @brief Private defines. - * @{ - */ - -/* USER CODE BEGIN PRIVATE_DEFINES */ -/* USER CODE END PRIVATE_DEFINES */ - -/** - * @} - */ - -/** @defgroup USBD_CDC_IF_Private_Macros USBD_CDC_IF_Private_Macros - * @brief Private macros. - * @{ - */ - -/* USER CODE BEGIN PRIVATE_MACRO */ - -/* USER CODE END PRIVATE_MACRO */ - -/** - * @} - */ - -/** @defgroup USBD_CDC_IF_Private_Variables USBD_CDC_IF_Private_Variables - * @brief Private variables. - * @{ - */ -/* Create buffer for reception and transmission */ -/* It's up to user to redefine and/or remove those define */ -/** Received data over USB are stored in this buffer */ -uint8_t UserRxBufferFS[APP_RX_DATA_SIZE]; - -/** Data to send over USB CDC are stored in this buffer */ -uint8_t UserTxBufferFS[APP_TX_DATA_SIZE]; - -/* USER CODE BEGIN PRIVATE_VARIABLES */ - -/* USER CODE END PRIVATE_VARIABLES */ - -/** - * @} - */ - -/** @defgroup USBD_CDC_IF_Exported_Variables USBD_CDC_IF_Exported_Variables - * @brief Public variables. - * @{ - */ - -extern USBD_HandleTypeDef hUsbDeviceFS; - -/* USER CODE BEGIN EXPORTED_VARIABLES */ - -/* USER CODE END EXPORTED_VARIABLES */ - -/** - * @} - */ - -/** @defgroup USBD_CDC_IF_Private_FunctionPrototypes USBD_CDC_IF_Private_FunctionPrototypes - * @brief Private functions declaration. - * @{ - */ - -static int8_t CDC_Init_FS(void); -static int8_t CDC_DeInit_FS(void); -static int8_t CDC_Control_FS(uint8_t cmd, uint8_t* pbuf, uint16_t length); -static int8_t CDC_Receive_FS(uint8_t* pbuf, uint32_t *Len); - -/* USER CODE BEGIN PRIVATE_FUNCTIONS_DECLARATION */ - -/* USER CODE END PRIVATE_FUNCTIONS_DECLARATION */ - -/** - * @} - */ - -USBD_CDC_ItfTypeDef USBD_Interface_fops_FS = -{ - CDC_Init_FS, - CDC_DeInit_FS, - CDC_Control_FS, - CDC_Receive_FS -}; - -/* Private functions ---------------------------------------------------------*/ -/** - * @brief Initializes the CDC media low layer over the FS USB IP - * @retval USBD_OK if all operations are OK else USBD_FAIL - */ -static int8_t CDC_Init_FS(void) -{ - /* USER CODE BEGIN 3 */ - /* Set Application Buffers */ - USBD_CDC_SetTxBuffer(&hUsbDeviceFS, UserTxBufferFS, 0); - USBD_CDC_SetRxBuffer(&hUsbDeviceFS, UserRxBufferFS); - return (USBD_OK); - /* USER CODE END 3 */ -} - -/** - * @brief DeInitializes the CDC media low layer - * @retval USBD_OK if all operations are OK else USBD_FAIL - */ -static int8_t CDC_DeInit_FS(void) -{ - /* USER CODE BEGIN 4 */ - return (USBD_OK); - /* USER CODE END 4 */ -} - -/** - * @brief Manage the CDC class requests - * @param cmd: Command code - * @param pbuf: Buffer containing command data (request parameters) - * @param length: Number of data to be sent (in bytes) - * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL - */ -static int8_t CDC_Control_FS(uint8_t cmd, uint8_t* pbuf, uint16_t length) -{ - /* USER CODE BEGIN 5 */ - switch(cmd) - { - case CDC_SEND_ENCAPSULATED_COMMAND: - - break; - - case CDC_GET_ENCAPSULATED_RESPONSE: - - break; - - case CDC_SET_COMM_FEATURE: - - break; - - case CDC_GET_COMM_FEATURE: - - break; - - case CDC_CLEAR_COMM_FEATURE: - - break; - - /*******************************************************************************/ - /* Line Coding Structure */ - /*-----------------------------------------------------------------------------*/ - /* Offset | Field | Size | Value | Description */ - /* 0 | dwDTERate | 4 | Number |Data terminal rate, in bits per second*/ - /* 4 | bCharFormat | 1 | Number | Stop bits */ - /* 0 - 1 Stop bit */ - /* 1 - 1.5 Stop bits */ - /* 2 - 2 Stop bits */ - /* 5 | bParityType | 1 | Number | Parity */ - /* 0 - None */ - /* 1 - Odd */ - /* 2 - Even */ - /* 3 - Mark */ - /* 4 - Space */ - /* 6 | bDataBits | 1 | Number Data bits (5, 6, 7, 8 or 16). */ - /*******************************************************************************/ - case CDC_SET_LINE_CODING: - - break; - - case CDC_GET_LINE_CODING: - - break; - - case CDC_SET_CONTROL_LINE_STATE: - - break; - - case CDC_SEND_BREAK: - - break; - - default: - break; - } - - return (USBD_OK); - /* USER CODE END 5 */ -} - -/** - * @brief Data received over USB OUT endpoint are sent over CDC interface - * through this function. - * - * @note - * This function will issue a NAK packet on any OUT packet received on - * USB endpoint until exiting this function. If you exit this function - * before transfer is complete on CDC interface (ie. using DMA controller) - * it will result in receiving more data while previous ones are still - * not sent. - * - * @param Buf: Buffer of data to be received - * @param Len: Number of data received (in bytes) - * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL - */ -static int8_t CDC_Receive_FS(uint8_t* Buf, uint32_t *Len) -{ - /* USER CODE BEGIN 6 */ - USBD_CDC_SetRxBuffer(&hUsbDeviceFS, &Buf[0]); - USBD_CDC_ReceivePacket(&hUsbDeviceFS); - return (USBD_OK); - /* USER CODE END 6 */ -} - -/** - * @brief CDC_Transmit_FS - * Data to send over USB IN endpoint are sent over CDC interface - * through this function. - * @note - * - * - * @param Buf: Buffer of data to be sent - * @param Len: Number of data to be sent (in bytes) - * @retval USBD_OK if all operations are OK else USBD_FAIL or USBD_BUSY - */ -uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len) -{ - uint8_t result = USBD_OK; - /* USER CODE BEGIN 7 */ - USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef*)hUsbDeviceFS.pClassData; - if (hcdc->TxState != 0){ - return USBD_BUSY; - } - USBD_CDC_SetTxBuffer(&hUsbDeviceFS, Buf, Len); - result = USBD_CDC_TransmitPacket(&hUsbDeviceFS); - /* USER CODE END 7 */ - return result; -} - -/* USER CODE BEGIN PRIVATE_FUNCTIONS_IMPLEMENTATION */ - -/* USER CODE END PRIVATE_FUNCTIONS_IMPLEMENTATION */ - -/** - * @} - */ - -/** - * @} - */ diff --git a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_cdc_if.h b/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_cdc_if.h deleted file mode 100644 index ec9079a7..00000000 --- a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_cdc_if.h +++ /dev/null @@ -1,131 +0,0 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : usbd_cdc_if.h - * @version : v2.0_Cube - * @brief : Header for usbd_cdc_if.c file. - ****************************************************************************** - * @attention - * - * Copyright (c) 2025 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __USBD_CDC_IF_H__ -#define __USBD_CDC_IF_H__ - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "usbd_cdc.h" - -/* USER CODE BEGIN INCLUDE */ - -/* USER CODE END INCLUDE */ - -/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY - * @brief For Usb device. - * @{ - */ - -/** @defgroup USBD_CDC_IF USBD_CDC_IF - * @brief Usb VCP device module - * @{ - */ - -/** @defgroup USBD_CDC_IF_Exported_Defines USBD_CDC_IF_Exported_Defines - * @brief Defines. - * @{ - */ -/* Define size for the receive and transmit buffer over CDC */ -#define APP_RX_DATA_SIZE 1024 -#define APP_TX_DATA_SIZE 1024 -/* USER CODE BEGIN EXPORTED_DEFINES */ - -/* USER CODE END EXPORTED_DEFINES */ - -/** - * @} - */ - -/** @defgroup USBD_CDC_IF_Exported_Types USBD_CDC_IF_Exported_Types - * @brief Types. - * @{ - */ - -/* USER CODE BEGIN EXPORTED_TYPES */ - -/* USER CODE END EXPORTED_TYPES */ - -/** - * @} - */ - -/** @defgroup USBD_CDC_IF_Exported_Macros USBD_CDC_IF_Exported_Macros - * @brief Aliases. - * @{ - */ - -/* USER CODE BEGIN EXPORTED_MACRO */ - -/* USER CODE END EXPORTED_MACRO */ - -/** - * @} - */ - -/** @defgroup USBD_CDC_IF_Exported_Variables USBD_CDC_IF_Exported_Variables - * @brief Public variables. - * @{ - */ - -/** CDC Interface callback. */ -extern USBD_CDC_ItfTypeDef USBD_Interface_fops_FS; - -/* USER CODE BEGIN EXPORTED_VARIABLES */ - -/* USER CODE END EXPORTED_VARIABLES */ - -/** - * @} - */ - -/** @defgroup USBD_CDC_IF_Exported_FunctionsPrototype USBD_CDC_IF_Exported_FunctionsPrototype - * @brief Public functions declaration. - * @{ - */ - -uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len); - -/* USER CODE BEGIN EXPORTED_FUNCTIONS */ - -/* USER CODE END EXPORTED_FUNCTIONS */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __USBD_CDC_IF_H__ */ - diff --git a/firmware/mainboard/stmf405rgtx/mainboard-stmf405rgtx.ioc b/firmware/mainboard/stmf405rgtx/mainboard-stmf405rgtx.ioc new file mode 100644 index 00000000..a90ce81b --- /dev/null +++ b/firmware/mainboard/stmf405rgtx/mainboard-stmf405rgtx.ioc @@ -0,0 +1,88 @@ +#MicroXplorer Configuration settings - do not modify +CAD.formats= +CAD.pinconfig= +CAD.provider= +File.Version=6 +GPIO.groupedBy= +KeepUserPlacement=false +Mcu.CPN=STM32F405RGT6 +Mcu.Family=STM32F4 +Mcu.IP0=NVIC +Mcu.IP1=RCC +Mcu.IP2=SYS +Mcu.IPNb=3 +Mcu.Name=STM32F405RGTx +Mcu.Package=LQFP64 +Mcu.Pin0=VP_SYS_VS_Systick +Mcu.PinsNb=1 +Mcu.ThirdPartyNb=0 +Mcu.UserConstants= +Mcu.UserName=STM32F405RGTx +MxCube.Version=6.13.0 +MxDb.Version=DB.6.0.130 +NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.ForceEnableDMAVector=true +NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 +NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false +NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +PinOutPanel.RotationAngle=0 +ProjectManager.AskForMigrate=true +ProjectManager.BackupPrevious=false +ProjectManager.CompilerOptimize=6 +ProjectManager.ComputerToolchain=false +ProjectManager.CoupleFile=false +ProjectManager.CustomerFirmwarePackage= +ProjectManager.DefaultFWLocation=true +ProjectManager.DeletePrevious=true +ProjectManager.DeviceId=STM32F405RGTx +ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.28.2 +ProjectManager.FreePins=false +ProjectManager.HalAssertFull=false +ProjectManager.HeapSize=0x200 +ProjectManager.KeepUserCode=true +ProjectManager.LastFirmware=true +ProjectManager.LibraryCopy=0 +ProjectManager.MainLocation=Core/Src +ProjectManager.NoMain=false +ProjectManager.PreviousToolchain= +ProjectManager.ProjectBuild=false +ProjectManager.ProjectFileName=mainboard-stmf405rgtx.ioc +ProjectManager.ProjectName=mainboard-stmf405rgtx +ProjectManager.ProjectStructure= +ProjectManager.RegisterCallBack= +ProjectManager.StackSize=0x400 +ProjectManager.TargetToolchain=EWARM V8.50 +ProjectManager.ToolChainLocation= +ProjectManager.UAScriptAfterPath= +ProjectManager.UAScriptBeforePath= +ProjectManager.UnderRoot=false +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false +RCC.AHBFreq_Value=16000000 +RCC.APB1Freq_Value=16000000 +RCC.APB2Freq_Value=16000000 +RCC.CortexFreq_Value=16000000 +RCC.FamilyName=M +RCC.HSE_VALUE=25000000 +RCC.HSI_VALUE=16000000 +RCC.I2SClocksFreq_Value=96000000 +RCC.IPParameters=AHBFreq_Value,APB1Freq_Value,APB2Freq_Value,CortexFreq_Value,FamilyName,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSE_VALUE,LSI_VALUE,PLLCLKFreq_Value,PLLQCLKFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VcooutputI2S +RCC.LSE_VALUE=32768 +RCC.LSI_VALUE=32000 +RCC.PLLCLKFreq_Value=96000000 +RCC.PLLQCLKFreq_Value=48000000 +RCC.RTCFreq_Value=32000 +RCC.RTCHSEDivFreq_Value=12500000 +RCC.SYSCLKFreq_VALUE=16000000 +RCC.VCOI2SOutputFreq_Value=192000000 +RCC.VCOInputFreq_Value=1000000 +RCC.VCOOutputFreq_Value=192000000 +RCC.VcooutputI2S=96000000 +VP_SYS_VS_Systick.Mode=SysTick +VP_SYS_VS_Systick.Signal=SYS_VS_Systick +board=custom diff --git a/firmware/mainboard/stmf446retx/.gitignore b/firmware/mainboard/stmf446retx/.gitignore new file mode 100644 index 00000000..3b8da3a4 --- /dev/null +++ b/firmware/mainboard/stmf446retx/.gitignore @@ -0,0 +1,2 @@ +.pio +.vscode \ No newline at end of file diff --git a/firmware/mainboard/stmf446retx/.vscode/c_cpp_properties.json b/firmware/mainboard/stmf446retx/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..8faef710 --- /dev/null +++ b/firmware/mainboard/stmf446retx/.vscode/c_cpp_properties.json @@ -0,0 +1,210 @@ +// +// !!! WARNING !!! AUTO-GENERATED FILE! +// PLEASE DO NOT MODIFY IT AND USE "platformio.ini": +// https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags +// +{ + "configurations": [ + { + "name": "PlatformIO", + "includePath": [ + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", + "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/mainboard/stmf446retx/Src", + "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/mainboard/stmf446retx/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/Device/ST/STM32F4xx/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/STM32F4xx_HAL_Driver/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/STM32F4xx_HAL_Driver/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/DSP/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/Common", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ampire480272", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ampire640480", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/cs43l22", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/dp83848", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/exc7200", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ft3x67", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ft6x06", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/i3g4250d", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ili9325", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ili9341", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/l3gd20", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lan8742", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lis302dl", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lis3dsh", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ls016b8uy", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lsm303agr", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lsm303dlhc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/mfxstm32l152", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q128a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q256a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q512a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/nt35510", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/otm8009a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ov2640", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ov5640", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/s25fl512s", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/s5k5cag", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/st7735", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/st7789h2", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/stmpe1600", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/stmpe811", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ts3510", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/wm8994", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Adafruit_Shield", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/CPU", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/Fonts", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/Log", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Src", + "" + ], + "browse": { + "limitSymbolsToIncludedHeaders": true, + "path": [ + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", + "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/mainboard/stmf446retx/Src", + "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/mainboard/stmf446retx/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/Device/ST/STM32F4xx/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/STM32F4xx_HAL_Driver/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/STM32F4xx_HAL_Driver/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/DSP/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/Common", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ampire480272", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ampire640480", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/cs43l22", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/dp83848", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/exc7200", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ft3x67", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ft6x06", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/i3g4250d", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ili9325", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ili9341", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/l3gd20", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lan8742", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lis302dl", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lis3dsh", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ls016b8uy", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lsm303agr", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lsm303dlhc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/mfxstm32l152", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q128a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q256a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q512a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/nt35510", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/otm8009a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ov2640", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ov5640", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/s25fl512s", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/s5k5cag", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/st7735", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/st7789h2", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/stmpe1600", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/stmpe811", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ts3510", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/wm8994", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Adafruit_Shield", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/CPU", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/Fonts", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/Log", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Src", + "" + ] + }, + "defines": [ + "PLATFORMIO=60118", + "STM32F4", + "STM32F446xx", + "USE_HAL_DRIVER", + "F_CPU=180000000L", + "" + ], + "compilerPath": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc", + "compilerArgs": [ + "-mthumb", + "-mcpu=cortex-m4", + "" + ] + } + ], + "version": 4 +} diff --git a/firmware/components/CAN/MainCAN/.vscode/extensions.json b/firmware/mainboard/stmf446retx/.vscode/extensions.json similarity index 100% rename from firmware/components/CAN/MainCAN/.vscode/extensions.json rename to firmware/mainboard/stmf446retx/.vscode/extensions.json diff --git a/firmware/mainboard/stmf446retx/.vscode/launch.json b/firmware/mainboard/stmf446retx/.vscode/launch.json new file mode 100644 index 00000000..43744156 --- /dev/null +++ b/firmware/mainboard/stmf446retx/.vscode/launch.json @@ -0,0 +1,47 @@ +// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY +// +// PlatformIO Debugging Solution +// +// Documentation: https://docs.platformio.org/en/latest/plus/debugging.html +// Configuration: https://docs.platformio.org/en/latest/projectconf/sections/env/options/debug/index.html + +{ + "version": "0.2.0", + "configurations": [ + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug", + "executable": "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/mainboard/stmf446retx/.pio/build/nucleo_f446re/firmware.elf", + "projectEnvName": "nucleo_f446re", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F446x.svd", + "preLaunchTask": { + "type": "PlatformIO", + "task": "Pre-Debug" + } + }, + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug (skip Pre-Debug)", + "executable": "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/mainboard/stmf446retx/.pio/build/nucleo_f446re/firmware.elf", + "projectEnvName": "nucleo_f446re", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F446x.svd" + }, + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug (without uploading)", + "executable": "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/mainboard/stmf446retx/.pio/build/nucleo_f446re/firmware.elf", + "projectEnvName": "nucleo_f446re", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F446x.svd", + "loadMode": "manual" + } + ] +} diff --git a/firmware/mainboard/stmf446retx/.vscode/settings.json b/firmware/mainboard/stmf446retx/.vscode/settings.json new file mode 100644 index 00000000..10a5631d --- /dev/null +++ b/firmware/mainboard/stmf446retx/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "usbd_hid.h": "c" + } +} \ No newline at end of file diff --git a/firmware/mainboard/stmf446retx/Inc/can.h b/firmware/mainboard/stmf446retx/Inc/can.h new file mode 100644 index 00000000..bb285541 --- /dev/null +++ b/firmware/mainboard/stmf446retx/Inc/can.h @@ -0,0 +1,52 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file can.h + * @brief This file contains all the function prototypes for + * the can.c file + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __CAN_H__ +#define __CAN_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" + +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +extern CAN_HandleTypeDef hcan1; + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +void MX_CAN1_Init(void); + +/* USER CODE BEGIN Prototypes */ + +/* USER CODE END Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif /* __CAN_H__ */ + diff --git a/firmware/mainboard/stmf446retx/Inc/gpio.h b/firmware/mainboard/stmf446retx/Inc/gpio.h new file mode 100644 index 00000000..8ba7de1e --- /dev/null +++ b/firmware/mainboard/stmf446retx/Inc/gpio.h @@ -0,0 +1,49 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file gpio.h + * @brief This file contains all the function prototypes for + * the gpio.c file + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __GPIO_H__ +#define __GPIO_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" + +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +void MX_GPIO_Init(void); + +/* USER CODE BEGIN Prototypes */ + +/* USER CODE END Prototypes */ + +#ifdef __cplusplus +} +#endif +#endif /*__ GPIO_H__ */ + diff --git a/firmware/mainboard/stmf446retx/Inc/main.h b/firmware/mainboard/stmf446retx/Inc/main.h new file mode 100644 index 00000000..5b906fa0 --- /dev/null +++ b/firmware/mainboard/stmf446retx/Inc/main.h @@ -0,0 +1,204 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.h + * @brief : Header for main.c file. + * This file contains the common defines of the application. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __MAIN_H +#define __MAIN_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32f4xx_hal.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ +// Modifier Keys +#define KEY_LEFT_CTRL 0xE0 +#define KEY_LEFT_SHIFT 0xE1 +#define KEY_LEFT_ALT 0xE2 +#define KEY_LEFT_GUI 0xE3 +#define KEY_RIGHT_CTRL 0xE4 +#define KEY_RIGHT_SHIFT 0xE5 +#define KEY_RIGHT_ALT 0xE6 +#define KEY_RIGHT_GUI 0xE7 + +// Regular Keys (Usage ID 0x04–0x73) +#define KEY_A 0x04 +#define KEY_B 0x05 +#define KEY_C 0x06 +#define KEY_D 0x07 +#define KEY_E 0x08 +#define KEY_F 0x09 +#define KEY_G 0x0A +#define KEY_H 0x0B +#define KEY_I 0x0C +#define KEY_J 0x0D +#define KEY_K 0x0E +#define KEY_L 0x0F +#define KEY_M 0x10 +#define KEY_N 0x11 +#define KEY_O 0x12 +#define KEY_P 0x13 +#define KEY_Q 0x14 +#define KEY_R 0x15 +#define KEY_S 0x16 +#define KEY_T 0x17 +#define KEY_U 0x18 +#define KEY_V 0x19 +#define KEY_W 0x1A +#define KEY_X 0x1B +#define KEY_Y 0x1C +#define KEY_Z 0x1D + +#define KEY_1 0x1E +#define KEY_2 0x1F +#define KEY_3 0x20 +#define KEY_4 0x21 +#define KEY_5 0x22 +#define KEY_6 0x23 +#define KEY_7 0x24 +#define KEY_8 0x25 +#define KEY_9 0x26 +#define KEY_0 0x27 + +#define KEY_ENTER 0x28 +#define KEY_ESC 0x29 +#define KEY_BACKSPACE 0x2A +#define KEY_TAB 0x2B +#define KEY_SPACE 0x2C +#define KEY_MINUS 0x2D +#define KEY_EQUAL 0x2E +#define KEY_LEFT_BRACKET 0x2F +#define KEY_RIGHT_BRACKET 0x30 +#define KEY_BACKSLASH 0x31 +#define KEY_NON_US_HASH 0x32 +#define KEY_SEMICOLON 0x33 +#define KEY_APOSTROPHE 0x34 +#define KEY_GRAVE 0x35 +#define KEY_COMMA 0x36 +#define KEY_PERIOD 0x37 +#define KEY_SLASH 0x38 +#define KEY_CAPS_LOCK 0x39 + +// Function Keys +#define KEY_F1 0x3A +#define KEY_F2 0x3B +#define KEY_F3 0x3C +#define KEY_F4 0x3D +#define KEY_F5 0x3E +#define KEY_F6 0x3F +#define KEY_F7 0x40 +#define KEY_F8 0x41 +#define KEY_F9 0x42 +#define KEY_F10 0x43 +#define KEY_F11 0x44 +#define KEY_F12 0x45 + +#define KEY_PRINT_SCREEN 0x46 +#define KEY_SCROLL_LOCK 0x47 +#define KEY_PAUSE 0x48 + +// Navigation Keys +#define KEY_INSERT 0x49 +#define KEY_HOME 0x4A +#define KEY_PAGE_UP 0x4B +#define KEY_DELETE 0x4C +#define KEY_END 0x4D +#define KEY_PAGE_DOWN 0x4E + +#define KEY_RIGHT_ARROW 0x4F +#define KEY_LEFT_ARROW 0x50 +#define KEY_DOWN_ARROW 0x51 +#define KEY_UP_ARROW 0x52 + +// Keypad +#define KEY_NUM_LOCK 0x53 +#define KEYPAD_SLASH 0x54 +#define KEYPAD_ASTERISK 0x55 +#define KEYPAD_MINUS 0x56 +#define KEYPAD_PLUS 0x57 +#define KEYPAD_ENTER 0x58 +#define KEYPAD_1 0x59 +#define KEYPAD_2 0x5A +#define KEYPAD_3 0x5B +#define KEYPAD_4 0x5C +#define KEYPAD_5 0x5D +#define KEYPAD_6 0x5E +#define KEYPAD_7 0x5F +#define KEYPAD_8 0x60 +#define KEYPAD_9 0x61 +#define KEYPAD_0 0x62 +#define KEYPAD_DOT 0x63 + +// Misc/Non-US +#define KEY_NON_US_BACKSLASH 0x64 +#define KEY_APPLICATION 0x65 +#define KEY_POWER 0x66 +#define KEYPAD_EQUAL 0x67 +#define KEY_F13 0x68 +#define KEY_F14 0x69 +#define KEY_F15 0x6A +#define KEY_F16 0x6B +#define KEY_F17 0x6C +#define KEY_F18 0x6D +#define KEY_F19 0x6E +#define KEY_F20 0x6F +#define KEY_F21 0x70 +#define KEY_F22 0x71 +#define KEY_F23 0x72 +#define KEY_F24 0x73 + +/* USER CODE END EM */ + +/* Exported functions prototypes ---------------------------------------------*/ +void Error_Handler(void); + +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +/* Private defines -----------------------------------------------------------*/ + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +#ifdef __cplusplus +} +#endif + +#endif /* __MAIN_H */ diff --git a/firmware/mainboard/stmf446retx/Inc/mainboard_usb.h b/firmware/mainboard/stmf446retx/Inc/mainboard_usb.h new file mode 100644 index 00000000..26551697 --- /dev/null +++ b/firmware/mainboard/stmf446retx/Inc/mainboard_usb.h @@ -0,0 +1,160 @@ +/** + ****************************************************************************** + * @file usbd_hid.h + * @author MCD Application Team + * @brief Header file for the usbd_hid_core.c file. + ****************************************************************************** + * @attention + * + * Copyright (c) 2015 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __USB_HID_H +#define __USB_HID_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "usbd_ioreq.h" + +/** @addtogroup STM32_USB_DEVICE_LIBRARY + * @{ + */ + +/** @defgroup USBD_HID + * @brief This file is the Header file for usbd_hid.c + * @{ + */ + + +/** @defgroup USBD_HID_Exported_Defines + * @{ + */ +#ifndef HID_EPIN_ADDR +#define HID_EPIN_ADDR 0x81U +#endif /* HID_EPIN_ADDR */ +#define HID_EPIN_SIZE 0x0EU + +#define USB_HID_CONFIG_DESC_SIZ 34U +#define USB_HID_DESC_SIZ 9U +#define HID_MOUSE_REPORT_DESC_SIZE 0x2DU + +#define HID_DESCRIPTOR_TYPE 0x21U +#define HID_REPORT_DESC 0x22U + +#ifndef HID_HS_BINTERVAL +#define HID_HS_BINTERVAL 0x07U +#endif /* HID_HS_BINTERVAL */ + +#ifndef HID_FS_BINTERVAL +#define HID_FS_BINTERVAL 0x0AU +#endif /* HID_FS_BINTERVAL */ + +#define USBD_HID_REQ_SET_PROTOCOL 0x0BU +#define USBD_HID_REQ_GET_PROTOCOL 0x03U + +#define USBD_HID_REQ_SET_IDLE 0x0AU +#define USBD_HID_REQ_GET_IDLE 0x02U + +#define USBD_HID_REQ_SET_REPORT 0x09U +#define USBD_HID_REQ_GET_REPORT 0x01U +/** + * @} + */ + + +/** @defgroup USBD_CORE_Exported_TypesDefinitions + * @{ + */ +typedef enum +{ + USBD_HID_IDLE = 0, + USBD_HID_BUSY, +} USBD_HID_StateTypeDef; + + +typedef struct +{ + uint32_t Protocol; + uint32_t IdleState; + uint32_t AltSetting; + USBD_HID_StateTypeDef state; +} USBD_HID_HandleTypeDef; + +/* + * HID Class specification version 1.1 + * 6.2.1 HID Descriptor + */ + +typedef struct +{ + uint8_t bLength; + uint8_t bDescriptorType; + uint16_t bcdHID; + uint8_t bCountryCode; + uint8_t bNumDescriptors; + uint8_t bHIDDescriptorType; + uint16_t wItemLength; +} __PACKED USBD_HIDDescTypeDef; + +/** + * @} + */ + + + +/** @defgroup USBD_CORE_Exported_Macros + * @{ + */ + +/** + * @} + */ + +/** @defgroup USBD_CORE_Exported_Variables + * @{ + */ + +extern USBD_ClassTypeDef USBD_HID; +#define USBD_HID_CLASS &USBD_HID +/** + * @} + */ + +/** @defgroup USB_CORE_Exported_Functions + * @{ + */ +#ifdef USE_USBD_COMPOSITE +uint8_t USBD_HID_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t len, uint8_t ClassId); +#else +uint8_t USBD_HID_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t len); +#endif /* USE_USBD_COMPOSITE */ +uint32_t USBD_HID_GetPollingInterval(USBD_HandleTypeDef *pdev); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __USB_HID_H */ +/** + * @} + */ + +/** + * @} + */ + diff --git a/firmware/mainboard/stmf446retx/Inc/stm32f4xx_hal_conf.h b/firmware/mainboard/stmf446retx/Inc/stm32f4xx_hal_conf.h new file mode 100644 index 00000000..0f9d180f --- /dev/null +++ b/firmware/mainboard/stmf446retx/Inc/stm32f4xx_hal_conf.h @@ -0,0 +1,495 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f4xx_hal_conf_template.h + * @author MCD Application Team + * @brief HAL configuration template file. + * This file should be copied to the application folder and renamed + * to stm32f4xx_hal_conf.h. + ****************************************************************************** + * @attention + * + * Copyright (c) 2017 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F4xx_HAL_CONF_H +#define __STM32F4xx_HAL_CONF_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED + + /* #define HAL_CRYP_MODULE_ENABLED */ +/* #define HAL_ADC_MODULE_ENABLED */ +#define HAL_CAN_MODULE_ENABLED +/* #define HAL_CRC_MODULE_ENABLED */ +/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ +/* #define HAL_DAC_MODULE_ENABLED */ +/* #define HAL_DCMI_MODULE_ENABLED */ +/* #define HAL_DMA2D_MODULE_ENABLED */ +/* #define HAL_ETH_MODULE_ENABLED */ +/* #define HAL_ETH_LEGACY_MODULE_ENABLED */ +/* #define HAL_NAND_MODULE_ENABLED */ +/* #define HAL_NOR_MODULE_ENABLED */ +/* #define HAL_PCCARD_MODULE_ENABLED */ +/* #define HAL_SRAM_MODULE_ENABLED */ +/* #define HAL_SDRAM_MODULE_ENABLED */ +/* #define HAL_HASH_MODULE_ENABLED */ +/* #define HAL_I2C_MODULE_ENABLED */ +/* #define HAL_I2S_MODULE_ENABLED */ +/* #define HAL_IWDG_MODULE_ENABLED */ +/* #define HAL_LTDC_MODULE_ENABLED */ +/* #define HAL_RNG_MODULE_ENABLED */ +/* #define HAL_RTC_MODULE_ENABLED */ +/* #define HAL_SAI_MODULE_ENABLED */ +/* #define HAL_SD_MODULE_ENABLED */ +/* #define HAL_MMC_MODULE_ENABLED */ +/* #define HAL_SPI_MODULE_ENABLED */ +/* #define HAL_TIM_MODULE_ENABLED */ +/* #define HAL_UART_MODULE_ENABLED */ +/* #define HAL_USART_MODULE_ENABLED */ +/* #define HAL_IRDA_MODULE_ENABLED */ +/* #define HAL_SMARTCARD_MODULE_ENABLED */ +/* #define HAL_SMBUS_MODULE_ENABLED */ +/* #define HAL_WWDG_MODULE_ENABLED */ +#define HAL_PCD_MODULE_ENABLED +/* #define HAL_HCD_MODULE_ENABLED */ +/* #define HAL_DSI_MODULE_ENABLED */ +/* #define HAL_QSPI_MODULE_ENABLED */ +/* #define HAL_QSPI_MODULE_ENABLED */ +/* #define HAL_CEC_MODULE_ENABLED */ +/* #define HAL_FMPI2C_MODULE_ENABLED */ +/* #define HAL_FMPSMBUS_MODULE_ENABLED */ +/* #define HAL_SPDIFRX_MODULE_ENABLED */ +/* #define HAL_DFSDM_MODULE_ENABLED */ +/* #define HAL_LPTIM_MODULE_ENABLED */ +#define HAL_GPIO_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) + #define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) + #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) + #define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) + #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz + The real value may vary depending on the variations + in voltage and temperature.*/ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) + #define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) + #define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External audio frequency in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#define TICK_INT_PRIORITY 15U /*!< tick interrupt priority */ +#define USE_RTOS 0U +#define PREFETCH_ENABLE 1U +#define INSTRUCTION_CACHE_ENABLE 1U +#define DATA_CACHE_ENABLE 1U + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */ +#define USE_HAL_FMPSMBUS_REGISTER_CALLBACKS 0U /* FMPSMBUS register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1U */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ + +/* DP83848_PHY_ADDRESS Address*/ +#define DP83848_PHY_ADDRESS +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x000000FFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x0000U) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x0001U) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000U) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000U) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100U) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000U) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100U) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000U) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000U) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200U) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800U) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400U) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020U) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004U) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002U) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ +#define PHY_SR ((uint16_t)) /*!< PHY status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)) /*!< PHY Duplex mask */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ + +#define USE_SPI_CRC 0U + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED + #include "stm32f4xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED + #include "stm32f4xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED + #include "stm32f4xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED + #include "stm32f4xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED + #include "stm32f4xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED + #include "stm32f4xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED + #include "stm32f4xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED + #include "stm32f4xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED + #include "stm32f4xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED + #include "stm32f4xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED + #include "stm32f4xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED + #include "stm32f4xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED + #include "stm32f4xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED + #include "stm32f4xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_ETH_LEGACY_MODULE_ENABLED + #include "stm32f4xx_hal_eth_legacy.h" +#endif /* HAL_ETH_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED + #include "stm32f4xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED + #include "stm32f4xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED + #include "stm32f4xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED + #include "stm32f4xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED + #include "stm32f4xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED + #include "stm32f4xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED + #include "stm32f4xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED + #include "stm32f4xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED + #include "stm32f4xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED + #include "stm32f4xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED + #include "stm32f4xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED + #include "stm32f4xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED + #include "stm32f4xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED + #include "stm32f4xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED + #include "stm32f4xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED + #include "stm32f4xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED + #include "stm32f4xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED + #include "stm32f4xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED + #include "stm32f4xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED + #include "stm32f4xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED + #include "stm32f4xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED + #include "stm32f4xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED + #include "stm32f4xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED + #include "stm32f4xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED + #include "stm32f4xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED + #include "stm32f4xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED + #include "stm32f4xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED + #include "stm32f4xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED + #include "stm32f4xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_FMPI2C_MODULE_ENABLED + #include "stm32f4xx_hal_fmpi2c.h" +#endif /* HAL_FMPI2C_MODULE_ENABLED */ + +#ifdef HAL_FMPSMBUS_MODULE_ENABLED + #include "stm32f4xx_hal_fmpsmbus.h" +#endif /* HAL_FMPSMBUS_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED + #include "stm32f4xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED + #include "stm32f4xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED + #include "stm32f4xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED + #include "stm32f4xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ + #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ + void assert_failed(uint8_t* file, uint32_t line); +#else + #define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F4xx_HAL_CONF_H */ diff --git a/firmware/mainboard/stmf446retx/Inc/stm32f4xx_it.h b/firmware/mainboard/stmf446retx/Inc/stm32f4xx_it.h new file mode 100644 index 00000000..7bc39080 --- /dev/null +++ b/firmware/mainboard/stmf446retx/Inc/stm32f4xx_it.h @@ -0,0 +1,68 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f4xx_it.h + * @brief This file contains the headers of the interrupt handlers. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F4xx_IT_H +#define __STM32F4xx_IT_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions prototypes ---------------------------------------------*/ +void NMI_Handler(void); +void HardFault_Handler(void); +void MemManage_Handler(void); +void BusFault_Handler(void); +void UsageFault_Handler(void); +void SVC_Handler(void); +void DebugMon_Handler(void); +void PendSV_Handler(void); +void SysTick_Handler(void); +void CAN1_RX0_IRQHandler(void); +void OTG_FS_IRQHandler(void); +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F4xx_IT_H */ diff --git a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usb_device.h b/firmware/mainboard/stmf446retx/Inc/usb_device.h similarity index 92% rename from firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usb_device.h rename to firmware/mainboard/stmf446retx/Inc/usb_device.h index 2e645300..5d3020f4 100644 --- a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usb_device.h +++ b/firmware/mainboard/stmf446retx/Inc/usb_device.h @@ -2,7 +2,7 @@ /** ****************************************************************************** * @file : usb_device.h - * @version : v2.0_Cube + * @version : v1.0_Cube * @brief : Header for usb_device.c file. ****************************************************************************** * @attention @@ -27,8 +27,8 @@ #endif /* Includes ------------------------------------------------------------------*/ -#include "stm32f1xx.h" -#include "stm32f1xx_hal.h" +#include "stm32f4xx.h" +#include "stm32f4xx_hal.h" #include "usbd_def.h" /* USER CODE BEGIN INCLUDE */ diff --git a/firmware/components/CAN/MainCAN/src/USB_DEVICE/Target/usbd_conf.h b/firmware/mainboard/stmf446retx/Inc/usbd_conf.h similarity index 76% rename from firmware/components/CAN/MainCAN/src/USB_DEVICE/Target/usbd_conf.h rename to firmware/mainboard/stmf446retx/Inc/usbd_conf.h index f27f86c8..ac928543 100644 --- a/firmware/components/CAN/MainCAN/src/USB_DEVICE/Target/usbd_conf.h +++ b/firmware/mainboard/stmf446retx/Inc/usbd_conf.h @@ -2,7 +2,7 @@ /** ****************************************************************************** * @file : usbd_conf.h - * @version : v2.0_Cube + * @version : v1.0_Cube * @brief : Header for usbd_conf.c file. ****************************************************************************** * @attention @@ -31,14 +31,15 @@ #include #include #include "main.h" -#include "stm32f1xx.h" -#include "stm32f1xx_hal.h" +#include "stm32f4xx.h" +#include "stm32f4xx_hal.h" /* USER CODE BEGIN INCLUDE */ /* USER CODE END INCLUDE */ /** @addtogroup USBD_OTG_DRIVER + * @brief Driver for Usb device. * @{ */ @@ -62,21 +63,24 @@ */ /*---------- -----------*/ -#define USBD_MAX_NUM_INTERFACES 1 +#define USBD_MAX_NUM_INTERFACES 1U /*---------- -----------*/ -#define USBD_MAX_NUM_CONFIGURATION 1 +#define USBD_MAX_NUM_CONFIGURATION 1U /*---------- -----------*/ -#define USBD_MAX_STR_DESC_SIZ 512 +#define USBD_MAX_STR_DESC_SIZ 512U /*---------- -----------*/ -#define USBD_DEBUG_LEVEL 0 +#define USBD_DEBUG_LEVEL 0U /*---------- -----------*/ -#define USBD_SELF_POWERED 1 +#define USBD_LPM_ENABLED 1U /*---------- -----------*/ -#define MAX_STATIC_ALLOC_SIZE 512 +#define USBD_SELF_POWERED 1U +/*---------- -----------*/ +#define HID_FS_BINTERVAL 0xAU /****************************************/ /* #define for FS and HS identification */ #define DEVICE_FS 0 +#define DEVICE_HS 1 /** * @} @@ -86,29 +90,23 @@ * @brief Aliases. * @{ */ - -/* Memory management macros */ - +/* Memory management macros make sure to use static memory allocation */ /** Alias for memory allocation. */ -#define USBD_malloc (uint32_t *)USBD_static_malloc + +#define USBD_malloc (void *)USBD_static_malloc /** Alias for memory release. */ #define USBD_free USBD_static_free /** Alias for memory set. */ -#define USBD_memset /* Not used */ +#define USBD_memset memset /** Alias for memory copy. */ -#define USBD_memcpy /* Not used */ +#define USBD_memcpy memcpy /** Alias for delay. */ #define USBD_Delay HAL_Delay -/* For footprint reasons and since only one allocation is handled in the HID class - driver, the malloc/free is changed into a static allocation method */ -void *USBD_static_malloc(uint32_t size); -void USBD_static_free(void *p); - /* DEBUG macros */ #if (USBD_DEBUG_LEVEL > 0) @@ -116,24 +114,24 @@ void USBD_static_free(void *p); printf("\n"); #else #define USBD_UsrLog(...) -#endif +#endif /* (USBD_DEBUG_LEVEL > 0U) */ #if (USBD_DEBUG_LEVEL > 1) -#define USBD_ErrLog(...) printf("ERROR: ") ;\ +#define USBD_ErrLog(...) printf("ERROR: ");\ printf(__VA_ARGS__);\ printf("\n"); #else #define USBD_ErrLog(...) -#endif +#endif /* (USBD_DEBUG_LEVEL > 1U) */ #if (USBD_DEBUG_LEVEL > 2) -#define USBD_DbgLog(...) printf("DEBUG : ") ;\ +#define USBD_DbgLog(...) printf("DEBUG : ");\ printf(__VA_ARGS__);\ printf("\n"); #else #define USBD_DbgLog(...) -#endif +#endif /* (USBD_DEBUG_LEVEL > 2U) */ /** * @} @@ -154,6 +152,8 @@ void USBD_static_free(void *p); */ /* Exported functions -------------------------------------------------------*/ +void *USBD_static_malloc(uint32_t size); +void USBD_static_free(void *p); /** * @} diff --git a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_desc.h b/firmware/mainboard/stmf446retx/Inc/usbd_desc.h similarity index 94% rename from firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_desc.h rename to firmware/mainboard/stmf446retx/Inc/usbd_desc.h index e9659b9c..6eab7e4e 100644 --- a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_desc.h +++ b/firmware/mainboard/stmf446retx/Inc/usbd_desc.h @@ -2,7 +2,7 @@ /** ****************************************************************************** * @file : usbd_desc.c - * @version : v2.0_Cube + * @version : v1.0_Cube * @brief : Header for usbd_conf.c file. ****************************************************************************** * @attention diff --git a/firmware/mainboard/stmf446retx/Src/can.c b/firmware/mainboard/stmf446retx/Src/can.c new file mode 100644 index 00000000..ae42cd72 --- /dev/null +++ b/firmware/mainboard/stmf446retx/Src/can.c @@ -0,0 +1,132 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file can.c + * @brief This file provides code for the configuration + * of the CAN instances. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Includes ------------------------------------------------------------------*/ +#include "can.h" + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +CAN_HandleTypeDef hcan1; + +/* CAN1 init function */ +void MX_CAN1_Init(void) +{ + + /* USER CODE BEGIN CAN1_Init 0 */ + + /* USER CODE END CAN1_Init 0 */ + + /* USER CODE BEGIN CAN1_Init 1 */ + + /* USER CODE END CAN1_Init 1 */ + hcan1.Instance = CAN1; + hcan1.Init.Prescaler = 6; + hcan1.Init.Mode = CAN_MODE_NORMAL; + hcan1.Init.SyncJumpWidth = CAN_SJW_1TQ; + hcan1.Init.TimeSeg1 = CAN_BS1_16TQ; + hcan1.Init.TimeSeg2 = CAN_BS2_7TQ; + hcan1.Init.TimeTriggeredMode = DISABLE; + hcan1.Init.AutoBusOff = DISABLE; + hcan1.Init.AutoWakeUp = DISABLE; + hcan1.Init.AutoRetransmission = DISABLE; + hcan1.Init.ReceiveFifoLocked = DISABLE; + hcan1.Init.TransmitFifoPriority = DISABLE; + if (HAL_CAN_Init(&hcan1) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN CAN1_Init 2 */ + CAN_FilterTypeDef canfilterconf; + canfilterconf.FilterActivation = CAN_FILTER_ENABLE; + canfilterconf.FilterBank = 0; + canfilterconf.FilterFIFOAssignment = CAN_FILTER_FIFO1; + canfilterconf.FilterIdHigh = 0x399 << 5; + canfilterconf.FilterIdLow = 0x0000; + canfilterconf.FilterMaskIdHigh = 0x7FF << 5; + canfilterconf.FilterMaskIdLow = 0x0000; + canfilterconf.FilterMode = CAN_FILTERMODE_IDMASK; + canfilterconf.FilterScale = CAN_FILTERSCALE_32BIT; + HAL_CAN_ConfigFilter(&hcan1, &canfilterconf); + /* USER CODE END CAN1_Init 2 */ + +} + +void HAL_CAN_MspInit(CAN_HandleTypeDef* canHandle) +{ + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if(canHandle->Instance==CAN1) + { + /* USER CODE BEGIN CAN1_MspInit 0 */ + + /* USER CODE END CAN1_MspInit 0 */ + /* CAN1 clock enable */ + __HAL_RCC_CAN1_CLK_ENABLE(); + + __HAL_RCC_GPIOB_CLK_ENABLE(); + /**CAN1 GPIO Configuration + PB8 ------> CAN1_RX + PB9 ------> CAN1_TX + */ + GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF9_CAN1; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /* CAN1 interrupt Init */ + HAL_NVIC_SetPriority(CAN1_RX0_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(CAN1_RX0_IRQn); + /* USER CODE BEGIN CAN1_MspInit 1 */ + + /* USER CODE END CAN1_MspInit 1 */ + } +} + +void HAL_CAN_MspDeInit(CAN_HandleTypeDef* canHandle) +{ + + if(canHandle->Instance==CAN1) + { + /* USER CODE BEGIN CAN1_MspDeInit 0 */ + + /* USER CODE END CAN1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_CAN1_CLK_DISABLE(); + + /**CAN1 GPIO Configuration + PB8 ------> CAN1_RX + PB9 ------> CAN1_TX + */ + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8|GPIO_PIN_9); + + /* CAN1 interrupt Deinit */ + HAL_NVIC_DisableIRQ(CAN1_RX0_IRQn); + /* USER CODE BEGIN CAN1_MspDeInit 1 */ + + /* USER CODE END CAN1_MspDeInit 1 */ + } +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/firmware/mainboard/stmf446retx/Src/gpio.c b/firmware/mainboard/stmf446retx/Src/gpio.c new file mode 100644 index 00000000..1ba0cb9a --- /dev/null +++ b/firmware/mainboard/stmf446retx/Src/gpio.c @@ -0,0 +1,79 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file gpio.c + * @brief This file provides code for the configuration + * of all used GPIO pins. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "gpio.h" + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/*----------------------------------------------------------------------------*/ +/* Configure GPIO */ +/*----------------------------------------------------------------------------*/ +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ + +/** Configure pins as + * Analog + * Input + * Output + * EVENT_OUT + * EXTI +*/ +void MX_GPIO_Init(void) +{ + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + + /* GPIO Ports Clock Enable */ + __HAL_RCC_GPIOH_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOA_CLK_ENABLE(); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(GPIOB, GPIO_PIN_13|GPIO_PIN_14, GPIO_PIN_RESET); + + /*Configure GPIO pins : PB13 PB14 */ + GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_PULLDOWN; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /*Configure GPIO pin : PB15 */ + GPIO_InitStruct.Pin = GPIO_PIN_15; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_PULLDOWN; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /*Configure GPIO pin : PC6 */ + GPIO_InitStruct.Pin = GPIO_PIN_6; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_PULLDOWN; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + +} + +/* USER CODE BEGIN 2 */ + +/* USER CODE END 2 */ diff --git a/firmware/mainboard/stmf446retx/Src/main.c b/firmware/mainboard/stmf446retx/Src/main.c new file mode 100644 index 00000000..220526d0 --- /dev/null +++ b/firmware/mainboard/stmf446retx/Src/main.c @@ -0,0 +1,282 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.c + * @brief : Main program body + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#include "can.h" +#include "usb_device.h" +#include "mainboard_usb.h" +#include "gpio.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN PTD */ +typedef struct{ + uint8_t MODIFIER; + uint8_t RESERVED; + uint8_t KEYPRESS[13]; +} HIDReportNKRO; + +typedef struct{ + uint8_t MODIFIER; + uint8_t RESERVED; + uint8_t KEYPRESS[6]; // for 6 Key Rollover, changed index to 6. +} HIDReport6KRO; + +typedef struct{ + GPIO_TypeDef* PORT; + uint16_t PIN; +} KbdPins; + +extern USBD_HandleTypeDef hUsbDeviceFS; +/* USER CODE END PTD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ +#define ROWS 2 +#define COLS 2 +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ + +/* USER CODE BEGIN PV */ +uint8_t matrix[ROWS][COLS] = { + {KEY_M, KEY_K}, + {KEY_I, KEY_U} +}; +KbdPins row_pins[ROWS] = { + {GPIOC, GPIO_PIN_6}, + {GPIOB, GPIO_PIN_15} +}; +KbdPins col_pins[COLS] = { + {GPIOB, GPIO_PIN_14}, + {GPIOB, GPIO_PIN_13} +}; +HIDReportNKRO REPORT = {0,0,0,0,0,0,0,0}; +CAN_RxHeaderTypeDef RxHeader; +uint8_t RxData[8]; +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +void SystemClock_Config(void); +/* USER CODE BEGIN PFP */ +void addHIDReport(uint8_t usageID, uint8_t isPressed); +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/** + * @brief The application entry point. + * @retval int + */ +int main(void) +{ + + /* USER CODE BEGIN 1 */ + + /* USER CODE END 1 */ + + /* MCU Configuration--------------------------------------------------------*/ + + /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ + HAL_Init(); + + /* USER CODE BEGIN Init */ + + /* USER CODE END Init */ + + /* Configure the system clock */ + SystemClock_Config(); + + /* USER CODE BEGIN SysInit */ + + /* USER CODE END SysInit */ + + /* Initialize all configured peripherals */ + MX_GPIO_Init(); + MX_CAN1_Init(); + MX_USB_DEVICE_Init(); + /* USER CODE BEGIN 2 */ + HAL_CAN_Start(&hcan1); + HAL_CAN_ActivateNotification(&hcan1, CAN_IT_RX_FIFO0_MSG_PENDING); + HAL_Delay(50); + /* USER CODE END 2 */ + + /* Infinite loop */ + /* USER CODE BEGIN WHILE */ + while (1) + { + //Keycode Scan + + // memset(REPORT.KEYPRESS, 0, 6); // Clear keypresses at the start of each scan for 6 key rollover + + /* USER CODE END WHILE */ + for(int col = 0; col < COLS; col++){ + HAL_GPIO_WritePin(col_pins[col].PORT, col_pins[col].PIN, GPIO_PIN_SET); + HAL_Delay(1); + for(int row = 0; row < ROWS; row++){ + if(HAL_GPIO_ReadPin(row_pins[row].PORT, row_pins[row].PIN)){ + addHIDReport(matrix[row][col], 1); + }else{ + addHIDReport(matrix[row][col], 0); + } + } + HAL_GPIO_WritePin(col_pins[col].PORT, col_pins[col].PIN, GPIO_PIN_RESET); + } + USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t*)&REPORT, sizeof(REPORT)); + HAL_Delay(20); + /* USER CODE BEGIN 3 */ + } + /* USER CODE END 3 */ +} + +void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan) +{ + HAL_CAN_GetRxMessage(hcan, CAN_RX_FIFO0, &RxHeader, RxData); + addHIDReport(RxData[0], (RxData[1] & (1 << 7)) ? 1 : 0); +} +/** + * @brief System Clock Configuration + * @retval None + */ +void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + + /** Configure the main internal regulator output voltage + */ + __HAL_RCC_PWR_CLK_ENABLE(); + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3); + + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = 4; + RCC_OscInitStruct.PLL.PLLN = 72; + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; + RCC_OscInitStruct.PLL.PLLQ = 3; + RCC_OscInitStruct.PLL.PLLR = 2; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + Error_Handler(); + } + + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) + { + Error_Handler(); + } +} + +/* USER CODE BEGIN 4 */ +//Converts UsageID to NKRO bit field and add it to the report +void addHIDReport(uint8_t usageID, uint8_t isPressed){ + if(usageID < 0x04 || usageID > 0x73) return; //Usage ID is out of bounds + uint16_t bit_index = usageID - 0x04; //Offset, UsageID starts with 0x04. Gives us the actual value of the bit + uint8_t byte_index = bit_index/8; //Calculates which byte in the REPORT array + uint8_t bit_offset = bit_index%8; //Calculates which bits in the REPORT[byte_index] should be set/unset + + if(isPressed){ + REPORT.KEYPRESS[byte_index] |= (1 << bit_offset); + }else{ + REPORT.KEYPRESS[byte_index] &= ~(1 << bit_offset); + } +} + +// 6 KEY ROLLOVER CODE STRUCTURE +/* +if (usageID < 0x04 || usageID > 0x73) return; + + int i, empty = -1; + if (isPressed) { + for (i = 0; i < 6; i++) { + if (REPORT.KEYPRESS[i] == usageID) return; // Already present + if (REPORT.KEYPRESS[i] == 0 && empty == -1) empty = i; + } + if (empty != -1) { + REPORT.KEYPRESS[empty] = usageID; + } + // If no empty slot, ignore (6KRO: only 6 keys allowed) + } else { + // Remove from the array when released + for (i = 0; i < 6; i++) { + if (REPORT.KEYPRESS[i] == usageID) { + REPORT.KEYPRESS[i] = 0; + } + } + } +*/ + +/* USER CODE END 4 */ + +/** + * @brief This function is executed in case of error occurrence. + * @retval None + */ +void Error_Handler(void) +{ + /* USER CODE BEGIN Error_Handler_Debug */ + /* User can add his own implementation to report the HAL error return state */ + __disable_irq(); + while (1) + { + } + /* USER CODE END Error_Handler_Debug */ +} + +#ifdef USE_FULL_ASSERT +/** + * @brief Reports the name of the source file and the source line number + * where the assert_param error has occurred. + * @param file: pointer to the source file name + * @param line: assert_param error line source number + * @retval None + */ +void assert_failed(uint8_t *file, uint32_t line) +{ + /* USER CODE BEGIN 6 */ + /* User can add his own implementation to report the file name and line number, + ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ + /* USER CODE END 6 */ +} +#endif /* USE_FULL_ASSERT */ diff --git a/firmware/mainboard/stmf446retx/Src/mainboard_usb.c b/firmware/mainboard/stmf446retx/Src/mainboard_usb.c new file mode 100644 index 00000000..4df85dbf --- /dev/null +++ b/firmware/mainboard/stmf446retx/Src/mainboard_usb.c @@ -0,0 +1,673 @@ +/** + ****************************************************************************** + * @file usbd_hid.c + * @author MCD Application Team + * @brief This file provides the HID core functions. + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2015 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + * @verbatim + * + * =================================================================== + * HID Class Description + * =================================================================== + * This module manages the HID class V1.11 following the "Device Class Definition + * for Human Interface Devices (HID) Version 1.11 Jun 27, 2001". + * This driver implements the following aspects of the specification: + * - The Boot Interface Subclass + * - The Mouse protocol + * - Usage Page : Generic Desktop + * - Usage : Joystick + * - Collection : Application + * + * @note In HS mode and when the DMA is used, all variables and data structures + * dealing with the DMA during the transaction process should be 32-bit aligned. + * + * + * @endverbatim + * + ****************************************************************************** + */ + +/* BSPDependencies +- "stm32xxxxx_{eval}{discovery}{nucleo_144}.c" +- "stm32xxxxx_{eval}{discovery}_io.c" +EndBSPDependencies */ + +/* Includes ------------------------------------------------------------------*/ +#include "usbd_hid.h" +#include "usbd_ctlreq.h" + + +/** @addtogroup STM32_USB_DEVICE_LIBRARY + * @{ + */ + + +/** @defgroup USBD_HID + * @brief usbd core module + * @{ + */ + +/** @defgroup USBD_HID_Private_TypesDefinitions + * @{ + */ +/** + * @} + */ + + +/** @defgroup USBD_HID_Private_Defines + * @{ + */ + +/** + * @} + */ + + +/** @defgroup USBD_HID_Private_Macros + * @{ + */ +/** + * @} + */ + + +/** @defgroup USBD_HID_Private_FunctionPrototypes + * @{ + */ + +static uint8_t USBD_HID_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx); +static uint8_t USBD_HID_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx); +static uint8_t USBD_HID_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req); +static uint8_t USBD_HID_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum); +#ifndef USE_USBD_COMPOSITE +static uint8_t *USBD_HID_GetFSCfgDesc(uint16_t *length); +static uint8_t *USBD_HID_GetHSCfgDesc(uint16_t *length); +static uint8_t *USBD_HID_GetOtherSpeedCfgDesc(uint16_t *length); +static uint8_t *USBD_HID_GetDeviceQualifierDesc(uint16_t *length); +#endif /* USE_USBD_COMPOSITE */ +/** + * @} + */ + +/** @defgroup USBD_HID_Private_Variables + * @{ + */ + +USBD_ClassTypeDef USBD_HID = +{ + USBD_HID_Init, + USBD_HID_DeInit, + USBD_HID_Setup, + NULL, /* EP0_TxSent */ + NULL, /* EP0_RxReady */ + USBD_HID_DataIn, /* DataIn */ + NULL, /* DataOut */ + NULL, /* SOF */ + NULL, + NULL, +#ifdef USE_USBD_COMPOSITE + NULL, + NULL, + NULL, + NULL, +#else + USBD_HID_GetHSCfgDesc, + USBD_HID_GetFSCfgDesc, + USBD_HID_GetOtherSpeedCfgDesc, + USBD_HID_GetDeviceQualifierDesc, +#endif /* USE_USBD_COMPOSITE */ +}; + +#ifndef USE_USBD_COMPOSITE +/* USB HID device FS Configuration Descriptor */ +__ALIGN_BEGIN static uint8_t USBD_HID_CfgDesc[USB_HID_CONFIG_DESC_SIZ] __ALIGN_END = +{ + 0x09, /* bLength: Configuration Descriptor size */ + USB_DESC_TYPE_CONFIGURATION, /* bDescriptorType: Configuration */ + USB_HID_CONFIG_DESC_SIZ, /* wTotalLength: Bytes returned */ + 0x00, + 0x01, /* bNumInterfaces: 1 interface */ + 0x01, /* bConfigurationValue: Configuration value */ + 0x00, /* iConfiguration: Index of string descriptor + describing the configuration */ +#if (USBD_SELF_POWERED == 1U) + 0xE0, /* bmAttributes: Bus Powered according to user configuration */ +#else + 0xA0, /* bmAttributes: Bus Powered according to user configuration */ +#endif /* USBD_SELF_POWERED */ + USBD_MAX_POWER, /* MaxPower (mA) */ + + /************** Descriptor of Joystick Mouse interface ****************/ + /* 09 */ + 0x09, /* bLength: Interface Descriptor size */ + USB_DESC_TYPE_INTERFACE, /* bDescriptorType: Interface descriptor type */ + 0x00, /* bInterfaceNumber: Number of Interface */ + 0x00, /* bAlternateSetting: Alternate setting */ + 0x01, /* bNumEndpoints */ + 0x03, /* bInterfaceClass: HID */ + 0x00, /* bInterfaceSubClass : 1=BOOT, 0=no boot */ + 0x00, /* nInterfaceProtocol : 0=none, 1=keyboard, 2=mouse */ + 0, /* iInterface: Index of string descriptor */ + /******************** Descriptor of Joystick Mouse HID ********************/ + /* 18 */ + 0x09, /* bLength: HID Descriptor size */ + HID_DESCRIPTOR_TYPE, /* bDescriptorType: HID */ + 0x11, /* bcdHID: HID Class Spec release number */ + 0x01, + 0x00, /* bCountryCode: Hardware target country */ + 0x01, /* bNumDescriptors: Number of HID class descriptors to follow */ + 0x22, /* bDescriptorType */ + HID_MOUSE_REPORT_DESC_SIZE, /* wItemLength: Total length of Report descriptor */ + 0x00, + /******************** Descriptor of Mouse endpoint ********************/ + /* 27 */ + 0x07, /* bLength: Endpoint Descriptor size */ + USB_DESC_TYPE_ENDPOINT, /* bDescriptorType:*/ + + HID_EPIN_ADDR, /* bEndpointAddress: Endpoint Address (IN) */ + 0x03, /* bmAttributes: Interrupt endpoint */ + HID_EPIN_SIZE, /* wMaxPacketSize: 4 Bytes max */ + 0x00, + HID_FS_BINTERVAL, /* bInterval: Polling Interval */ + /* 34 */ +}; +#endif /* USE_USBD_COMPOSITE */ + +/* USB HID device Configuration Descriptor */ +__ALIGN_BEGIN static uint8_t USBD_HID_Desc[USB_HID_DESC_SIZ] __ALIGN_END = +{ + /* 18 */ + 0x09, /* bLength: HID Descriptor size */ + HID_DESCRIPTOR_TYPE, /* bDescriptorType: HID */ + 0x11, /* bcdHID: HID Class Spec release number */ + 0x01, + 0x00, /* bCountryCode: Hardware target country */ + 0x01, /* bNumDescriptors: Number of HID class descriptors to follow */ + 0x22, /* bDescriptorType */ + HID_MOUSE_REPORT_DESC_SIZE, /* wItemLength: Total length of Report descriptor */ + 0x00, +}; + +#ifndef USE_USBD_COMPOSITE +/* USB Standard Device Descriptor */ +__ALIGN_BEGIN static uint8_t USBD_HID_DeviceQualifierDesc[USB_LEN_DEV_QUALIFIER_DESC] __ALIGN_END = +{ + USB_LEN_DEV_QUALIFIER_DESC, + USB_DESC_TYPE_DEVICE_QUALIFIER, + 0x00, + 0x02, + 0x00, + 0x00, + 0x00, + 0x40, + 0x01, + 0x00, +}; +#endif /* USE_USBD_COMPOSITE */ + +__ALIGN_BEGIN static uint8_t HID_MOUSE_ReportDesc[HID_MOUSE_REPORT_DESC_SIZE] __ALIGN_END = +{ +// 0x05, 0x01, /* Usage Page (Generic Desktop Ctrls) */ +// 0x09, 0x05, /* Usage (Gamepad) */ +// 0xA1, 0x01, /* Collection (Application) */ + +// // --- Buttons: 13 total --- +// 0x05, 0x09, // USAGE_PAGE (Button) +// 0x19, 0x01, // USAGE_MINIMUM (Button 1) +// 0x29, 0x0D, // USAGE_MAXIMUM (Button 13) +// 0x15, 0x00, // LOGICAL_MINIMUM (0) +// 0x25, 0x01, // LOGICAL_MAXIMUM (1) +// 0x75, 0x01, // REPORT_SIZE (1 bit per button) +// 0x95, 0x0D, // REPORT_COUNT (13 bits total) +// 0x81, 0x02, // INPUT (Data,Var,Abs) + +// // --- Padding (3 bits) --- +// 0x75, 0x01, // REPORT_SIZE (1) +// 0x95, 0x03, // REPORT_COUNT (3 bits) +// 0x81, 0x03, // INPUT (Const,Var,Abs) + +// // --- Encoders (3 x int8_t) --- +// 0x05, 0x01, // USAGE_PAGE (Generic Desktop) +// 0x09, 0x30, // USAGE (X) +// 0x09, 0x31, // USAGE (Y) +// 0x09, 0x32, // USAGE (Z) +// 0x15, 0x81, // LOGICAL_MINIMUM (-127) +// 0x25, 0x7F, // LOGICAL_MAXIMUM (127) +// 0x75, 0x08, // REPORT_SIZE (8 bits) +// 0x95, 0x03, // REPORT_COUNT (3 axes) +// 0x81, 0x02, // INPUT (Data,Var,Abs) + +// 0xC0 /* End Collection */ + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x09, 0x06, // Usage (Keyboard) + 0xA1, 0x01, // Collection (Application) + + // Modifiers (8 bits) + 0x05, 0x07, // Usage Page (Keyboard/Keypad) + 0x19, 0xE0, // Usage Minimum (224) - Left Control + 0x29, 0xE7, // Usage Maximum (231) - Right GUI + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x75, 0x01, // Report Size (1 bit) + 0x95, 0x08, // Report Count (8 bits) + 0x81, 0x02, // Input (Data, Variable, Absolute) + + // Reserved byte (8 bits) + 0x75, 0x08, // Report Size (8 bits) + 0x95, 0x01, // Report Count (1) + 0x81, 0x01, // Input (Constant) + + // Key bitfield (96 bits = 12 bytes) + 0x05, 0x07, // Usage Page (Keyboard/Keypad) + 0x19, 0x04, // Usage Minimum (4) — 'A' key + 0x29, 0x63, // Usage Maximum (99) — 96 keys total (4 to 99) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x75, 0x01, // Report Size (1 bit) + 0x95, 0x60, // Report Count (96 bits) + 0x81, 0x02, // Input (Data, Variable, Absolute) + + 0xC0 // End Collection +}; + +static uint8_t HIDInEpAdd = HID_EPIN_ADDR; + +/** + * @} + */ + +/** @defgroup USBD_HID_Private_Functions + * @{ + */ + +/** + * @brief USBD_HID_Init + * Initialize the HID interface + * @param pdev: device instance + * @param cfgidx: Configuration index + * @retval status + */ +static uint8_t USBD_HID_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx) +{ + UNUSED(cfgidx); + + USBD_HID_HandleTypeDef *hhid; + + hhid = (USBD_HID_HandleTypeDef *)USBD_malloc(sizeof(USBD_HID_HandleTypeDef)); + + if (hhid == NULL) + { + pdev->pClassDataCmsit[pdev->classId] = NULL; + return (uint8_t)USBD_EMEM; + } + + pdev->pClassDataCmsit[pdev->classId] = (void *)hhid; + pdev->pClassData = pdev->pClassDataCmsit[pdev->classId]; + +#ifdef USE_USBD_COMPOSITE + /* Get the Endpoints addresses allocated for this class instance */ + HIDInEpAdd = USBD_CoreGetEPAdd(pdev, USBD_EP_IN, USBD_EP_TYPE_INTR, (uint8_t)pdev->classId); +#endif /* USE_USBD_COMPOSITE */ + + if (pdev->dev_speed == USBD_SPEED_HIGH) + { + pdev->ep_in[HIDInEpAdd & 0xFU].bInterval = HID_HS_BINTERVAL; + } + else /* LOW and FULL-speed endpoints */ + { + pdev->ep_in[HIDInEpAdd & 0xFU].bInterval = HID_FS_BINTERVAL; + } + + /* Open EP IN */ + (void)USBD_LL_OpenEP(pdev, HIDInEpAdd, USBD_EP_TYPE_INTR, HID_EPIN_SIZE); + pdev->ep_in[HIDInEpAdd & 0xFU].is_used = 1U; + + hhid->state = USBD_HID_IDLE; + + return (uint8_t)USBD_OK; +} + +/** + * @brief USBD_HID_DeInit + * DeInitialize the HID layer + * @param pdev: device instance + * @param cfgidx: Configuration index + * @retval status + */ +static uint8_t USBD_HID_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx) +{ + UNUSED(cfgidx); + +#ifdef USE_USBD_COMPOSITE + /* Get the Endpoints addresses allocated for this class instance */ + HIDInEpAdd = USBD_CoreGetEPAdd(pdev, USBD_EP_IN, USBD_EP_TYPE_INTR, (uint8_t)pdev->classId); +#endif /* USE_USBD_COMPOSITE */ + + /* Close HID EPs */ + (void)USBD_LL_CloseEP(pdev, HIDInEpAdd); + pdev->ep_in[HIDInEpAdd & 0xFU].is_used = 0U; + pdev->ep_in[HIDInEpAdd & 0xFU].bInterval = 0U; + + /* Free allocated memory */ + if (pdev->pClassDataCmsit[pdev->classId] != NULL) + { + (void)USBD_free(pdev->pClassDataCmsit[pdev->classId]); + pdev->pClassDataCmsit[pdev->classId] = NULL; + } + + return (uint8_t)USBD_OK; +} + +/** + * @brief USBD_HID_Setup + * Handle the HID specific requests + * @param pdev: instance + * @param req: usb requests + * @retval status + */ +static uint8_t USBD_HID_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) +{ + USBD_HID_HandleTypeDef *hhid = (USBD_HID_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId]; + USBD_StatusTypeDef ret = USBD_OK; + uint16_t len; + uint8_t *pbuf; + uint16_t status_info = 0U; + + if (hhid == NULL) + { + return (uint8_t)USBD_FAIL; + } + + switch (req->bmRequest & USB_REQ_TYPE_MASK) + { + case USB_REQ_TYPE_CLASS : + switch (req->bRequest) + { + case USBD_HID_REQ_SET_PROTOCOL: + hhid->Protocol = (uint8_t)(req->wValue); + break; + + case USBD_HID_REQ_GET_PROTOCOL: + (void)USBD_CtlSendData(pdev, (uint8_t *)&hhid->Protocol, 1U); + break; + + case USBD_HID_REQ_SET_IDLE: + hhid->IdleState = (uint8_t)(req->wValue >> 8); + break; + + case USBD_HID_REQ_GET_IDLE: + (void)USBD_CtlSendData(pdev, (uint8_t *)&hhid->IdleState, 1U); + break; + + default: + USBD_CtlError(pdev, req); + ret = USBD_FAIL; + break; + } + break; + case USB_REQ_TYPE_STANDARD: + switch (req->bRequest) + { + case USB_REQ_GET_STATUS: + if (pdev->dev_state == USBD_STATE_CONFIGURED) + { + (void)USBD_CtlSendData(pdev, (uint8_t *)&status_info, 2U); + } + else + { + USBD_CtlError(pdev, req); + ret = USBD_FAIL; + } + break; + + case USB_REQ_GET_DESCRIPTOR: + if ((req->wValue >> 8) == HID_REPORT_DESC) + { + len = MIN(HID_MOUSE_REPORT_DESC_SIZE, req->wLength); + pbuf = HID_MOUSE_ReportDesc; + } + else if ((req->wValue >> 8) == HID_DESCRIPTOR_TYPE) + { + pbuf = USBD_HID_Desc; + len = MIN(USB_HID_DESC_SIZ, req->wLength); + } + else + { + USBD_CtlError(pdev, req); + ret = USBD_FAIL; + break; + } + (void)USBD_CtlSendData(pdev, pbuf, len); + break; + + case USB_REQ_GET_INTERFACE : + if (pdev->dev_state == USBD_STATE_CONFIGURED) + { + (void)USBD_CtlSendData(pdev, (uint8_t *)&hhid->AltSetting, 1U); + } + else + { + USBD_CtlError(pdev, req); + ret = USBD_FAIL; + } + break; + + case USB_REQ_SET_INTERFACE: + if (pdev->dev_state == USBD_STATE_CONFIGURED) + { + hhid->AltSetting = (uint8_t)(req->wValue); + } + else + { + USBD_CtlError(pdev, req); + ret = USBD_FAIL; + } + break; + + case USB_REQ_CLEAR_FEATURE: + break; + + default: + USBD_CtlError(pdev, req); + ret = USBD_FAIL; + break; + } + break; + + default: + USBD_CtlError(pdev, req); + ret = USBD_FAIL; + break; + } + + return (uint8_t)ret; +} + + +/** + * @brief USBD_HID_SendReport + * Send HID Report + * @param pdev: device instance + * @param buff: pointer to report + * @param ClassId: The Class ID + * @retval status + */ +#ifdef USE_USBD_COMPOSITE +uint8_t USBD_HID_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t len, uint8_t ClassId) +{ + USBD_HID_HandleTypeDef *hhid = (USBD_HID_HandleTypeDef *)pdev->pClassDataCmsit[ClassId]; +#else +uint8_t USBD_HID_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t len) +{ + USBD_HID_HandleTypeDef *hhid = (USBD_HID_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId]; +#endif /* USE_USBD_COMPOSITE */ + + if (hhid == NULL) + { + return (uint8_t)USBD_FAIL; + } + +#ifdef USE_USBD_COMPOSITE + /* Get the Endpoints addresses allocated for this class instance */ + HIDInEpAdd = USBD_CoreGetEPAdd(pdev, USBD_EP_IN, USBD_EP_TYPE_INTR, ClassId); +#endif /* USE_USBD_COMPOSITE */ + + if (pdev->dev_state == USBD_STATE_CONFIGURED) + { + if (hhid->state == USBD_HID_IDLE) + { + hhid->state = USBD_HID_BUSY; + (void)USBD_LL_Transmit(pdev, HIDInEpAdd, report, len); + } + } + + return (uint8_t)USBD_OK; +} + +/** + * @brief USBD_HID_GetPollingInterval + * return polling interval from endpoint descriptor + * @param pdev: device instance + * @retval polling interval + */ +uint32_t USBD_HID_GetPollingInterval(USBD_HandleTypeDef *pdev) +{ + uint32_t polling_interval; + + /* HIGH-speed endpoints */ + if (pdev->dev_speed == USBD_SPEED_HIGH) + { + /* Sets the data transfer polling interval for high speed transfers. + Values between 1..16 are allowed. Values correspond to interval + of 2 ^ (bInterval-1). This option (8 ms, corresponds to HID_HS_BINTERVAL */ + polling_interval = (((1U << (HID_HS_BINTERVAL - 1U))) / 8U); + } + else /* LOW and FULL-speed endpoints */ + { + /* Sets the data transfer polling interval for low and full + speed transfers */ + polling_interval = HID_FS_BINTERVAL; + } + + return ((uint32_t)(polling_interval)); +} + +#ifndef USE_USBD_COMPOSITE +/** + * @brief USBD_HID_GetCfgFSDesc + * return FS configuration descriptor + * @param speed : current device speed + * @param length : pointer data length + * @retval pointer to descriptor buffer + */ +static uint8_t *USBD_HID_GetFSCfgDesc(uint16_t *length) +{ + USBD_EpDescTypeDef *pEpDesc = USBD_GetEpDesc(USBD_HID_CfgDesc, HID_EPIN_ADDR); + + if (pEpDesc != NULL) + { + pEpDesc->bInterval = HID_FS_BINTERVAL; + } + + *length = (uint16_t)sizeof(USBD_HID_CfgDesc); + return USBD_HID_CfgDesc; +} + +/** + * @brief USBD_HID_GetCfgHSDesc + * return HS configuration descriptor + * @param speed : current device speed + * @param length : pointer data length + * @retval pointer to descriptor buffer + */ +static uint8_t *USBD_HID_GetHSCfgDesc(uint16_t *length) +{ + USBD_EpDescTypeDef *pEpDesc = USBD_GetEpDesc(USBD_HID_CfgDesc, HID_EPIN_ADDR); + + if (pEpDesc != NULL) + { + pEpDesc->bInterval = HID_HS_BINTERVAL; + } + + *length = (uint16_t)sizeof(USBD_HID_CfgDesc); + return USBD_HID_CfgDesc; +} + +/** + * @brief USBD_HID_GetOtherSpeedCfgDesc + * return other speed configuration descriptor + * @param speed : current device speed + * @param length : pointer data length + * @retval pointer to descriptor buffer + */ +static uint8_t *USBD_HID_GetOtherSpeedCfgDesc(uint16_t *length) +{ + USBD_EpDescTypeDef *pEpDesc = USBD_GetEpDesc(USBD_HID_CfgDesc, HID_EPIN_ADDR); + + if (pEpDesc != NULL) + { + pEpDesc->bInterval = HID_FS_BINTERVAL; + } + + *length = (uint16_t)sizeof(USBD_HID_CfgDesc); + return USBD_HID_CfgDesc; +} +#endif /* USE_USBD_COMPOSITE */ + +/** + * @brief USBD_HID_DataIn + * handle data IN Stage + * @param pdev: device instance + * @param epnum: endpoint index + * @retval status + */ +static uint8_t USBD_HID_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum) +{ + UNUSED(epnum); + /* Ensure that the FIFO is empty before a new transfer, this condition could + be caused by a new transfer before the end of the previous transfer */ + ((USBD_HID_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId])->state = USBD_HID_IDLE; + + return (uint8_t)USBD_OK; +} + +#ifndef USE_USBD_COMPOSITE +/** + * @brief DeviceQualifierDescriptor + * return Device Qualifier descriptor + * @param length : pointer data length + * @retval pointer to descriptor buffer + */ +static uint8_t *USBD_HID_GetDeviceQualifierDesc(uint16_t *length) +{ + *length = (uint16_t)sizeof(USBD_HID_DeviceQualifierDesc); + + return USBD_HID_DeviceQualifierDesc; +} +#endif /* USE_USBD_COMPOSITE */ +/** + * @} + */ + + +/** + * @} + */ + + +/** + * @} + */ + diff --git a/firmware/mainboard/stmf446retx/Src/stm32f4xx_hal_msp.c b/firmware/mainboard/stmf446retx/Src/stm32f4xx_hal_msp.c new file mode 100644 index 00000000..00c02c33 --- /dev/null +++ b/firmware/mainboard/stmf446retx/Src/stm32f4xx_hal_msp.c @@ -0,0 +1,82 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f4xx_hal_msp.c + * @brief This file provides code for the MSP Initialization + * and de-Initialization codes. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN Define */ + +/* USER CODE END Define */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN Macro */ + +/* USER CODE END Macro */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* External functions --------------------------------------------------------*/ +/* USER CODE BEGIN ExternalFunctions */ + +/* USER CODE END ExternalFunctions */ + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ +/** + * Initializes the Global MSP. + */ +void HAL_MspInit(void) +{ + + /* USER CODE BEGIN MspInit 0 */ + + /* USER CODE END MspInit 0 */ + + __HAL_RCC_SYSCFG_CLK_ENABLE(); + __HAL_RCC_PWR_CLK_ENABLE(); + + /* System interrupt init*/ + + /* USER CODE BEGIN MspInit 1 */ + + /* USER CODE END MspInit 1 */ +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/firmware/mainboard/stmf446retx/Src/stm32f4xx_it.c b/firmware/mainboard/stmf446retx/Src/stm32f4xx_it.c new file mode 100644 index 00000000..4e4877b6 --- /dev/null +++ b/firmware/mainboard/stmf446retx/Src/stm32f4xx_it.c @@ -0,0 +1,232 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f4xx_it.c + * @brief Interrupt Service Routines. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#include "stm32f4xx_it.h" +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/* External variables --------------------------------------------------------*/ +extern PCD_HandleTypeDef hpcd_USB_OTG_FS; +extern CAN_HandleTypeDef hcan1; +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/******************************************************************************/ +/* Cortex-M4 Processor Interruption and Exception Handlers */ +/******************************************************************************/ +/** + * @brief This function handles Non maskable interrupt. + */ +void NMI_Handler(void) +{ + /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ + + /* USER CODE END NonMaskableInt_IRQn 0 */ + /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ + while (1) + { + } + /* USER CODE END NonMaskableInt_IRQn 1 */ +} + +/** + * @brief This function handles Hard fault interrupt. + */ +void HardFault_Handler(void) +{ + /* USER CODE BEGIN HardFault_IRQn 0 */ + + /* USER CODE END HardFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_HardFault_IRQn 0 */ + /* USER CODE END W1_HardFault_IRQn 0 */ + } +} + +/** + * @brief This function handles Memory management fault. + */ +void MemManage_Handler(void) +{ + /* USER CODE BEGIN MemoryManagement_IRQn 0 */ + + /* USER CODE END MemoryManagement_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ + /* USER CODE END W1_MemoryManagement_IRQn 0 */ + } +} + +/** + * @brief This function handles Pre-fetch fault, memory access fault. + */ +void BusFault_Handler(void) +{ + /* USER CODE BEGIN BusFault_IRQn 0 */ + + /* USER CODE END BusFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_BusFault_IRQn 0 */ + /* USER CODE END W1_BusFault_IRQn 0 */ + } +} + +/** + * @brief This function handles Undefined instruction or illegal state. + */ +void UsageFault_Handler(void) +{ + /* USER CODE BEGIN UsageFault_IRQn 0 */ + + /* USER CODE END UsageFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ + /* USER CODE END W1_UsageFault_IRQn 0 */ + } +} + +/** + * @brief This function handles System service call via SWI instruction. + */ +void SVC_Handler(void) +{ + /* USER CODE BEGIN SVCall_IRQn 0 */ + + /* USER CODE END SVCall_IRQn 0 */ + /* USER CODE BEGIN SVCall_IRQn 1 */ + + /* USER CODE END SVCall_IRQn 1 */ +} + +/** + * @brief This function handles Debug monitor. + */ +void DebugMon_Handler(void) +{ + /* USER CODE BEGIN DebugMonitor_IRQn 0 */ + + /* USER CODE END DebugMonitor_IRQn 0 */ + /* USER CODE BEGIN DebugMonitor_IRQn 1 */ + + /* USER CODE END DebugMonitor_IRQn 1 */ +} + +/** + * @brief This function handles Pendable request for system service. + */ +void PendSV_Handler(void) +{ + /* USER CODE BEGIN PendSV_IRQn 0 */ + + /* USER CODE END PendSV_IRQn 0 */ + /* USER CODE BEGIN PendSV_IRQn 1 */ + + /* USER CODE END PendSV_IRQn 1 */ +} + +/** + * @brief This function handles System tick timer. + */ +void SysTick_Handler(void) +{ + /* USER CODE BEGIN SysTick_IRQn 0 */ + + /* USER CODE END SysTick_IRQn 0 */ + HAL_IncTick(); + /* USER CODE BEGIN SysTick_IRQn 1 */ + + /* USER CODE END SysTick_IRQn 1 */ +} + +/******************************************************************************/ +/* STM32F4xx Peripheral Interrupt Handlers */ +/* Add here the Interrupt Handlers for the used peripherals. */ +/* For the available peripheral interrupt handler names, */ +/* please refer to the startup file (startup_stm32f4xx.s). */ +/******************************************************************************/ + +/** + * @brief This function handles CAN1 RX0 interrupt. + */ +void CAN1_RX0_IRQHandler(void) +{ + /* USER CODE BEGIN CAN1_RX0_IRQn 0 */ + + /* USER CODE END CAN1_RX0_IRQn 0 */ + HAL_CAN_IRQHandler(&hcan1); + /* USER CODE BEGIN CAN1_RX0_IRQn 1 */ + + /* USER CODE END CAN1_RX0_IRQn 1 */ +} + +/** + * @brief This function handles USB On The Go FS global interrupt. + */ +void OTG_FS_IRQHandler(void) +{ + /* USER CODE BEGIN OTG_FS_IRQn 0 */ + + /* USER CODE END OTG_FS_IRQn 0 */ + HAL_PCD_IRQHandler(&hpcd_USB_OTG_FS); + /* USER CODE BEGIN OTG_FS_IRQn 1 */ + + /* USER CODE END OTG_FS_IRQn 1 */ +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usb_device.c b/firmware/mainboard/stmf446retx/Src/usb_device.c similarity index 85% rename from firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usb_device.c rename to firmware/mainboard/stmf446retx/Src/usb_device.c index f32373f5..3d3e900d 100644 --- a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usb_device.c +++ b/firmware/mainboard/stmf446retx/Src/usb_device.c @@ -2,7 +2,7 @@ /** ****************************************************************************** * @file : usb_device.c - * @version : v2.0_Cube + * @version : v1.0_Cube * @brief : This file implements the USB Device ****************************************************************************** * @attention @@ -23,8 +23,7 @@ #include "usb_device.h" #include "usbd_core.h" #include "usbd_desc.h" -#include "usbd_cdc.h" -#include "usbd_cdc_if.h" +#include "usbd_hid.h" /* USER CODE BEGIN Includes */ @@ -72,11 +71,7 @@ void MX_USB_DEVICE_Init(void) { Error_Handler(); } - if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_CDC) != USBD_OK) - { - Error_Handler(); - } - if (USBD_CDC_RegisterInterface(&hUsbDeviceFS, &USBD_Interface_fops_FS) != USBD_OK) + if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_HID) != USBD_OK) { Error_Handler(); } diff --git a/firmware/components/CAN/MainCAN/src/USB_DEVICE/Target/usbd_conf.c b/firmware/mainboard/stmf446retx/Src/usbd_conf.c similarity index 70% rename from firmware/components/CAN/MainCAN/src/USB_DEVICE/Target/usbd_conf.c rename to firmware/mainboard/stmf446retx/Src/usbd_conf.c index 2cd42a96..ef53ffbd 100644 --- a/firmware/components/CAN/MainCAN/src/USB_DEVICE/Target/usbd_conf.c +++ b/firmware/mainboard/stmf446retx/Src/usbd_conf.c @@ -1,8 +1,8 @@ /* USER CODE BEGIN Header */ /** ****************************************************************************** - * @file : Target/usbd_conf.c - * @version : v2.0_Cube + * @file : usbd_conf.c + * @version : v1.0_Cube * @brief : This file implements the board support package for the USB device library ****************************************************************************** * @attention @@ -19,11 +19,12 @@ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ -#include "stm32f1xx.h" -#include "stm32f1xx_hal.h" +#include "stm32f4xx.h" +#include "stm32f4xx_hal.h" #include "usbd_def.h" #include "usbd_core.h" -#include "usbd_cdc.h" + +#include "usbd_hid.h" /* USER CODE BEGIN Includes */ @@ -38,28 +39,27 @@ /* USER CODE END PV */ -PCD_HandleTypeDef hpcd_USB_FS; +PCD_HandleTypeDef hpcd_USB_OTG_FS; void Error_Handler(void); +/* External functions --------------------------------------------------------*/ +void SystemClock_Config(void); + /* USER CODE BEGIN 0 */ /* USER CODE END 0 */ /* USER CODE BEGIN PFP */ /* Private function prototypes -----------------------------------------------*/ +USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status); /* USER CODE END PFP */ /* Private functions ---------------------------------------------------------*/ -static USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status); + /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ -#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) -static void PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state); -#else -void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state); -#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ /******************************************************************************* LL Driver Callbacks (PCD -> USB Device Library) @@ -68,45 +68,69 @@ void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state); void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle) { - if(pcdHandle->Instance==USB) + GPIO_InitTypeDef GPIO_InitStruct = {0}; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; + if(pcdHandle->Instance==USB_OTG_FS) { - /* USER CODE BEGIN USB_MspInit 0 */ + /* USER CODE BEGIN USB_OTG_FS_MspInit 0 */ + + /* USER CODE END USB_OTG_FS_MspInit 0 */ + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48; + PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48CLKSOURCE_PLLQ; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } + + __HAL_RCC_GPIOA_CLK_ENABLE(); + /**USB_OTG_FS GPIO Configuration + PA11 ------> USB_OTG_FS_DM + PA12 ------> USB_OTG_FS_DP + */ + GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - /* USER CODE END USB_MspInit 0 */ /* Peripheral clock enable */ - __HAL_RCC_USB_CLK_ENABLE(); + __HAL_RCC_USB_OTG_FS_CLK_ENABLE(); /* Peripheral interrupt init */ - HAL_NVIC_SetPriority(USB_LP_CAN1_RX0_IRQn, 0, 0); - HAL_NVIC_EnableIRQ(USB_LP_CAN1_RX0_IRQn); - /* USER CODE BEGIN USB_MspInit 1 */ + HAL_NVIC_SetPriority(OTG_FS_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(OTG_FS_IRQn); + /* USER CODE BEGIN USB_OTG_FS_MspInit 1 */ - /* USER CODE END USB_MspInit 1 */ + /* USER CODE END USB_OTG_FS_MspInit 1 */ } } void HAL_PCD_MspDeInit(PCD_HandleTypeDef* pcdHandle) { - if(pcdHandle->Instance==USB) + if(pcdHandle->Instance==USB_OTG_FS) { - /* USER CODE BEGIN USB_MspDeInit 0 */ + /* USER CODE BEGIN USB_OTG_FS_MspDeInit 0 */ - /* USER CODE END USB_MspDeInit 0 */ + /* USER CODE END USB_OTG_FS_MspDeInit 0 */ /* Peripheral clock disable */ - __HAL_RCC_USB_CLK_DISABLE(); + __HAL_RCC_USB_OTG_FS_CLK_DISABLE(); + + /**USB_OTG_FS GPIO Configuration + PA11 ------> USB_OTG_FS_DM + PA12 ------> USB_OTG_FS_DP + */ + HAL_GPIO_DeInit(GPIOA, GPIO_PIN_11|GPIO_PIN_12); /* Peripheral interrupt Deinit*/ - /* USER CODE BEGIN USB:USB_LP_CAN1_RX0_IRQn disable */ - /** - * Uncomment the line below to disable the "USB_LP_CAN1_RX0_IRQn" interrupt - * Be aware, disabling shared interrupt may affect other IPs - */ - /* HAL_NVIC_DisableIRQ(USB_LP_CAN1_RX0_IRQn); */ - /* USER CODE END USB:USB_LP_CAN1_RX0_IRQn disable */ + HAL_NVIC_DisableIRQ(OTG_FS_IRQn); - /* USER CODE BEGIN USB_MspDeInit 1 */ + /* USER CODE BEGIN USB_OTG_FS_MspDeInit 1 */ - /* USER CODE END USB_MspDeInit 1 */ + /* USER CODE END USB_OTG_FS_MspDeInit 1 */ } } @@ -181,7 +205,15 @@ void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd) { USBD_SpeedTypeDef speed = USBD_SPEED_FULL; - if ( hpcd->Init.speed != PCD_SPEED_FULL) + if ( hpcd->Init.speed == PCD_SPEED_HIGH) + { + speed = USBD_SPEED_HIGH; + } + else if ( hpcd->Init.speed == PCD_SPEED_FULL) + { + speed = USBD_SPEED_FULL; + } + else { Error_Handler(); } @@ -206,6 +238,7 @@ void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd) { /* Inform USB library that core enters in suspend Mode. */ USBD_LL_Suspend((USBD_HandleTypeDef*)hpcd->pData); + __HAL_PCD_GATE_PHYCLOCK(hpcd); /* Enter in STOP mode. */ /* USER CODE BEGIN 2 */ if (hpcd->Init.low_power_enable) @@ -304,45 +337,45 @@ void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd) USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev) { /* Init USB Ip. */ + if (pdev->id == DEVICE_FS) { /* Link the driver to the stack. */ - hpcd_USB_FS.pData = pdev; - pdev->pData = &hpcd_USB_FS; + hpcd_USB_OTG_FS.pData = pdev; + pdev->pData = &hpcd_USB_OTG_FS; - hpcd_USB_FS.Instance = USB; - hpcd_USB_FS.Init.dev_endpoints = 8; - hpcd_USB_FS.Init.speed = PCD_SPEED_FULL; - hpcd_USB_FS.Init.low_power_enable = DISABLE; - hpcd_USB_FS.Init.lpm_enable = DISABLE; - hpcd_USB_FS.Init.battery_charging_enable = DISABLE; - if (HAL_PCD_Init(&hpcd_USB_FS) != HAL_OK) + hpcd_USB_OTG_FS.Instance = USB_OTG_FS; + hpcd_USB_OTG_FS.Init.dev_endpoints = 6; + hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL; + hpcd_USB_OTG_FS.Init.dma_enable = DISABLE; + hpcd_USB_OTG_FS.Init.phy_itface = PCD_PHY_EMBEDDED; + hpcd_USB_OTG_FS.Init.Sof_enable = DISABLE; + hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE; + hpcd_USB_OTG_FS.Init.lpm_enable = DISABLE; + hpcd_USB_OTG_FS.Init.vbus_sensing_enable = DISABLE; + hpcd_USB_OTG_FS.Init.use_dedicated_ep1 = DISABLE; + if (HAL_PCD_Init(&hpcd_USB_OTG_FS) != HAL_OK) { Error_Handler( ); } #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) /* Register USB PCD CallBacks */ - HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SOF_CB_ID, PCD_SOFCallback); - HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SETUPSTAGE_CB_ID, PCD_SetupStageCallback); - HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_RESET_CB_ID, PCD_ResetCallback); - HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SUSPEND_CB_ID, PCD_SuspendCallback); - HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_RESUME_CB_ID, PCD_ResumeCallback); - HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_CONNECT_CB_ID, PCD_ConnectCallback); - HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_DISCONNECT_CB_ID, PCD_DisconnectCallback); + HAL_PCD_RegisterCallback(&hpcd_USB_OTG_FS, HAL_PCD_SOF_CB_ID, PCD_SOFCallback); + HAL_PCD_RegisterCallback(&hpcd_USB_OTG_FS, HAL_PCD_SETUPSTAGE_CB_ID, PCD_SetupStageCallback); + HAL_PCD_RegisterCallback(&hpcd_USB_OTG_FS, HAL_PCD_RESET_CB_ID, PCD_ResetCallback); + HAL_PCD_RegisterCallback(&hpcd_USB_OTG_FS, HAL_PCD_SUSPEND_CB_ID, PCD_SuspendCallback); + HAL_PCD_RegisterCallback(&hpcd_USB_OTG_FS, HAL_PCD_RESUME_CB_ID, PCD_ResumeCallback); + HAL_PCD_RegisterCallback(&hpcd_USB_OTG_FS, HAL_PCD_CONNECT_CB_ID, PCD_ConnectCallback); + HAL_PCD_RegisterCallback(&hpcd_USB_OTG_FS, HAL_PCD_DISCONNECT_CB_ID, PCD_DisconnectCallback); - HAL_PCD_RegisterDataOutStageCallback(&hpcd_USB_FS, PCD_DataOutStageCallback); - HAL_PCD_RegisterDataInStageCallback(&hpcd_USB_FS, PCD_DataInStageCallback); - HAL_PCD_RegisterIsoOutIncpltCallback(&hpcd_USB_FS, PCD_ISOOUTIncompleteCallback); - HAL_PCD_RegisterIsoInIncpltCallback(&hpcd_USB_FS, PCD_ISOINIncompleteCallback); + HAL_PCD_RegisterDataOutStageCallback(&hpcd_USB_OTG_FS, PCD_DataOutStageCallback); + HAL_PCD_RegisterDataInStageCallback(&hpcd_USB_OTG_FS, PCD_DataInStageCallback); + HAL_PCD_RegisterIsoOutIncpltCallback(&hpcd_USB_OTG_FS, PCD_ISOOUTIncompleteCallback); + HAL_PCD_RegisterIsoInIncpltCallback(&hpcd_USB_OTG_FS, PCD_ISOINIncompleteCallback); #endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ - /* USER CODE BEGIN EndPoint_Configuration */ - HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x00 , PCD_SNG_BUF, 0x18); - HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x80 , PCD_SNG_BUF, 0x58); - /* USER CODE END EndPoint_Configuration */ - /* USER CODE BEGIN EndPoint_Configuration_CDC */ - HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x81 , PCD_SNG_BUF, 0xC0); - HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x01 , PCD_SNG_BUF, 0x110); - HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x82 , PCD_SNG_BUF, 0x100); - /* USER CODE END EndPoint_Configuration_CDC */ + HAL_PCDEx_SetRxFiFo(&hpcd_USB_OTG_FS, 0x80); + HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 0, 0x40); + HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 1, 0x80); + } return USBD_OK; } @@ -535,7 +568,7 @@ USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_a * @param size: Data size * @retval USBD status */ -USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size) +USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t size) { HAL_StatusTypeDef hal_status = HAL_OK; USBD_StatusTypeDef usb_status = USBD_OK; @@ -555,7 +588,7 @@ USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, u * @param size: Data size * @retval USBD status */ -USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t size) +USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t size) { HAL_StatusTypeDef hal_status = HAL_OK; USBD_StatusTypeDef usb_status = USBD_OK; @@ -579,15 +612,57 @@ uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr) } /** - * @brief Delays routine for the USB device library. - * @param Delay: Delay in ms + * @brief Send LPM message to user layer + * @param hpcd: PCD handle + * @param msg: LPM message * @retval None */ -void USBD_LL_Delay(uint32_t Delay) +void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg) { - HAL_Delay(Delay); + switch (msg) + { + case PCD_LPM_L0_ACTIVE: + if (hpcd->Init.low_power_enable) + { + SystemClock_Config(); + + /* Reset SLEEPDEEP bit of Cortex System Control Register. */ + SCB->SCR &= (uint32_t)~((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk)); + } + __HAL_PCD_UNGATE_PHYCLOCK(hpcd); + USBD_LL_Resume(hpcd->pData); + break; + + case PCD_LPM_L1_ACTIVE: + __HAL_PCD_GATE_PHYCLOCK(hpcd); + USBD_LL_Suspend(hpcd->pData); + + /* Enter in STOP mode. */ + if (hpcd->Init.low_power_enable) + { + /* Set SLEEPDEEP bit and SleepOnExit of Cortex System Control Register. */ + SCB->SCR |= (uint32_t)((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk)); + } + break; + } } +#ifdef USBD_HS_TESTMODE_ENABLE +/** + * @brief Set High speed Test mode. + * @param pdev: Device handle + * @param testmode: test mode + * @retval USBD Status + */ +USBD_StatusTypeDef USBD_LL_SetTestMode(USBD_HandleTypeDef *pdev, uint8_t testmode) +{ + UNUSED(pdev); + UNUSED(testmode); + + return USBD_OK; +} +#endif /* USBD_HS_TESTMODE_ENABLE */ + /** * @brief Static single allocation. * @param size: Size of allocated memory @@ -595,7 +670,7 @@ void USBD_LL_Delay(uint32_t Delay) */ void *USBD_static_malloc(uint32_t size) { - static uint32_t mem[(sizeof(USBD_CDC_HandleTypeDef)/4)+1];/* On 32-bit boundary */ + static uint32_t mem[(sizeof(USBD_HID_HandleTypeDef)/4)+1];/* On 32-bit boundary */ return mem; } @@ -610,29 +685,13 @@ void USBD_static_free(void *p) } /** - * @brief Software Device Connection - * @param hpcd: PCD handle - * @param state: Connection state (0: disconnected / 1: connected) + * @brief Delays routine for the USB Device Library. + * @param Delay: Delay in ms * @retval None */ -#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) -static void PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state) -#else -void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state) -#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */ +void USBD_LL_Delay(uint32_t Delay) { - /* USER CODE BEGIN 6 */ - if (state == 1) - { - /* Configure Low connection state. */ - - } - else - { - /* Configure High connection state. */ - - } - /* USER CODE END 6 */ + HAL_Delay(Delay); } /** diff --git a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_desc.c b/firmware/mainboard/stmf446retx/Src/usbd_desc.c similarity index 80% rename from firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_desc.c rename to firmware/mainboard/stmf446retx/Src/usbd_desc.c index cfe7b5ea..c992f3bd 100644 --- a/firmware/components/CAN/MainCAN/src/USB_DEVICE/App/usbd_desc.c +++ b/firmware/mainboard/stmf446retx/Src/usbd_desc.c @@ -1,8 +1,8 @@ /* USER CODE BEGIN Header */ /** ****************************************************************************** - * @file : App/usbd_desc.c - * @version : v2.0_Cube + * @file : usbd_desc.c + * @version : v1.0_Cube * @brief : This file implements the USB device descriptors. ****************************************************************************** * @attention @@ -62,13 +62,15 @@ * @{ */ -#define USBD_VID 1155 +#define USBD_VID 0xCAFE #define USBD_LANGID_STRING 1033 -#define USBD_MANUFACTURER_STRING "STMicroelectronics" -#define USBD_PID_FS 22336 -#define USBD_PRODUCT_STRING_FS "Modular Keyboard - Main Board" -#define USBD_CONFIGURATION_STRING_FS "CDC Config" -#define USBD_INTERFACE_STRING_FS "CDC Interface" +#define USBD_MANUFACTURER_STRING "TeamSKBD" +#define USBD_PID_FS 22315 +#define USBD_PRODUCT_STRING_FS "MSKBD Mainboard" +#define USBD_CONFIGURATION_STRING_FS "HID Config" +#define USBD_INTERFACE_STRING_FS "HID Interface" + +#define USB_SIZ_BOS_DESC 0x0C /* USER CODE BEGIN PRIVATE_DEFINES */ @@ -119,6 +121,9 @@ uint8_t * USBD_FS_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length uint8_t * USBD_FS_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); uint8_t * USBD_FS_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); uint8_t * USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); +#if (USBD_LPM_ENABLED == 1) +uint8_t * USBD_FS_USR_BOSDescriptor(USBD_SpeedTypeDef speed, uint16_t *length); +#endif /* (USBD_LPM_ENABLED == 1) */ /** * @} @@ -138,6 +143,9 @@ USBD_DescriptorsTypeDef FS_Desc = , USBD_FS_SerialStrDescriptor , USBD_FS_ConfigStrDescriptor , USBD_FS_InterfaceStrDescriptor +#if (USBD_LPM_ENABLED == 1) +, USBD_FS_USR_BOSDescriptor +#endif /* (USBD_LPM_ENABLED == 1) */ }; #if defined ( __ICCARM__ ) /* IAR Compiler */ @@ -148,10 +156,16 @@ __ALIGN_BEGIN uint8_t USBD_FS_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END = { 0x12, /*bLength */ USB_DESC_TYPE_DEVICE, /*bDescriptorType*/ +#if (USBD_LPM_ENABLED == 1) + 0x01, /*bcdUSB */ /* changed to USB version 2.01 + in order to support LPM L1 suspend + resume test of USBCV3.0*/ +#else 0x00, /*bcdUSB */ +#endif /* (USBD_LPM_ENABLED == 1) */ 0x02, - 0x02, /*bDeviceClass*/ - 0x02, /*bDeviceSubClass*/ + 0x00, /*bDeviceClass*/ + 0x00, /*bDeviceSubClass*/ 0x00, /*bDeviceProtocol*/ USB_MAX_EP0_SIZE, /*bMaxPacketSize*/ LOBYTE(USBD_VID), /*idVendor*/ @@ -167,6 +181,28 @@ __ALIGN_BEGIN uint8_t USBD_FS_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END = }; /* USB_DeviceDescriptor */ +/** BOS descriptor. */ +#if (USBD_LPM_ENABLED == 1) +#if defined ( __ICCARM__ ) /* IAR Compiler */ + #pragma data_alignment=4 +#endif /* defined ( __ICCARM__ ) */ +__ALIGN_BEGIN uint8_t USBD_FS_BOSDesc[USB_SIZ_BOS_DESC] __ALIGN_END = +{ + 0x5, + USB_DESC_TYPE_BOS, + 0xC, + 0x0, + 0x1, /* 1 device capability*/ + /* device capability*/ + 0x7, + USB_DEVICE_CAPABITY_TYPE, + 0x2, + 0x2, /* LPM capability bit set*/ + 0x0, + 0x0, + 0x0 +}; +#endif /* (USBD_LPM_ENABLED == 1) */ /** * @} @@ -329,6 +365,21 @@ uint8_t * USBD_FS_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *leng return USBD_StrDesc; } +#if (USBD_LPM_ENABLED == 1) +/** + * @brief Return the BOS descriptor + * @param speed : Current device speed + * @param length : Pointer to data length variable + * @retval Pointer to descriptor buffer + */ +uint8_t * USBD_FS_USR_BOSDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) +{ + UNUSED(speed); + *length = sizeof(USBD_FS_BOSDesc); + return (uint8_t*)USBD_FS_BOSDesc; +} +#endif /* (USBD_LPM_ENABLED == 1) */ + /** * @brief Create the serial number string descriptor * @param None diff --git a/firmware/mainboard/stmf446retx/lib/README b/firmware/mainboard/stmf446retx/lib/README new file mode 100644 index 00000000..93793971 --- /dev/null +++ b/firmware/mainboard/stmf446retx/lib/README @@ -0,0 +1,46 @@ + +This directory is intended for project specific (private) libraries. +PlatformIO will compile them to static libraries and link into the executable file. + +The source code of each library should be placed in a separate directory +("lib/your_library_name/[Code]"). + +For example, see the structure of the following example libraries `Foo` and `Bar`: + +|--lib +| | +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| | |- library.json (optional. for custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html +| | +| |--Foo +| | |- Foo.c +| | |- Foo.h +| | +| |- README --> THIS FILE +| +|- platformio.ini +|--src + |- main.c + +Example contents of `src/main.c` using Foo and Bar: +``` +#include +#include + +int main (void) +{ + ... +} + +``` + +The PlatformIO Library Dependency Finder will find automatically dependent +libraries by scanning project source files. + +More information about PlatformIO Library Dependency Finder +- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/firmware/mainboard/stmf446retx/mainboard-stmf446re.ioc b/firmware/mainboard/stmf446retx/mainboard-stmf446re.ioc new file mode 100644 index 00000000..17b42249 --- /dev/null +++ b/firmware/mainboard/stmf446retx/mainboard-stmf446re.ioc @@ -0,0 +1,172 @@ +#MicroXplorer Configuration settings - do not modify +CAD.formats= +CAD.pinconfig= +CAD.provider= +CAN1.BS1=CAN_BS1_16TQ +CAN1.BS2=CAN_BS2_7TQ +CAN1.CalculateBaudRate=249999 +CAN1.CalculateTimeBit=4000 +CAN1.CalculateTimeQuantum=166.66666666666669 +CAN1.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate,Prescaler,BS1,BS2 +CAN1.Prescaler=6 +File.Version=6 +GPIO.groupedBy=Group By Peripherals +KeepUserPlacement=false +Mcu.CPN=STM32F446RET6 +Mcu.Family=STM32F4 +Mcu.IP0=CAN1 +Mcu.IP1=NVIC +Mcu.IP2=RCC +Mcu.IP3=SYS +Mcu.IP4=USB_DEVICE +Mcu.IP5=USB_OTG_FS +Mcu.IPNb=6 +Mcu.Name=STM32F446R(C-E)Tx +Mcu.Package=LQFP64 +Mcu.Pin0=PH0-OSC_IN +Mcu.Pin1=PH1-OSC_OUT +Mcu.Pin10=PB8 +Mcu.Pin11=PB9 +Mcu.Pin12=VP_SYS_VS_Systick +Mcu.Pin13=VP_USB_DEVICE_VS_USB_DEVICE_HID_FS +Mcu.Pin2=PB13 +Mcu.Pin3=PB14 +Mcu.Pin4=PB15 +Mcu.Pin5=PC6 +Mcu.Pin6=PA11 +Mcu.Pin7=PA12 +Mcu.Pin8=PA13 +Mcu.Pin9=PA14 +Mcu.PinsNb=14 +Mcu.ThirdPartyNb=0 +Mcu.UserConstants= +Mcu.UserName=STM32F446RETx +MxCube.Version=6.13.0 +MxDb.Version=DB.6.0.130 +NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.CAN1_RX0_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true +NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.ForceEnableDMAVector=true +NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.OTG_FS_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true +NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 +NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false +NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +PA11.Mode=Device_Only +PA11.Signal=USB_OTG_FS_DM +PA12.Mode=Device_Only +PA12.Signal=USB_OTG_FS_DP +PA13.Mode=Serial_Wire +PA13.Signal=SYS_JTMS-SWDIO +PA14.Mode=Serial_Wire +PA14.Signal=SYS_JTCK-SWCLK +PB13.Locked=true +PB13.Signal=GPIO_Output +PB14.Locked=true +PB14.Signal=GPIO_Output +PB15.Locked=true +PB15.Signal=GPIO_Input +PB8.Mode=CAN_Activate +PB8.Signal=CAN1_RX +PB9.Mode=CAN_Activate +PB9.Signal=CAN1_TX +PC6.Locked=true +PC6.Signal=GPIO_Input +PH0-OSC_IN.Mode=HSE-External-Oscillator +PH0-OSC_IN.Signal=RCC_OSC_IN +PH1-OSC_OUT.Mode=HSE-External-Oscillator +PH1-OSC_OUT.Signal=RCC_OSC_OUT +PinOutPanel.RotationAngle=0 +ProjectManager.AskForMigrate=true +ProjectManager.BackupPrevious=false +ProjectManager.CompilerOptimize=6 +ProjectManager.ComputerToolchain=false +ProjectManager.CoupleFile=true +ProjectManager.CustomerFirmwarePackage= +ProjectManager.DefaultFWLocation=true +ProjectManager.DeletePrevious=true +ProjectManager.DeviceId=STM32F446RETx +ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.28.2 +ProjectManager.FreePins=false +ProjectManager.HalAssertFull=false +ProjectManager.HeapSize=0x200 +ProjectManager.KeepUserCode=true +ProjectManager.LastFirmware=true +ProjectManager.LibraryCopy=1 +ProjectManager.MainLocation=Core/Src +ProjectManager.NoMain=true +ProjectManager.PreviousToolchain= +ProjectManager.ProjectBuild=false +ProjectManager.ProjectFileName=mainboard-stmf446re.ioc +ProjectManager.ProjectName=mainboard-stmf446re +ProjectManager.ProjectStructure= +ProjectManager.RegisterCallBack= +ProjectManager.StackSize=0x400 +ProjectManager.TargetToolchain=CMake +ProjectManager.ToolChainLocation= +ProjectManager.UAScriptAfterPath= +ProjectManager.UAScriptBeforePath= +ProjectManager.UnderRoot=false +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_CAN1_Init-CAN1-false-HAL-true,4-MX_USB_DEVICE_Init-USB_DEVICE-false-HAL-false +RCC.AHBFreq_Value=72000000 +RCC.APB1CLKDivider=RCC_HCLK_DIV2 +RCC.APB1Freq_Value=36000000 +RCC.APB1TimFreq_Value=72000000 +RCC.APB2Freq_Value=72000000 +RCC.APB2TimFreq_Value=72000000 +RCC.CECFreq_Value=32786.88524590164 +RCC.CortexFreq_Value=72000000 +RCC.FCLKCortexFreq_Value=72000000 +RCC.FMPI2C1Freq_Value=36000000 +RCC.FamilyName=M +RCC.HCLKFreq_Value=72000000 +RCC.HSE_VALUE=8000000 +RCC.I2S1Freq_Value=48000000 +RCC.I2S2Freq_Value=48000000 +RCC.IPParameters=AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CECFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FMPI2C1Freq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,I2S1Freq_Value,I2S2Freq_Value,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLI2SPCLKFreq_Value,PLLI2SQCLKFreq_Value,PLLI2SRCLKFreq_Value,PLLI2SoutputFreq_Value,PLLM,PLLN,PLLQ,PLLQCLKFreq_Value,PLLRCLKFreq_Value,PLLSAIPCLKFreq_Value,PLLSAIQCLKFreq_Value,PLLSAIoutputFreq_Value,PWRFreq_Value,SAIAFreq_Value,SAIBFreq_Value,SDIOFreq_Value,SPDIFRXFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,USBFreq_Value,VCOI2SInputFreq_Value,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAIInputFreq_Value,VCOSAIOutputFreq_Value +RCC.MCO2PinFreq_Value=72000000 +RCC.PLLCLKFreq_Value=72000000 +RCC.PLLI2SPCLKFreq_Value=48000000 +RCC.PLLI2SQCLKFreq_Value=48000000 +RCC.PLLI2SRCLKFreq_Value=48000000 +RCC.PLLI2SoutputFreq_Value=48000000 +RCC.PLLM=4 +RCC.PLLN=72 +RCC.PLLQ=3 +RCC.PLLQCLKFreq_Value=48000000 +RCC.PLLRCLKFreq_Value=72000000 +RCC.PLLSAIPCLKFreq_Value=48000000 +RCC.PLLSAIQCLKFreq_Value=48000000 +RCC.PLLSAIoutputFreq_Value=48000000 +RCC.PWRFreq_Value=72000000 +RCC.SAIAFreq_Value=48000000 +RCC.SAIBFreq_Value=48000000 +RCC.SDIOFreq_Value=48000000 +RCC.SPDIFRXFreq_Value=72000000 +RCC.SYSCLKFreq_VALUE=72000000 +RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK +RCC.USBFreq_Value=48000000 +RCC.VCOI2SInputFreq_Value=500000 +RCC.VCOI2SOutputFreq_Value=96000000 +RCC.VCOInputFreq_Value=2000000 +RCC.VCOOutputFreq_Value=144000000 +RCC.VCOSAIInputFreq_Value=500000 +RCC.VCOSAIOutputFreq_Value=96000000 +USB_DEVICE.CLASS_NAME_FS=HID +USB_DEVICE.IPParameters=VirtualMode-HID_FS,VirtualModeFS,CLASS_NAME_FS,VID-HID_FS,MANUFACTURER_STRING-HID_FS,PRODUCT_STRING_HID_FS +USB_DEVICE.MANUFACTURER_STRING-HID_FS=TeamSKBD +USB_DEVICE.PRODUCT_STRING_HID_FS=MSKBD Mainboard +USB_DEVICE.VID-HID_FS=0xCAFE +USB_DEVICE.VirtualMode-HID_FS=Hid +USB_DEVICE.VirtualModeFS=Hid_FS +USB_OTG_FS.IPParameters=VirtualMode +USB_OTG_FS.VirtualMode=Device_Only +VP_SYS_VS_Systick.Mode=SysTick +VP_SYS_VS_Systick.Signal=SYS_VS_Systick +VP_USB_DEVICE_VS_USB_DEVICE_HID_FS.Mode=HID_FS +VP_USB_DEVICE_VS_USB_DEVICE_HID_FS.Signal=USB_DEVICE_VS_USB_DEVICE_HID_FS +board=custom diff --git a/firmware/mainboard/stmf446retx/platformio.ini b/firmware/mainboard/stmf446retx/platformio.ini new file mode 100644 index 00000000..854de7fa --- /dev/null +++ b/firmware/mainboard/stmf446retx/platformio.ini @@ -0,0 +1,19 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[env:nucleo_f446re] +platform = ststm32 +board = nucleo_f446re +framework = stm32cube +board_build.stm32cube.custom_config_header = yes + +[platformio] +include_dir = Inc +src_dir = Src diff --git a/firmware/mainboard/stmf446retx/stm32pio.ini b/firmware/mainboard/stmf446retx/stm32pio.ini new file mode 100644 index 00000000..4d7ac669 --- /dev/null +++ b/firmware/mainboard/stmf446retx/stm32pio.ini @@ -0,0 +1,19 @@ +[app] +platformio_cmd = platformio +cubemx_cmd = /opt/stm32cubemx/STM32CubeMX +java_cmd = java + +[project] +cubemx_script_content = config load ${ioc_file_absolute_path} + generate code ${project_dir_absolute_path} + exit +platformio_ini_patch_content = [platformio] + include_dir = Inc + src_dir = Src +board = nucleo_f446re +ioc_file = mainboard-stmf446re.ioc +cleanup_ignore = mainboard-stmf446re.ioc +cleanup_use_git = False +inspect_ioc = True +last_error = + diff --git a/firmware/mainboard/stmf446retx/test/README b/firmware/mainboard/stmf446retx/test/README new file mode 100644 index 00000000..9b1e87bc --- /dev/null +++ b/firmware/mainboard/stmf446retx/test/README @@ -0,0 +1,11 @@ + +This directory is intended for PlatformIO Test Runner and project tests. + +Unit Testing is a software testing method by which individual units of +source code, sets of one or more MCU program modules together with associated +control data, usage procedures, and operating procedures, are tested to +determine whether they are fit for use. Unit testing finds problems early +in the development cycle. + +More information about PlatformIO Unit Testing: +- https://docs.platformio.org/en/latest/advanced/unit-testing/index.html diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/.sconsign313.dblite b/firmware/modules/iidx/.pio/build/nucleo_f446re/.sconsign313.dblite new file mode 100644 index 00000000..55a87c52 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/.sconsign313.dblite differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkCMSISDevice/gcc/startup_stm32f446xx.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkCMSISDevice/gcc/startup_stm32f446xx.o new file mode 100644 index 00000000..9b847dcb Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkCMSISDevice/gcc/startup_stm32f446xx.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkCMSISDevice/system_stm32f4xx.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkCMSISDevice/system_stm32f4xx.o new file mode 100644 index 00000000..774d5941 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkCMSISDevice/system_stm32f4xx.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal.o new file mode 100644 index 00000000..3e90467b Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_adc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_adc.o new file mode 100644 index 00000000..6b62deeb Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_adc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_adc_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_adc_ex.o new file mode 100644 index 00000000..c14d0125 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_adc_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_can.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_can.o new file mode 100644 index 00000000..ac2a3eb6 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_can.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cec.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cec.o new file mode 100644 index 00000000..088d5e26 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cec.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cortex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cortex.o new file mode 100644 index 00000000..3a35e575 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cortex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_crc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_crc.o new file mode 100644 index 00000000..9417a7c3 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_crc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cryp.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cryp.o new file mode 100644 index 00000000..5a9f3e0e Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cryp.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cryp_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cryp_ex.o new file mode 100644 index 00000000..1ebbc341 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_cryp_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dac.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dac.o new file mode 100644 index 00000000..f60c0c0c Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dac.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dac_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dac_ex.o new file mode 100644 index 00000000..4969dfc7 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dac_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dcmi.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dcmi.o new file mode 100644 index 00000000..ce27d1d6 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dcmi.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dcmi_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dcmi_ex.o new file mode 100644 index 00000000..83b4ac66 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dcmi_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dfsdm.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dfsdm.o new file mode 100644 index 00000000..ff825cd8 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dfsdm.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dma.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dma.o new file mode 100644 index 00000000..dc8a38de Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dma.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dma2d.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dma2d.o new file mode 100644 index 00000000..b56658f0 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dma2d.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dma_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dma_ex.o new file mode 100644 index 00000000..eda4c881 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dma_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dsi.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dsi.o new file mode 100644 index 00000000..c1552e58 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_dsi.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_eth.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_eth.o new file mode 100644 index 00000000..d1d222e1 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_eth.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_exti.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_exti.o new file mode 100644 index 00000000..97bbb1bd Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_exti.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_flash.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_flash.o new file mode 100644 index 00000000..41829db5 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_flash.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_flash_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_flash_ex.o new file mode 100644 index 00000000..dff09682 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_flash_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_flash_ramfunc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_flash_ramfunc.o new file mode 100644 index 00000000..e3f460b9 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_flash_ramfunc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpi2c.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpi2c.o new file mode 100644 index 00000000..30b2f986 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpi2c.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpi2c_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpi2c_ex.o new file mode 100644 index 00000000..6c2f592e Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpi2c_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpsmbus.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpsmbus.o new file mode 100644 index 00000000..e8544086 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpsmbus.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpsmbus_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpsmbus_ex.o new file mode 100644 index 00000000..46f6a162 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_fmpsmbus_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_gpio.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_gpio.o new file mode 100644 index 00000000..c4299f22 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_gpio.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_hash.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_hash.o new file mode 100644 index 00000000..02e79816 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_hash.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_hash_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_hash_ex.o new file mode 100644 index 00000000..f056a35d Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_hash_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_hcd.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_hcd.o new file mode 100644 index 00000000..3ee6934e Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_hcd.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2c.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2c.o new file mode 100644 index 00000000..a85095c7 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2c.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2c_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2c_ex.o new file mode 100644 index 00000000..74b893ff Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2c_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2s.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2s.o new file mode 100644 index 00000000..f301d832 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2s.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2s_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2s_ex.o new file mode 100644 index 00000000..2d41de24 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_i2s_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_irda.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_irda.o new file mode 100644 index 00000000..39f24612 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_irda.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_iwdg.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_iwdg.o new file mode 100644 index 00000000..6fb746bd Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_iwdg.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_lptim.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_lptim.o new file mode 100644 index 00000000..a273fd4c Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_lptim.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_ltdc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_ltdc.o new file mode 100644 index 00000000..2bf945ac Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_ltdc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_ltdc_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_ltdc_ex.o new file mode 100644 index 00000000..f400e90d Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_ltdc_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_mmc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_mmc.o new file mode 100644 index 00000000..fa427d72 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_mmc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_nand.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_nand.o new file mode 100644 index 00000000..e64143ad Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_nand.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_nor.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_nor.o new file mode 100644 index 00000000..84c7b613 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_nor.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pccard.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pccard.o new file mode 100644 index 00000000..8e732a96 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pccard.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pcd.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pcd.o new file mode 100644 index 00000000..58977944 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pcd.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pcd_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pcd_ex.o new file mode 100644 index 00000000..5188b8c4 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pcd_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pwr.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pwr.o new file mode 100644 index 00000000..ea6a9bd9 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pwr.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pwr_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pwr_ex.o new file mode 100644 index 00000000..ac4344ee Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_pwr_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_qspi.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_qspi.o new file mode 100644 index 00000000..422f61fd Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_qspi.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rcc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rcc.o new file mode 100644 index 00000000..ff5aeb0e Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rcc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rcc_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rcc_ex.o new file mode 100644 index 00000000..fc9882e9 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rcc_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rng.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rng.o new file mode 100644 index 00000000..d836b327 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rng.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rtc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rtc.o new file mode 100644 index 00000000..a5adbeb4 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rtc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rtc_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rtc_ex.o new file mode 100644 index 00000000..46d28496 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_rtc_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sai.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sai.o new file mode 100644 index 00000000..d53aff4c Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sai.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sai_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sai_ex.o new file mode 100644 index 00000000..a37db089 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sai_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sd.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sd.o new file mode 100644 index 00000000..21470d80 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sd.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sdram.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sdram.o new file mode 100644 index 00000000..88daf1d3 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sdram.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_smartcard.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_smartcard.o new file mode 100644 index 00000000..3d6bb2aa Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_smartcard.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_smbus.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_smbus.o new file mode 100644 index 00000000..bbd112a4 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_smbus.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_spdifrx.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_spdifrx.o new file mode 100644 index 00000000..2c80e82e Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_spdifrx.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_spi.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_spi.o new file mode 100644 index 00000000..30d866f2 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_spi.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sram.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sram.o new file mode 100644 index 00000000..63aca403 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_sram.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_tim.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_tim.o new file mode 100644 index 00000000..9e5d7561 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_tim.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_tim_ex.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_tim_ex.o new file mode 100644 index 00000000..4c0f94bf Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_tim_ex.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_uart.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_uart.o new file mode 100644 index 00000000..4ffbe3a7 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_uart.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_usart.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_usart.o new file mode 100644 index 00000000..3269742a Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_usart.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_wwdg.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_wwdg.o new file mode 100644 index 00000000..54e33c64 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_hal_wwdg.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_adc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_adc.o new file mode 100644 index 00000000..1f6dac97 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_adc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_crc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_crc.o new file mode 100644 index 00000000..6750bc14 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_crc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_dac.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_dac.o new file mode 100644 index 00000000..b024b79b Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_dac.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_dma.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_dma.o new file mode 100644 index 00000000..e89daf99 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_dma.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_dma2d.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_dma2d.o new file mode 100644 index 00000000..3bb327cd Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_dma2d.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_exti.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_exti.o new file mode 100644 index 00000000..e2df4ae9 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_exti.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_fmc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_fmc.o new file mode 100644 index 00000000..3a95ee53 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_fmc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_fmpi2c.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_fmpi2c.o new file mode 100644 index 00000000..4ed26162 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_fmpi2c.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_fsmc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_fsmc.o new file mode 100644 index 00000000..aadf6b28 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_fsmc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_gpio.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_gpio.o new file mode 100644 index 00000000..9ad63427 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_gpio.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_i2c.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_i2c.o new file mode 100644 index 00000000..0fd271b2 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_i2c.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_lptim.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_lptim.o new file mode 100644 index 00000000..2d283086 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_lptim.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_pwr.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_pwr.o new file mode 100644 index 00000000..b5caa430 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_pwr.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_rcc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_rcc.o new file mode 100644 index 00000000..f16f2448 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_rcc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_rng.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_rng.o new file mode 100644 index 00000000..ef82496f Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_rng.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_rtc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_rtc.o new file mode 100644 index 00000000..a1764be3 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_rtc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_sdmmc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_sdmmc.o new file mode 100644 index 00000000..5bd03ad3 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_sdmmc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_spi.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_spi.o new file mode 100644 index 00000000..52ca0976 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_spi.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_tim.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_tim.o new file mode 100644 index 00000000..2b07f474 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_tim.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_usart.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_usart.o new file mode 100644 index 00000000..5ec4ac6f Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_usart.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_usb.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_usb.o new file mode 100644 index 00000000..080e8249 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_usb.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_utils.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_utils.o new file mode 100644 index 00000000..6ffe385a Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/FrameworkHALDriver/Src/stm32f4xx_ll_utils.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/firmware.bin b/firmware/modules/iidx/.pio/build/nucleo_f446re/firmware.bin new file mode 100755 index 00000000..0947949f Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/firmware.bin differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/firmware.elf b/firmware/modules/iidx/.pio/build/nucleo_f446re/firmware.elf new file mode 100755 index 00000000..82f49c48 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/firmware.elf differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/idedata.json b/firmware/modules/iidx/.pio/build/nucleo_f446re/idedata.json new file mode 100644 index 00000000..5c97fd36 --- /dev/null +++ b/firmware/modules/iidx/.pio/build/nucleo_f446re/idedata.json @@ -0,0 +1 @@ +{"build_type": "release", "env_name": "nucleo_f446re", "libsource_dirs": ["/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/lib", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/.pio/libdeps/nucleo_f446re", "/home/kymkim/.platformio/lib"], "defines": ["PLATFORMIO=60118", "STM32F4", "STM32F446xx", "USE_HAL_DRIVER", "F_CPU=180000000L"], "includes": {"build": ["/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/Include", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/Device/ST/STM32F4xx/Include", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/STM32F4xx_HAL_Driver/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/STM32F4xx_HAL_Driver/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/DSP/Include"], "compatlib": ["/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/Common", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ampire480272", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ampire640480", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/cs43l22", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/dp83848", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/exc7200", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ft3x67", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ft6x06", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/i3g4250d", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ili9325", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ili9341", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/l3gd20", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lan8742", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lis302dl", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lis3dsh", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ls016b8uy", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lsm303agr", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lsm303dlhc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/mfxstm32l152", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q128a", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q256a", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q512a", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/nt35510", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/otm8009a", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ov2640", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ov5640", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/s25fl512s", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/s5k5cag", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/st7735", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/st7789h2", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/stmpe1600", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/stmpe811", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ts3510", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/wm8994", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Adafruit_Shield", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/CPU", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/Fonts", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/Log", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Core/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Core/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Inc", "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc"], "toolchain": ["/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1", "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/7.2.1/arm-none-eabi", "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/lib/gcc/arm-none-eabi/7.2.1/include-fixed", "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/lib/gcc/arm-none-eabi/7.2.1/include", "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include"]}, "cc_flags": ["-mthumb", "-mcpu=cortex-m4", "-Os", "-ffunction-sections", "-fdata-sections", "-Wall", "-nostdlib"], "cxx_flags": ["-fno-rtti", "-fno-exceptions", "-mthumb", "-mcpu=cortex-m4", "-Os", "-ffunction-sections", "-fdata-sections", "-Wall", "-nostdlib"], "cc_path": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc", "cxx_path": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-g++", "gdb_path": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gdb", "prog_path": "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/.pio/build/nucleo_f446re/firmware.elf", "svd_path": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F446x.svd", "compiler_type": "gcc", "targets": [{"name": "upload", "group": "Platform", "title": "Upload"}], "extra": {"flash_images": []}} \ No newline at end of file diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib1a3/DFU/usbd_dfu.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib1a3/DFU/usbd_dfu.o new file mode 100644 index 00000000..185be0b0 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib1a3/DFU/usbd_dfu.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib1a3/libDFU.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib1a3/libDFU.a new file mode 100644 index 00000000..a768e5d9 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib1a3/libDFU.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc.o new file mode 100644 index 00000000..50d96e4c Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc_bot.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc_bot.o new file mode 100644 index 00000000..da58db89 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc_bot.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc_data.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc_data.o new file mode 100644 index 00000000..b605acf7 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc_data.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc_scsi.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc_scsi.o new file mode 100644 index 00000000..efe7f710 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/MSC/usbd_msc_scsi.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/libMSC.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/libMSC.a new file mode 100644 index 00000000..ee7fb303 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib2f9/libMSC.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/Core/usbd_core.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/Core/usbd_core.o new file mode 100644 index 00000000..3cc8a22e Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/Core/usbd_core.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/Core/usbd_ctlreq.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/Core/usbd_ctlreq.o new file mode 100644 index 00000000..967e7001 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/Core/usbd_ctlreq.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/Core/usbd_ioreq.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/Core/usbd_ioreq.o new file mode 100644 index 00000000..c938067f Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/Core/usbd_ioreq.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/libCore.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/libCore.a new file mode 100644 index 00000000..eeece933 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib337/libCore.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib389/Printer/usbd_printer.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib389/Printer/usbd_printer.o new file mode 100644 index 00000000..c562cc0c Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib389/Printer/usbd_printer.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib389/libPrinter.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib389/libPrinter.a new file mode 100644 index 00000000..43cd4cfc Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib389/libPrinter.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib401/HID/usbd_hid.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib401/HID/usbd_hid.o new file mode 100644 index 00000000..d17b2fd9 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib401/HID/usbd_hid.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib401/libHID.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib401/libHID.a new file mode 100644 index 00000000..0d024b2b Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib401/libHID.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib420/CCID/usbd_ccid.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib420/CCID/usbd_ccid.o new file mode 100644 index 00000000..883f126a Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib420/CCID/usbd_ccid.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib420/CCID/usbd_ccid_cmd.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib420/CCID/usbd_ccid_cmd.o new file mode 100644 index 00000000..8d84512a Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib420/CCID/usbd_ccid_cmd.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib420/libCCID.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib420/libCCID.a new file mode 100644 index 00000000..26af712c Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib420/libCCID.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib4a5/CustomHID/usbd_customhid.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib4a5/CustomHID/usbd_customhid.o new file mode 100644 index 00000000..dfe900ad Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib4a5/CustomHID/usbd_customhid.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib4a5/libCustomHID.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib4a5/libCustomHID.a new file mode 100644 index 00000000..d3a5ad1a Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib4a5/libCustomHID.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib7dc/CDC_RNDIS/usbd_cdc_rndis.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib7dc/CDC_RNDIS/usbd_cdc_rndis.o new file mode 100644 index 00000000..38a4c465 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib7dc/CDC_RNDIS/usbd_cdc_rndis.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib7dc/libCDC_RNDIS.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib7dc/libCDC_RNDIS.a new file mode 100644 index 00000000..c0402c9a Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib7dc/libCDC_RNDIS.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib840/CompositeBuilder/usbd_composite_builder.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib840/CompositeBuilder/usbd_composite_builder.o new file mode 100644 index 00000000..d3453ff8 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib840/CompositeBuilder/usbd_composite_builder.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/lib840/libCompositeBuilder.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib840/libCompositeBuilder.a new file mode 100644 index 00000000..1f8808ea Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/lib840/libCompositeBuilder.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/libFrameworkCMSISDevice.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/libFrameworkCMSISDevice.a new file mode 100644 index 00000000..ab1ac005 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/libFrameworkCMSISDevice.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/MTP/usbd_mtp.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/MTP/usbd_mtp.o new file mode 100644 index 00000000..d219c167 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/MTP/usbd_mtp.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/MTP/usbd_mtp_opt.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/MTP/usbd_mtp_opt.o new file mode 100644 index 00000000..81e7f02a Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/MTP/usbd_mtp_opt.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/MTP/usbd_mtp_storage.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/MTP/usbd_mtp_storage.o new file mode 100644 index 00000000..97f39af4 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/MTP/usbd_mtp_storage.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/libMTP.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/libMTP.a new file mode 100644 index 00000000..bf001657 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/liba1a/libMTP.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/libad8/VIDEO/usbd_video.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/libad8/VIDEO/usbd_video.o new file mode 100644 index 00000000..c1269ada Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/libad8/VIDEO/usbd_video.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/libad8/libVIDEO.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/libad8/libVIDEO.a new file mode 100644 index 00000000..e442dff3 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/libad8/libVIDEO.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/libb6b/CDC_ECM/usbd_cdc_ecm.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/libb6b/CDC_ECM/usbd_cdc_ecm.o new file mode 100644 index 00000000..1ed55a70 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/libb6b/CDC_ECM/usbd_cdc_ecm.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/libb6b/libCDC_ECM.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/libb6b/libCDC_ECM.a new file mode 100644 index 00000000..496a6335 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/libb6b/libCDC_ECM.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/libdb3/AUDIO/usbd_audio.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/libdb3/AUDIO/usbd_audio.o new file mode 100644 index 00000000..c35f3906 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/libdb3/AUDIO/usbd_audio.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/libdb3/libAUDIO.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/libdb3/libAUDIO.a new file mode 100644 index 00000000..bed0d8f0 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/libdb3/libAUDIO.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/libe2d/CDC/usbd_cdc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/libe2d/CDC/usbd_cdc.o new file mode 100644 index 00000000..9f778f1a Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/libe2d/CDC/usbd_cdc.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/libe2d/libCDC.a b/firmware/modules/iidx/.pio/build/nucleo_f446re/libe2d/libCDC.a new file mode 100644 index 00000000..6367f84a Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/libe2d/libCDC.a differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/src/can.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/can.o new file mode 100644 index 00000000..3946817a Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/can.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/src/gpio.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/gpio.o new file mode 100644 index 00000000..5162bfc0 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/gpio.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/src/main.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/main.o new file mode 100644 index 00000000..3284a6a4 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/main.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/src/stm32f4xx_hal_msp.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/stm32f4xx_hal_msp.o new file mode 100644 index 00000000..0e927e10 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/stm32f4xx_hal_msp.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/src/stm32f4xx_it.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/stm32f4xx_it.o new file mode 100644 index 00000000..8db1ebc8 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/stm32f4xx_it.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/src/tim.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/tim.o new file mode 100644 index 00000000..e7fcdbce Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/tim.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usart.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usart.o new file mode 100644 index 00000000..6f236360 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usart.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usb_device.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usb_device.o new file mode 100644 index 00000000..caf3a290 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usb_device.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usbd_conf.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usbd_conf.o new file mode 100644 index 00000000..697916c7 Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usbd_conf.o differ diff --git a/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usbd_desc.o b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usbd_desc.o new file mode 100644 index 00000000..a714c02f Binary files /dev/null and b/firmware/modules/iidx/.pio/build/nucleo_f446re/src/usbd_desc.o differ diff --git a/firmware/modules/iidx/.pio/build/project.checksum b/firmware/modules/iidx/.pio/build/project.checksum new file mode 100644 index 00000000..281720df --- /dev/null +++ b/firmware/modules/iidx/.pio/build/project.checksum @@ -0,0 +1 @@ +c92a24b1dfac819ce5f8946b4dba5660f8b26468 \ No newline at end of file diff --git a/firmware/modules/iidx/.vscode/c_cpp_properties.json b/firmware/modules/iidx/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..44af6ef1 --- /dev/null +++ b/firmware/modules/iidx/.vscode/c_cpp_properties.json @@ -0,0 +1,210 @@ +// +// !!! WARNING !!! AUTO-GENERATED FILE! +// PLEASE DO NOT MODIFY IT AND USE "platformio.ini": +// https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags +// +{ + "configurations": [ + { + "name": "PlatformIO", + "includePath": [ + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", + "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", + "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/Device/ST/STM32F4xx/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/STM32F4xx_HAL_Driver/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/STM32F4xx_HAL_Driver/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/DSP/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/Common", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ampire480272", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ampire640480", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/cs43l22", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/dp83848", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/exc7200", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ft3x67", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ft6x06", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/i3g4250d", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ili9325", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ili9341", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/l3gd20", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lan8742", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lis302dl", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lis3dsh", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ls016b8uy", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lsm303agr", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lsm303dlhc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/mfxstm32l152", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q128a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q256a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q512a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/nt35510", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/otm8009a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ov2640", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ov5640", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/s25fl512s", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/s5k5cag", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/st7735", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/st7789h2", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/stmpe1600", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/stmpe811", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ts3510", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/wm8994", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Adafruit_Shield", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/CPU", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/Fonts", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/Log", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Src", + "" + ], + "browse": { + "limitSymbolsToIncludedHeaders": true, + "path": [ + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CompositeBuilder/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/VIDEO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/Printer/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MTP/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_RNDIS/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC_ECM/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/CCID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Core/Src", + "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Src", + "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/Device/ST/STM32F4xx/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/STM32F4xx_HAL_Driver/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/STM32F4xx_HAL_Driver/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/CMSIS/DSP/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/Common", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ampire480272", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ampire640480", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/cs43l22", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/dp83848", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/exc7200", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ft3x67", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ft6x06", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/i3g4250d", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ili9325", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ili9341", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/l3gd20", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lan8742", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lis302dl", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lis3dsh", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ls016b8uy", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lsm303agr", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/lsm303dlhc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/mfxstm32l152", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q128a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q256a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/n25q512a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/nt35510", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/otm8009a", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ov2640", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ov5640", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/s25fl512s", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/s5k5cag", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/st7735", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/st7789h2", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/stmpe1600", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/stmpe811", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/ts3510", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Components/wm8994", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Drivers/BSP/Adafruit_Shield", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/CPU", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/Fonts", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Utilities/Log", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Device_Library/Class/BillBoard/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef4/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Src", + "" + ] + }, + "defines": [ + "PLATFORMIO=60118", + "STM32F4", + "STM32F446xx", + "USE_HAL_DRIVER", + "F_CPU=180000000L", + "" + ], + "compilerPath": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc", + "compilerArgs": [ + "-mthumb", + "-mcpu=cortex-m4", + "" + ] + } + ], + "version": 4 +} diff --git a/firmware/modules/iidx/.vscode/launch.json b/firmware/modules/iidx/.vscode/launch.json new file mode 100644 index 00000000..54ca5fef --- /dev/null +++ b/firmware/modules/iidx/.vscode/launch.json @@ -0,0 +1,47 @@ +// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY +// +// PlatformIO Debugging Solution +// +// Documentation: https://docs.platformio.org/en/latest/plus/debugging.html +// Configuration: https://docs.platformio.org/en/latest/projectconf/sections/env/options/debug/index.html + +{ + "version": "0.2.0", + "configurations": [ + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug", + "executable": "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/.pio/build/nucleo_f446re/firmware.elf", + "projectEnvName": "nucleo_f446re", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F446x.svd", + "preLaunchTask": { + "type": "PlatformIO", + "task": "Pre-Debug" + } + }, + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug (skip Pre-Debug)", + "executable": "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/.pio/build/nucleo_f446re/firmware.elf", + "projectEnvName": "nucleo_f446re", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F446x.svd" + }, + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug (without uploading)", + "executable": "/home/kymkim/Projects/modular-kbd/firmware/components/modules/iidx/.pio/build/nucleo_f446re/firmware.elf", + "projectEnvName": "nucleo_f446re", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F446x.svd", + "loadMode": "manual" + } + ] +} diff --git a/firmware/modules/sample_module/.gitignore b/firmware/modules/sample_module/.gitignore new file mode 100644 index 00000000..03f4a3c1 --- /dev/null +++ b/firmware/modules/sample_module/.gitignore @@ -0,0 +1 @@ +.pio diff --git a/firmware/modules/sample_module/.pio/build/project.checksum b/firmware/modules/sample_module/.pio/build/project.checksum new file mode 100644 index 00000000..4aff4c9d --- /dev/null +++ b/firmware/modules/sample_module/.pio/build/project.checksum @@ -0,0 +1 @@ +2c6909f9688b4acb0de5f41f5b66ff6d9ae65699 \ No newline at end of file diff --git a/firmware/modules/sample_module/.vscode/c_cpp_properties.json b/firmware/modules/sample_module/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..ff4ccd14 --- /dev/null +++ b/firmware/modules/sample_module/.vscode/c_cpp_properties.json @@ -0,0 +1,132 @@ +// +// !!! WARNING !!! AUTO-GENERATED FILE! +// PLEASE DO NOT MODIFY IT AND USE "platformio.ini": +// https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags +// +{ + "configurations": [ + { + "name": "PlatformIO", + "includePath": [ + "/home/kymkim/Projects/modular-kbd/firmware/components/modules/sample_module/Inc", + "/home/kymkim/Projects/modular-kbd/firmware/components/modules/sample_module/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/Device/ST/STM32F1xx/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/STM32F1xx_HAL_Driver/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/STM32F1xx_HAL_Driver/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/DSP/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/Common", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ak4343", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/cs43l22", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/hx8347d", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ili9320", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ili9325", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/lis302dl", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/spfd5408", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/st7735", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/stlm75", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/stmpe811", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Adafruit_Shield", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/CPU", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/Fonts", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/Log", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Src", + "" + ], + "browse": { + "limitSymbolsToIncludedHeaders": true, + "path": [ + "/home/kymkim/Projects/modular-kbd/firmware/components/modules/sample_module/Inc", + "/home/kymkim/Projects/modular-kbd/firmware/components/modules/sample_module/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/Device/ST/STM32F1xx/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/STM32F1xx_HAL_Driver/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/STM32F1xx_HAL_Driver/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/DSP/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/Common", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ak4343", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/cs43l22", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/hx8347d", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ili9320", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ili9325", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/lis302dl", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/spfd5408", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/st7735", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/stlm75", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/stmpe811", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Adafruit_Shield", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/CPU", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/Fonts", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/Log", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Src", + "" + ] + }, + "defines": [ + "PLATFORMIO=60118", + "STM32F1", + "STM32F103xB", + "USE_HAL_DRIVER", + "F_CPU=72000000L", + "" + ], + "compilerPath": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc", + "compilerArgs": [ + "-mthumb", + "-mcpu=cortex-m3", + "" + ] + } + ], + "version": 4 +} diff --git a/firmware/modules/sample_module/.vscode/extensions.json b/firmware/modules/sample_module/.vscode/extensions.json new file mode 100644 index 00000000..080e70d0 --- /dev/null +++ b/firmware/modules/sample_module/.vscode/extensions.json @@ -0,0 +1,10 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "platformio.platformio-ide" + ], + "unwantedRecommendations": [ + "ms-vscode.cpptools-extension-pack" + ] +} diff --git a/firmware/modules/sample_module/.vscode/launch.json b/firmware/modules/sample_module/.vscode/launch.json new file mode 100644 index 00000000..6d51024c --- /dev/null +++ b/firmware/modules/sample_module/.vscode/launch.json @@ -0,0 +1,47 @@ +// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY +// +// PlatformIO Debugging Solution +// +// Documentation: https://docs.platformio.org/en/latest/plus/debugging.html +// Configuration: https://docs.platformio.org/en/latest/projectconf/sections/env/options/debug/index.html + +{ + "version": "0.2.0", + "configurations": [ + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug", + "executable": "/home/kymkim/Projects/modular-kbd/firmware/components/modules/sample_module/.pio/build/bluepill_f103c8/firmware.elf", + "projectEnvName": "bluepill_f103c8", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F103xx.svd", + "preLaunchTask": { + "type": "PlatformIO", + "task": "Pre-Debug" + } + }, + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug (skip Pre-Debug)", + "executable": "/home/kymkim/Projects/modular-kbd/firmware/components/modules/sample_module/.pio/build/bluepill_f103c8/firmware.elf", + "projectEnvName": "bluepill_f103c8", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F103xx.svd" + }, + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug (without uploading)", + "executable": "/home/kymkim/Projects/modular-kbd/firmware/components/modules/sample_module/.pio/build/bluepill_f103c8/firmware.elf", + "projectEnvName": "bluepill_f103c8", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F103xx.svd", + "loadMode": "manual" + } + ] +} diff --git a/firmware/modules/sample_module/Inc/can.h b/firmware/modules/sample_module/Inc/can.h new file mode 100644 index 00000000..df48ffbd --- /dev/null +++ b/firmware/modules/sample_module/Inc/can.h @@ -0,0 +1,52 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file can.h + * @brief This file contains all the function prototypes for + * the can.c file + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __CAN_H__ +#define __CAN_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" + +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +extern CAN_HandleTypeDef hcan; + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +void MX_CAN_Init(void); + +/* USER CODE BEGIN Prototypes */ + +/* USER CODE END Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif /* __CAN_H__ */ + diff --git a/firmware/modules/sample_module/Inc/gpio.h b/firmware/modules/sample_module/Inc/gpio.h new file mode 100644 index 00000000..8ba7de1e --- /dev/null +++ b/firmware/modules/sample_module/Inc/gpio.h @@ -0,0 +1,49 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file gpio.h + * @brief This file contains all the function prototypes for + * the gpio.c file + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __GPIO_H__ +#define __GPIO_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" + +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +void MX_GPIO_Init(void); + +/* USER CODE BEGIN Prototypes */ + +/* USER CODE END Prototypes */ + +#ifdef __cplusplus +} +#endif +#endif /*__ GPIO_H__ */ + diff --git a/firmware/modules/sample_module/Inc/keycode.h b/firmware/modules/sample_module/Inc/keycode.h new file mode 100644 index 00000000..b619fdbd --- /dev/null +++ b/firmware/modules/sample_module/Inc/keycode.h @@ -0,0 +1,135 @@ +// Modifier Keys +#define KEY_LEFT_CTRL 0xE0 +#define KEY_LEFT_SHIFT 0xE1 +#define KEY_LEFT_ALT 0xE2 +#define KEY_LEFT_GUI 0xE3 +#define KEY_RIGHT_CTRL 0xE4 +#define KEY_RIGHT_SHIFT 0xE5 +#define KEY_RIGHT_ALT 0xE6 +#define KEY_RIGHT_GUI 0xE7 + +// Regular Keys (Usage ID 0x04–0x73) +#define KEY_A 0x04 +#define KEY_B 0x05 +#define KEY_C 0x06 +#define KEY_D 0x07 +#define KEY_E 0x08 +#define KEY_F 0x09 +#define KEY_G 0x0A +#define KEY_H 0x0B +#define KEY_I 0x0C +#define KEY_J 0x0D +#define KEY_K 0x0E +#define KEY_L 0x0F +#define KEY_M 0x10 +#define KEY_N 0x11 +#define KEY_O 0x12 +#define KEY_P 0x13 +#define KEY_Q 0x14 +#define KEY_R 0x15 +#define KEY_S 0x16 +#define KEY_T 0x17 +#define KEY_U 0x18 +#define KEY_V 0x19 +#define KEY_W 0x1A +#define KEY_X 0x1B +#define KEY_Y 0x1C +#define KEY_Z 0x1D + +#define KEY_1 0x1E +#define KEY_2 0x1F +#define KEY_3 0x20 +#define KEY_4 0x21 +#define KEY_5 0x22 +#define KEY_6 0x23 +#define KEY_7 0x24 +#define KEY_8 0x25 +#define KEY_9 0x26 +#define KEY_0 0x27 + +#define KEY_ENTER 0x28 +#define KEY_ESC 0x29 +#define KEY_BACKSPACE 0x2A +#define KEY_TAB 0x2B +#define KEY_SPACE 0x2C +#define KEY_MINUS 0x2D +#define KEY_EQUAL 0x2E +#define KEY_LEFT_BRACKET 0x2F +#define KEY_RIGHT_BRACKET 0x30 +#define KEY_BACKSLASH 0x31 +#define KEY_NON_US_HASH 0x32 +#define KEY_SEMICOLON 0x33 +#define KEY_APOSTROPHE 0x34 +#define KEY_GRAVE 0x35 +#define KEY_COMMA 0x36 +#define KEY_PERIOD 0x37 +#define KEY_SLASH 0x38 +#define KEY_CAPS_LOCK 0x39 + +// Function Keys +#define KEY_F1 0x3A +#define KEY_F2 0x3B +#define KEY_F3 0x3C +#define KEY_F4 0x3D +#define KEY_F5 0x3E +#define KEY_F6 0x3F +#define KEY_F7 0x40 +#define KEY_F8 0x41 +#define KEY_F9 0x42 +#define KEY_F10 0x43 +#define KEY_F11 0x44 +#define KEY_F12 0x45 + +#define KEY_PRINT_SCREEN 0x46 +#define KEY_SCROLL_LOCK 0x47 +#define KEY_PAUSE 0x48 + +// Navigation Keys +#define KEY_INSERT 0x49 +#define KEY_HOME 0x4A +#define KEY_PAGE_UP 0x4B +#define KEY_DELETE 0x4C +#define KEY_END 0x4D +#define KEY_PAGE_DOWN 0x4E + +#define KEY_RIGHT_ARROW 0x4F +#define KEY_LEFT_ARROW 0x50 +#define KEY_DOWN_ARROW 0x51 +#define KEY_UP_ARROW 0x52 + +// Keypad +#define KEY_NUM_LOCK 0x53 +#define KEYPAD_SLASH 0x54 +#define KEYPAD_ASTERISK 0x55 +#define KEYPAD_MINUS 0x56 +#define KEYPAD_PLUS 0x57 +#define KEYPAD_ENTER 0x58 +#define KEYPAD_1 0x59 +#define KEYPAD_2 0x5A +#define KEYPAD_3 0x5B +#define KEYPAD_4 0x5C +#define KEYPAD_5 0x5D +#define KEYPAD_6 0x5E +#define KEYPAD_7 0x5F +#define KEYPAD_8 0x60 +#define KEYPAD_9 0x61 +#define KEYPAD_0 0x62 +#define KEYPAD_DOT 0x63 + +// Misc/Non-US +#define KEY_NON_US_BACKSLASH 0x64 +#define KEY_APPLICATION 0x65 +#define KEY_POWER 0x66 +#define KEYPAD_EQUAL 0x67 +#define KEY_F13 0x68 +#define KEY_F14 0x69 +#define KEY_F15 0x6A +#define KEY_F16 0x6B +#define KEY_F17 0x6C +#define KEY_F18 0x6D +#define KEY_F19 0x6E +#define KEY_F20 0x6F +#define KEY_F21 0x70 +#define KEY_F22 0x71 +#define KEY_F23 0x72 +#define KEY_F24 0x73 \ No newline at end of file diff --git a/firmware/components/CAN/MainCAN/src/Core/Inc/main.h b/firmware/modules/sample_module/Inc/main.h similarity index 100% rename from firmware/components/CAN/MainCAN/src/Core/Inc/main.h rename to firmware/modules/sample_module/Inc/main.h diff --git a/firmware/components/CAN/MainCAN/src/Core/Inc/stm32f1xx_hal_conf.h b/firmware/modules/sample_module/Inc/stm32f1xx_hal_conf.h similarity index 97% rename from firmware/components/CAN/MainCAN/src/Core/Inc/stm32f1xx_hal_conf.h rename to firmware/modules/sample_module/Inc/stm32f1xx_hal_conf.h index 07dffd00..51a5d671 100644 --- a/firmware/components/CAN/MainCAN/src/Core/Inc/stm32f1xx_hal_conf.h +++ b/firmware/modules/sample_module/Inc/stm32f1xx_hal_conf.h @@ -53,7 +53,7 @@ /*#define HAL_NOR_MODULE_ENABLED */ /*#define HAL_NAND_MODULE_ENABLED */ /*#define HAL_PCCARD_MODULE_ENABLED */ -#define HAL_PCD_MODULE_ENABLED +/*#define HAL_PCD_MODULE_ENABLED */ /*#define HAL_HCD_MODULE_ENABLED */ /*#define HAL_PWR_MODULE_ENABLED */ /*#define HAL_RCC_MODULE_ENABLED */ diff --git a/firmware/components/CAN/MainCAN/src/Core/Inc/stm32f1xx_it.h b/firmware/modules/sample_module/Inc/stm32f1xx_it.h similarity index 95% rename from firmware/components/CAN/MainCAN/src/Core/Inc/stm32f1xx_it.h rename to firmware/modules/sample_module/Inc/stm32f1xx_it.h index 47a1a2ef..792479be 100644 --- a/firmware/components/CAN/MainCAN/src/Core/Inc/stm32f1xx_it.h +++ b/firmware/modules/sample_module/Inc/stm32f1xx_it.h @@ -56,7 +56,6 @@ void DebugMon_Handler(void); void PendSV_Handler(void); void SysTick_Handler(void); void USB_LP_CAN1_RX0_IRQHandler(void); -void CAN1_RX1_IRQHandler(void); /* USER CODE BEGIN EFP */ /* USER CODE END EFP */ diff --git a/firmware/modules/sample_module/Src/can.c b/firmware/modules/sample_module/Src/can.c new file mode 100644 index 00000000..64bc0c84 --- /dev/null +++ b/firmware/modules/sample_module/Src/can.c @@ -0,0 +1,122 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file can.c + * @brief This file provides code for the configuration + * of the CAN instances. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Includes ------------------------------------------------------------------*/ +#include "can.h" + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +CAN_HandleTypeDef hcan; + +/* CAN init function */ +void MX_CAN_Init(void) +{ + + /* USER CODE BEGIN CAN_Init 0 */ + + /* USER CODE END CAN_Init 0 */ + + /* USER CODE BEGIN CAN_Init 1 */ + + /* USER CODE END CAN_Init 1 */ + hcan.Instance = CAN1; + hcan.Init.Prescaler = 18; + hcan.Init.Mode = CAN_MODE_NORMAL; + hcan.Init.SyncJumpWidth = CAN_SJW_1TQ; + hcan.Init.TimeSeg1 = CAN_BS1_13TQ; + hcan.Init.TimeSeg2 = CAN_BS2_2TQ; + hcan.Init.TimeTriggeredMode = DISABLE; + hcan.Init.AutoBusOff = DISABLE; + hcan.Init.AutoWakeUp = DISABLE; + hcan.Init.AutoRetransmission = DISABLE; + hcan.Init.ReceiveFifoLocked = DISABLE; + hcan.Init.TransmitFifoPriority = DISABLE; + if (HAL_CAN_Init(&hcan) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN CAN_Init 2 */ + /* USER CODE END CAN_Init 2 */ + +} + +void HAL_CAN_MspInit(CAN_HandleTypeDef* canHandle) +{ + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if(canHandle->Instance==CAN1) + { + /* USER CODE BEGIN CAN1_MspInit 0 */ + + /* USER CODE END CAN1_MspInit 0 */ + /* CAN1 clock enable */ + __HAL_RCC_CAN1_CLK_ENABLE(); + + __HAL_RCC_GPIOB_CLK_ENABLE(); + /**CAN GPIO Configuration + PB8 ------> CAN_RX + PB9 ------> CAN_TX + */ + GPIO_InitStruct.Pin = GPIO_PIN_8; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = GPIO_PIN_9; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + __HAL_AFIO_REMAP_CAN1_2(); + /* USER CODE BEGIN CAN1_MspInit 1 */ + + /* USER CODE END CAN1_MspInit 1 */ + } +} + +void HAL_CAN_MspDeInit(CAN_HandleTypeDef* canHandle) +{ + + if(canHandle->Instance==CAN1) + { + /* USER CODE BEGIN CAN1_MspDeInit 0 */ + + /* USER CODE END CAN1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_CAN1_CLK_DISABLE(); + + /**CAN GPIO Configuration + PB8 ------> CAN_RX + PB9 ------> CAN_TX + */ + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8|GPIO_PIN_9); + + /* CAN1 interrupt Deinit */ + HAL_NVIC_DisableIRQ(CAN1_RX1_IRQn); + /* USER CODE BEGIN CAN1_MspDeInit 1 */ + + /* USER CODE END CAN1_MspDeInit 1 */ + } +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/firmware/modules/sample_module/Src/gpio.c b/firmware/modules/sample_module/Src/gpio.c new file mode 100644 index 00000000..8b6ba70b --- /dev/null +++ b/firmware/modules/sample_module/Src/gpio.c @@ -0,0 +1,72 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file gpio.c + * @brief This file provides code for the configuration + * of all used GPIO pins. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "gpio.h" + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/*----------------------------------------------------------------------------*/ +/* Configure GPIO */ +/*----------------------------------------------------------------------------*/ +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ + +/** Configure pins as + * Analog + * Input + * Output + * EVENT_OUT + * EXTI +*/ +void MX_GPIO_Init(void) +{ + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + + /* GPIO Ports Clock Enable */ + __HAL_RCC_GPIOD_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + __HAL_RCC_GPIOA_CLK_ENABLE(); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14|GPIO_PIN_15, GPIO_PIN_RESET); + + /*Configure GPIO pins : PB12 PB13 */ + GPIO_InitStruct.Pin = GPIO_PIN_12|GPIO_PIN_13; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_PULLDOWN; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /*Configure GPIO pins : PB14 PB15 */ + GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + +} + +/* USER CODE BEGIN 2 */ + +/* USER CODE END 2 */ diff --git a/firmware/modules/sample_module/Src/main.c b/firmware/modules/sample_module/Src/main.c new file mode 100644 index 00000000..6568dec6 --- /dev/null +++ b/firmware/modules/sample_module/Src/main.c @@ -0,0 +1,233 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.c + * @brief : Main program body + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#include "can.h" +#include "gpio.h" +#include "keycode.h" +#include +#include + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN PTD */ +typedef struct{ + GPIO_TypeDef* PORT; + uint16_t PIN; +} KbdPins; +/* USER CODE END PTD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ +#define COLS 2 +#define ROWS 2 +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ + +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +void SystemClock_Config(void); +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +CAN_TxHeaderTypeDef TxHeader; + +uint8_t TxData[8]; +uint32_t TxMailbox; + +uint8_t matrix[ROWS][COLS] = { + {KEY_M, KEY_K}, + {KEY_I, KEY_U} +}; +KbdPins row_pins[ROWS] = { + {GPIOB, GPIO_PIN_12}, + {GPIOB, GPIO_PIN_13} +}; +KbdPins col_pins[COLS] = { + {GPIOB, GPIO_PIN_14}, + {GPIOB, GPIO_PIN_15} +}; +bool matrix_state[2][2] = {false}; +bool last_state[2][2] = {false}; + +/* USER CODE END 0 */ + +/** + * @brief The application entry point. + * @retval int + */ +int main(void) +{ + + /* USER CODE BEGIN 1 */ + + /* USER CODE END 1 */ + + /* MCU Configuration--------------------------------------------------------*/ + + /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ + HAL_Init(); + + /* USER CODE BEGIN Init */ + + /* USER CODE END Init */ + + /* Configure the system clock */ + SystemClock_Config(); + + /* USER CODE BEGIN SysInit */ + + /* USER CODE END SysInit */ + + /* Initialize all configured peripherals */ + MX_GPIO_Init(); + MX_CAN_Init(); + /* USER CODE BEGIN 2 */ + HAL_CAN_Start(&hcan); + HAL_Delay(50); + + TxHeader.DLC = 2; + TxHeader.IDE = CAN_ID_STD; + TxHeader.RTR = CAN_RTR_DATA; + TxHeader.StdId = 0x100; + + TxData[0] = 0x00; + TxData[1] = 0x00; + + + /* USER CODE END 2 */ + + /* Infinite loop */ + /* USER CODE BEGIN WHILE */ + while (1) + { + /* USER CODE END WHILE */ + + //Matrix Scan + for(int col = 0; col < COLS; col++){ + HAL_GPIO_WritePin(col_pins[col].PORT, col_pins[col].PIN, GPIO_PIN_SET); + for(int row = 0; row < ROWS; row++){ + bool pressed = HAL_GPIO_ReadPin(row_pins[row].PORT, row_pins[row].PIN); + if(pressed != last_state[row][col]){ + last_state[row][col] = pressed; + TxData[1] = pressed ? 0x01:0x00; + TxData[0] = matrix[row][col]; + HAL_CAN_AddTxMessage(&hcan, &TxHeader, TxData, &TxMailbox); + memset(TxData,0,sizeof(TxData)); + } + } + HAL_GPIO_WritePin(col_pins[col].PORT, col_pins[col].PIN, GPIO_PIN_RESET); + } + HAL_Delay(20); + /* USER CODE BEGIN 3 */ + } + /* USER CODE END 3 */ +} + +/** + * @brief System Clock Configuration + * @retval None + */ +void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + Error_Handler(); + } + + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) + { + Error_Handler(); + } +} + +/* USER CODE BEGIN 4 */ + +/* USER CODE END 4 */ + +/** + * @brief This function is executed in case of error occurrence. + * @retval None + */ +void Error_Handler(void) +{ + /* USER CODE BEGIN Error_Handler_Debug */ + /* User can add his own implementation to report the HAL error return state */ + __disable_irq(); + while (1) + { + } + /* USER CODE END Error_Handler_Debug */ +} + +#ifdef USE_FULL_ASSERT +/** + * @brief Reports the name of the source file and the source line number + * where the assert_param error has occurred. + * @param file: pointer to the source file name + * @param line: assert_param error line source number + * @retval None + */ +void assert_failed(uint8_t *file, uint32_t line) +{ + /* USER CODE BEGIN 6 */ + /* User can add his own implementation to report the file name and line number, + ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ + /* USER CODE END 6 */ +} +#endif /* USE_FULL_ASSERT */ diff --git a/firmware/modules/sample_module/Src/stm32f1xx_hal_msp.c b/firmware/modules/sample_module/Src/stm32f1xx_hal_msp.c new file mode 100644 index 00000000..bcfdc02b --- /dev/null +++ b/firmware/modules/sample_module/Src/stm32f1xx_hal_msp.c @@ -0,0 +1,86 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f1xx_hal_msp.c + * @brief This file provides code for the MSP Initialization + * and de-Initialization codes. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN Define */ + +/* USER CODE END Define */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN Macro */ + +/* USER CODE END Macro */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* External functions --------------------------------------------------------*/ +/* USER CODE BEGIN ExternalFunctions */ + +/* USER CODE END ExternalFunctions */ + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ +/** + * Initializes the Global MSP. + */ +void HAL_MspInit(void) +{ + + /* USER CODE BEGIN MspInit 0 */ + + /* USER CODE END MspInit 0 */ + + __HAL_RCC_AFIO_CLK_ENABLE(); + __HAL_RCC_PWR_CLK_ENABLE(); + + /* System interrupt init*/ + + /** NOJTAG: JTAG-DP Disabled and SW-DP Enabled + */ + __HAL_AFIO_REMAP_SWJ_NOJTAG(); + + /* USER CODE BEGIN MspInit 1 */ + + /* USER CODE END MspInit 1 */ +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/firmware/components/CAN/MainCAN/src/Core/Src/stm32f1xx_it.c b/firmware/modules/sample_module/Src/stm32f1xx_it.c similarity index 90% rename from firmware/components/CAN/MainCAN/src/Core/Src/stm32f1xx_it.c rename to firmware/modules/sample_module/Src/stm32f1xx_it.c index 8990aa1a..c9c54c5c 100644 --- a/firmware/components/CAN/MainCAN/src/Core/Src/stm32f1xx_it.c +++ b/firmware/modules/sample_module/Src/stm32f1xx_it.c @@ -55,7 +55,6 @@ /* USER CODE END 0 */ /* External variables --------------------------------------------------------*/ -extern PCD_HandleTypeDef hpcd_USB_FS; extern CAN_HandleTypeDef hcan; /* USER CODE BEGIN EV */ @@ -208,26 +207,11 @@ void USB_LP_CAN1_RX0_IRQHandler(void) /* USER CODE END USB_LP_CAN1_RX0_IRQn 0 */ HAL_CAN_IRQHandler(&hcan); - HAL_PCD_IRQHandler(&hpcd_USB_FS); /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 1 */ /* USER CODE END USB_LP_CAN1_RX0_IRQn 1 */ } -/** - * @brief This function handles CAN RX1 interrupt. - */ -void CAN1_RX1_IRQHandler(void) -{ - /* USER CODE BEGIN CAN1_RX1_IRQn 0 */ - - /* USER CODE END CAN1_RX1_IRQn 0 */ - HAL_CAN_IRQHandler(&hcan); - /* USER CODE BEGIN CAN1_RX1_IRQn 1 */ - - /* USER CODE END CAN1_RX1_IRQn 1 */ -} - /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ diff --git a/firmware/modules/sample_module/lib/README b/firmware/modules/sample_module/lib/README new file mode 100644 index 00000000..93793971 --- /dev/null +++ b/firmware/modules/sample_module/lib/README @@ -0,0 +1,46 @@ + +This directory is intended for project specific (private) libraries. +PlatformIO will compile them to static libraries and link into the executable file. + +The source code of each library should be placed in a separate directory +("lib/your_library_name/[Code]"). + +For example, see the structure of the following example libraries `Foo` and `Bar`: + +|--lib +| | +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| | |- library.json (optional. for custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html +| | +| |--Foo +| | |- Foo.c +| | |- Foo.h +| | +| |- README --> THIS FILE +| +|- platformio.ini +|--src + |- main.c + +Example contents of `src/main.c` using Foo and Bar: +``` +#include +#include + +int main (void) +{ + ... +} + +``` + +The PlatformIO Library Dependency Finder will find automatically dependent +libraries by scanning project source files. + +More information about PlatformIO Library Dependency Finder +- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/firmware/modules/sample_module/platformio.ini b/firmware/modules/sample_module/platformio.ini new file mode 100644 index 00000000..5caa7100 --- /dev/null +++ b/firmware/modules/sample_module/platformio.ini @@ -0,0 +1,20 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[env:bluepill_f103c8] +platform = ststm32 +board = bluepill_f103c8 +framework = stm32cube +board_build.stm32cube.custom_config_header = yes +upload_protocol = stlink + +[platformio] +include_dir = Inc +src_dir = Src diff --git a/firmware/components/CAN/ModuleCAN/ModuleCAN.ioc b/firmware/modules/sample_module/sample_module.ioc similarity index 61% rename from firmware/components/CAN/ModuleCAN/ModuleCAN.ioc rename to firmware/modules/sample_module/sample_module.ioc index f941a242..6e016b6d 100644 --- a/firmware/components/CAN/ModuleCAN/ModuleCAN.ioc +++ b/firmware/modules/sample_module/sample_module.ioc @@ -2,11 +2,13 @@ CAD.formats= CAD.pinconfig= CAD.provider= -CAN.CalculateBaudRate=533333 -CAN.CalculateTimeBit=1875 -CAN.CalculateTimeQuantum=625.0 -CAN.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate,Prescaler -CAN.Prescaler=15 +CAN.BS1=CAN_BS1_13TQ +CAN.BS2=CAN_BS2_2TQ +CAN.CalculateBaudRate=125000 +CAN.CalculateTimeBit=8000 +CAN.CalculateTimeQuantum=500.0 +CAN.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate,Prescaler,BS1,BS2 +CAN.Prescaler=18 File.Version=6 GPIO.groupedBy= KeepUserPlacement=false @@ -16,31 +18,27 @@ Mcu.IP0=CAN Mcu.IP1=NVIC Mcu.IP2=RCC Mcu.IP3=SYS -Mcu.IP4=USB -Mcu.IP5=USB_DEVICE -Mcu.IPNb=6 +Mcu.IPNb=4 Mcu.Name=STM32F103C(8-B)Tx Mcu.Package=LQFP48 -Mcu.Pin0=PC13-TAMPER-RTC -Mcu.Pin1=PD0-OSC_IN +Mcu.Pin0=PD0-OSC_IN +Mcu.Pin1=PD1-OSC_OUT Mcu.Pin10=VP_SYS_VS_Systick -Mcu.Pin11=VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS -Mcu.Pin2=PD1-OSC_OUT -Mcu.Pin3=PA4 -Mcu.Pin4=PA11 -Mcu.Pin5=PA12 -Mcu.Pin6=PA13 -Mcu.Pin7=PA14 -Mcu.Pin8=PB8 -Mcu.Pin9=PB9 -Mcu.PinsNb=12 +Mcu.Pin2=PB12 +Mcu.Pin3=PB13 +Mcu.Pin4=PB14 +Mcu.Pin5=PB15 +Mcu.Pin6=PA11 +Mcu.Pin7=PA12 +Mcu.Pin8=PA13 +Mcu.Pin9=PA14 +Mcu.PinsNb=11 Mcu.ThirdPartyNb=0 Mcu.UserConstants= Mcu.UserName=STM32F103C8Tx MxCube.Version=6.13.0 MxDb.Version=DB.6.0.130 NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -NVIC.CAN1_RX1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.ForceEnableDMAVector=true NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false @@ -50,26 +48,28 @@ NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false -NVIC.USB_LP_CAN1_RX0_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true +NVIC.USB_LP_CAN1_RX0_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -PA11.Mode=Device -PA11.Signal=USB_DM -PA12.Mode=Device -PA12.Signal=USB_DP -PA13.Locked=true +PA11.Mode=CAN_Activate +PA11.Signal=CAN_RX +PA12.Mode=CAN_Activate +PA12.Signal=CAN_TX PA13.Mode=Serial_Wire PA13.Signal=SYS_JTMS-SWDIO -PA14.Locked=true PA14.Mode=Serial_Wire PA14.Signal=SYS_JTCK-SWCLK -PA4.Locked=true -PA4.Signal=GPIO_Input -PB8.Mode=CAN_Activate -PB8.Signal=CAN_RX -PB9.Mode=CAN_Activate -PB9.Signal=CAN_TX -PC13-TAMPER-RTC.Locked=true -PC13-TAMPER-RTC.Signal=GPIO_Output +PB12.GPIOParameters=GPIO_PuPd +PB12.GPIO_PuPd=GPIO_PULLDOWN +PB12.Locked=true +PB12.Signal=GPIO_Input +PB13.GPIOParameters=GPIO_PuPd +PB13.GPIO_PuPd=GPIO_PULLDOWN +PB13.Locked=true +PB13.Signal=GPIO_Input +PB14.Locked=true +PB14.Signal=GPIO_Output +PB15.Locked=true +PB15.Signal=GPIO_Output PD0-OSC_IN.Mode=HSE-External-Oscillator PD0-OSC_IN.Signal=RCC_OSC_IN PD1-OSC_OUT.Mode=HSE-External-Oscillator @@ -79,7 +79,7 @@ ProjectManager.AskForMigrate=true ProjectManager.BackupPrevious=false ProjectManager.CompilerOptimize=6 ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=false +ProjectManager.CoupleFile=true ProjectManager.CustomerFirmwarePackage= ProjectManager.DefaultFWLocation=true ProjectManager.DeletePrevious=true @@ -90,50 +90,43 @@ ProjectManager.HalAssertFull=false ProjectManager.HeapSize=0x200 ProjectManager.KeepUserCode=true ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=0 +ProjectManager.LibraryCopy=2 ProjectManager.MainLocation=Core/Src ProjectManager.NoMain=false ProjectManager.PreviousToolchain= ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=ModuleCAN.ioc -ProjectManager.ProjectName=ModuleCAN +ProjectManager.ProjectFileName=sample_module.ioc +ProjectManager.ProjectName=sample_module ProjectManager.ProjectStructure= ProjectManager.RegisterCallBack= ProjectManager.StackSize=0x400 -ProjectManager.TargetToolchain=EWARM V8.32 +ProjectManager.TargetToolchain=CMake ProjectManager.ToolChainLocation= ProjectManager.UAScriptAfterPath= ProjectManager.UAScriptBeforePath= ProjectManager.UnderRoot=false -ProjectManager.functionlistsort= -RCC.ADCFreqValue=24000000 -RCC.AHBFreq_Value=48000000 +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_CAN_Init-CAN-false-HAL-true +RCC.ADCFreqValue=36000000 +RCC.AHBFreq_Value=72000000 RCC.APB1CLKDivider=RCC_HCLK_DIV2 -RCC.APB1Freq_Value=24000000 -RCC.APB1TimFreq_Value=48000000 -RCC.APB2Freq_Value=48000000 -RCC.APB2TimFreq_Value=48000000 -RCC.FCLKCortexFreq_Value=48000000 +RCC.APB1Freq_Value=36000000 +RCC.APB1TimFreq_Value=72000000 +RCC.APB2Freq_Value=72000000 +RCC.APB2TimFreq_Value=72000000 +RCC.FCLKCortexFreq_Value=72000000 RCC.FamilyName=M -RCC.HCLKFreq_Value=48000000 +RCC.HCLKFreq_Value=72000000 RCC.IPParameters=ADCFreqValue,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLSourceVirtual,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USBFreq_Value,VCOOutput2Freq_Value -RCC.MCOFreq_Value=48000000 -RCC.PLLCLKFreq_Value=48000000 -RCC.PLLMCOFreq_Value=24000000 -RCC.PLLMUL=RCC_PLL_MUL6 +RCC.MCOFreq_Value=72000000 +RCC.PLLCLKFreq_Value=72000000 +RCC.PLLMCOFreq_Value=36000000 +RCC.PLLMUL=RCC_PLL_MUL9 RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE -RCC.SYSCLKFreq_VALUE=48000000 +RCC.SYSCLKFreq_VALUE=72000000 RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.TimSysFreq_Value=48000000 -RCC.USBFreq_Value=48000000 +RCC.TimSysFreq_Value=72000000 +RCC.USBFreq_Value=72000000 RCC.VCOOutput2Freq_Value=8000000 -USB_DEVICE.CLASS_NAME_FS=CDC -USB_DEVICE.IPParameters=VirtualMode,VirtualModeFS,CLASS_NAME_FS,PRODUCT_STRING_CDC_FS -USB_DEVICE.PRODUCT_STRING_CDC_FS=Modular Keyboard - Module VCOM -USB_DEVICE.VirtualMode=Cdc -USB_DEVICE.VirtualModeFS=Cdc_FS VP_SYS_VS_Systick.Mode=SysTick VP_SYS_VS_Systick.Signal=SYS_VS_Systick -VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Mode=CDC_FS -VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Signal=USB_DEVICE_VS_USB_DEVICE_CDC_FS board=custom diff --git a/firmware/modules/sample_module/stm32pio.ini b/firmware/modules/sample_module/stm32pio.ini new file mode 100644 index 00000000..7f889fd4 --- /dev/null +++ b/firmware/modules/sample_module/stm32pio.ini @@ -0,0 +1,19 @@ +[app] +platformio_cmd = platformio +cubemx_cmd = /opt/stm32cubemx/STM32CubeMX +java_cmd = java + +[project] +cubemx_script_content = config load ${ioc_file_absolute_path} + generate code ${project_dir_absolute_path} + exit +platformio_ini_patch_content = [platformio] + include_dir = Inc + src_dir = Src +board = bluepill_f103c8 +ioc_file = sample_module.ioc +cleanup_ignore = sample_module.ioc +cleanup_use_git = False +inspect_ioc = True +last_error = + diff --git a/firmware/modules/sample_module/test/README b/firmware/modules/sample_module/test/README new file mode 100644 index 00000000..9b1e87bc --- /dev/null +++ b/firmware/modules/sample_module/test/README @@ -0,0 +1,11 @@ + +This directory is intended for PlatformIO Test Runner and project tests. + +Unit Testing is a software testing method by which individual units of +source code, sets of one or more MCU program modules together with associated +control data, usage procedures, and operating procedures, are tested to +determine whether they are fit for use. Unit testing finds problems early +in the development cycle. + +More information about PlatformIO Unit Testing: +- https://docs.platformio.org/en/latest/advanced/unit-testing/index.html diff --git a/firmware/tester/canblinker/.gitignore b/firmware/tester/canblinker/.gitignore new file mode 100644 index 00000000..03f4a3c1 --- /dev/null +++ b/firmware/tester/canblinker/.gitignore @@ -0,0 +1 @@ +.pio diff --git a/firmware/tester/canblinker/.project b/firmware/tester/canblinker/.project new file mode 100644 index 00000000..fdb178ce --- /dev/null +++ b/firmware/tester/canblinker/.project @@ -0,0 +1,11 @@ + + + CAN-B + + + + + + + + diff --git a/firmware/tester/canblinker/.vscode/c_cpp_properties.json b/firmware/tester/canblinker/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..7c97866f --- /dev/null +++ b/firmware/tester/canblinker/.vscode/c_cpp_properties.json @@ -0,0 +1,132 @@ +// +// !!! WARNING !!! AUTO-GENERATED FILE! +// PLEASE DO NOT MODIFY IT AND USE "platformio.ini": +// https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags +// +{ + "configurations": [ + { + "name": "PlatformIO", + "includePath": [ + "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/can_testing/canblinker/Inc", + "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/can_testing/canblinker/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/Device/ST/STM32F1xx/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/STM32F1xx_HAL_Driver/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/STM32F1xx_HAL_Driver/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/DSP/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/Common", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ak4343", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/cs43l22", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/hx8347d", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ili9320", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ili9325", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/lis302dl", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/spfd5408", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/st7735", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/stlm75", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/stmpe811", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Adafruit_Shield", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/CPU", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/Fonts", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/Log", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Src", + "" + ], + "browse": { + "limitSymbolsToIncludedHeaders": true, + "path": [ + "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/can_testing/canblinker/Inc", + "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/can_testing/canblinker/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/Device/ST/STM32F1xx/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/STM32F1xx_HAL_Driver/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/STM32F1xx_HAL_Driver/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/CMSIS/DSP/Include", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/Common", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ak4343", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/cs43l22", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/hx8347d", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ili9320", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/ili9325", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/lis302dl", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/spfd5408", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/st7735", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/stlm75", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Components/stmpe811", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Drivers/BSP/Adafruit_Shield", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/CPU", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/Fonts", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Utilities/Log", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/DFU/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Core/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Core/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/AUDIO/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/HID/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Src", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Inc", + "/home/kymkim/.platformio/packages/framework-stm32cubef1/Middlewares/ST/STM32_USB_Host_Library/Class/MTP/Src", + "" + ] + }, + "defines": [ + "PLATFORMIO=60118", + "STM32F1", + "STM32F103xB", + "USE_HAL_DRIVER", + "F_CPU=72000000L", + "" + ], + "compilerPath": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc", + "compilerArgs": [ + "-mthumb", + "-mcpu=cortex-m3", + "" + ] + } + ], + "version": 4 +} diff --git a/firmware/tester/canblinker/.vscode/extensions.json b/firmware/tester/canblinker/.vscode/extensions.json new file mode 100644 index 00000000..080e70d0 --- /dev/null +++ b/firmware/tester/canblinker/.vscode/extensions.json @@ -0,0 +1,10 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "platformio.platformio-ide" + ], + "unwantedRecommendations": [ + "ms-vscode.cpptools-extension-pack" + ] +} diff --git a/firmware/tester/canblinker/.vscode/launch.json b/firmware/tester/canblinker/.vscode/launch.json new file mode 100644 index 00000000..0aecebeb --- /dev/null +++ b/firmware/tester/canblinker/.vscode/launch.json @@ -0,0 +1,47 @@ +// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY +// +// PlatformIO Debugging Solution +// +// Documentation: https://docs.platformio.org/en/latest/plus/debugging.html +// Configuration: https://docs.platformio.org/en/latest/projectconf/sections/env/options/debug/index.html + +{ + "version": "0.2.0", + "configurations": [ + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug", + "executable": "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/can_testing/canblinker/.pio/build/bluepill_f103c8/firmware.elf", + "projectEnvName": "bluepill_f103c8", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F103xx.svd", + "preLaunchTask": { + "type": "PlatformIO", + "task": "Pre-Debug" + } + }, + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug (skip Pre-Debug)", + "executable": "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/can_testing/canblinker/.pio/build/bluepill_f103c8/firmware.elf", + "projectEnvName": "bluepill_f103c8", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F103xx.svd" + }, + { + "type": "platformio-debug", + "request": "launch", + "name": "PIO Debug (without uploading)", + "executable": "/home/kymkim/Projects/CSULB/modular-kbd/firmware/components/can_testing/canblinker/.pio/build/bluepill_f103c8/firmware.elf", + "projectEnvName": "bluepill_f103c8", + "toolchainBinDir": "/home/kymkim/.platformio/packages/toolchain-gccarmnoneeabi/bin", + "internalConsoleOptions": "openOnSessionStart", + "svdPath": "/home/kymkim/.platformio/platforms/ststm32/misc/svd/STM32F103xx.svd", + "loadMode": "manual" + } + ] +} diff --git a/firmware/components/CAN/MainCAN/src/MainCAN.ioc b/firmware/tester/canblinker/CAN-B.ioc similarity index 68% rename from firmware/components/CAN/MainCAN/src/MainCAN.ioc rename to firmware/tester/canblinker/CAN-B.ioc index d97d52e4..5c8dabbd 100644 --- a/firmware/components/CAN/MainCAN/src/MainCAN.ioc +++ b/firmware/tester/canblinker/CAN-B.ioc @@ -2,11 +2,14 @@ CAD.formats= CAD.pinconfig= CAD.provider= -CAN.CalculateBaudRate=533333 -CAN.CalculateTimeBit=1875 -CAN.CalculateTimeQuantum=625.0 -CAN.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate,Prescaler -CAN.Prescaler=15 +CAN.BS1=CAN_BS1_13TQ +CAN.BS2=CAN_BS2_2TQ +CAN.CalculateBaudRate=125000 +CAN.CalculateTimeBit=8000 +CAN.CalculateTimeQuantum=500.0 +CAN.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate,Prescaler,SJW,BS1,BS2 +CAN.Prescaler=18 +CAN.SJW=CAN_SJW_1TQ File.Version=6 GPIO.groupedBy= KeepUserPlacement=false @@ -16,23 +19,19 @@ Mcu.IP0=CAN Mcu.IP1=NVIC Mcu.IP2=RCC Mcu.IP3=SYS -Mcu.IP4=USB -Mcu.IP5=USB_DEVICE -Mcu.IPNb=6 +Mcu.IPNb=4 Mcu.Name=STM32F103C(8-B)Tx Mcu.Package=LQFP48 Mcu.Pin0=PC13-TAMPER-RTC Mcu.Pin1=PD0-OSC_IN -Mcu.Pin10=VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS Mcu.Pin2=PD1-OSC_OUT -Mcu.Pin3=PA11 -Mcu.Pin4=PA12 -Mcu.Pin5=PA13 -Mcu.Pin6=PA14 -Mcu.Pin7=PB8 -Mcu.Pin8=PB9 -Mcu.Pin9=VP_SYS_VS_Systick -Mcu.PinsNb=11 +Mcu.Pin3=PA13 +Mcu.Pin4=PA14 +Mcu.Pin5=PB7 +Mcu.Pin6=PB8 +Mcu.Pin7=PB9 +Mcu.Pin8=VP_SYS_VS_Systick +Mcu.PinsNb=9 Mcu.ThirdPartyNb=0 Mcu.UserConstants= Mcu.UserName=STM32F103C8Tx @@ -41,6 +40,7 @@ MxDb.Version=DB.6.0.130 NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.CAN1_RX1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.EXTI9_5_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true NVIC.ForceEnableDMAVector=true NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false @@ -49,18 +49,19 @@ NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false -NVIC.USB_LP_CAN1_RX0_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -PA11.Mode=Device -PA11.Signal=USB_DM -PA12.Mode=Device -PA12.Signal=USB_DP PA13.Mode=Serial_Wire PA13.Signal=SYS_JTMS-SWDIO PA14.Mode=Serial_Wire PA14.Signal=SYS_JTCK-SWCLK +PB7.GPIOParameters=GPIO_PuPd +PB7.GPIO_PuPd=GPIO_PULLDOWN +PB7.Locked=true +PB7.Signal=GPXTI7 +PB8.Locked=true PB8.Mode=CAN_Activate PB8.Signal=CAN_RX +PB9.Locked=true PB9.Mode=CAN_Activate PB9.Signal=CAN_TX PC13-TAMPER-RTC.Locked=true @@ -74,7 +75,7 @@ ProjectManager.AskForMigrate=true ProjectManager.BackupPrevious=false ProjectManager.CompilerOptimize=6 ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=false +ProjectManager.CoupleFile=true ProjectManager.CustomerFirmwarePackage= ProjectManager.DefaultFWLocation=true ProjectManager.DeletePrevious=true @@ -85,50 +86,45 @@ ProjectManager.HalAssertFull=false ProjectManager.HeapSize=0x200 ProjectManager.KeepUserCode=true ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=2 +ProjectManager.LibraryCopy=0 ProjectManager.MainLocation=Core/Src -ProjectManager.NoMain=false +ProjectManager.NoMain=true ProjectManager.PreviousToolchain= ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=MainCAN.ioc -ProjectManager.ProjectName=MainCAN +ProjectManager.ProjectFileName=CAN-B.ioc +ProjectManager.ProjectName=CAN-B ProjectManager.ProjectStructure= ProjectManager.RegisterCallBack= ProjectManager.StackSize=0x400 -ProjectManager.TargetToolchain=EWARM V8.32 +ProjectManager.TargetToolchain=CMake ProjectManager.ToolChainLocation= ProjectManager.UAScriptAfterPath= ProjectManager.UAScriptBeforePath= ProjectManager.UnderRoot=false -ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_CAN_Init-CAN-false-HAL-true,4-MX_USB_DEVICE_Init-USB_DEVICE-false-HAL-false -RCC.ADCFreqValue=24000000 -RCC.AHBFreq_Value=48000000 +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_CAN_Init-CAN-false-HAL-true +RCC.ADCFreqValue=36000000 +RCC.AHBFreq_Value=72000000 RCC.APB1CLKDivider=RCC_HCLK_DIV2 -RCC.APB1Freq_Value=24000000 -RCC.APB1TimFreq_Value=48000000 -RCC.APB2Freq_Value=48000000 -RCC.APB2TimFreq_Value=48000000 -RCC.FCLKCortexFreq_Value=48000000 +RCC.APB1Freq_Value=36000000 +RCC.APB1TimFreq_Value=72000000 +RCC.APB2Freq_Value=72000000 +RCC.APB2TimFreq_Value=72000000 +RCC.FCLKCortexFreq_Value=72000000 RCC.FamilyName=M -RCC.HCLKFreq_Value=48000000 +RCC.HCLKFreq_Value=72000000 RCC.IPParameters=ADCFreqValue,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLSourceVirtual,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USBFreq_Value,VCOOutput2Freq_Value -RCC.MCOFreq_Value=48000000 -RCC.PLLCLKFreq_Value=48000000 -RCC.PLLMCOFreq_Value=24000000 -RCC.PLLMUL=RCC_PLL_MUL6 +RCC.MCOFreq_Value=72000000 +RCC.PLLCLKFreq_Value=72000000 +RCC.PLLMCOFreq_Value=36000000 +RCC.PLLMUL=RCC_PLL_MUL9 RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE -RCC.SYSCLKFreq_VALUE=48000000 +RCC.SYSCLKFreq_VALUE=72000000 RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.TimSysFreq_Value=48000000 -RCC.USBFreq_Value=48000000 +RCC.TimSysFreq_Value=72000000 +RCC.USBFreq_Value=72000000 RCC.VCOOutput2Freq_Value=8000000 -USB_DEVICE.CLASS_NAME_FS=CDC -USB_DEVICE.IPParameters=VirtualMode,VirtualModeFS,CLASS_NAME_FS,PRODUCT_STRING_CDC_FS -USB_DEVICE.PRODUCT_STRING_CDC_FS=Modular Keyboard - Main Board -USB_DEVICE.VirtualMode=Cdc -USB_DEVICE.VirtualModeFS=Cdc_FS +SH.GPXTI7.0=GPIO_EXTI7 +SH.GPXTI7.ConfNb=1 VP_SYS_VS_Systick.Mode=SysTick VP_SYS_VS_Systick.Signal=SYS_VS_Systick -VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Mode=CDC_FS -VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Signal=USB_DEVICE_VS_USB_DEVICE_CDC_FS board=custom diff --git a/firmware/tester/canblinker/Inc/can.h b/firmware/tester/canblinker/Inc/can.h new file mode 100644 index 00000000..df48ffbd --- /dev/null +++ b/firmware/tester/canblinker/Inc/can.h @@ -0,0 +1,52 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file can.h + * @brief This file contains all the function prototypes for + * the can.c file + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __CAN_H__ +#define __CAN_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" + +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +extern CAN_HandleTypeDef hcan; + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +void MX_CAN_Init(void); + +/* USER CODE BEGIN Prototypes */ + +/* USER CODE END Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif /* __CAN_H__ */ + diff --git a/firmware/tester/canblinker/Inc/gpio.h b/firmware/tester/canblinker/Inc/gpio.h new file mode 100644 index 00000000..8ba7de1e --- /dev/null +++ b/firmware/tester/canblinker/Inc/gpio.h @@ -0,0 +1,49 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file gpio.h + * @brief This file contains all the function prototypes for + * the gpio.c file + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __GPIO_H__ +#define __GPIO_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" + +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +void MX_GPIO_Init(void); + +/* USER CODE BEGIN Prototypes */ + +/* USER CODE END Prototypes */ + +#ifdef __cplusplus +} +#endif +#endif /*__ GPIO_H__ */ + diff --git a/firmware/tester/canblinker/Inc/main.h b/firmware/tester/canblinker/Inc/main.h new file mode 100644 index 00000000..e371ce56 --- /dev/null +++ b/firmware/tester/canblinker/Inc/main.h @@ -0,0 +1,69 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.h + * @brief : Header for main.c file. + * This file contains the common defines of the application. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __MAIN_H +#define __MAIN_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32f1xx_hal.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions prototypes ---------------------------------------------*/ +void Error_Handler(void); + +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +/* Private defines -----------------------------------------------------------*/ + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +#ifdef __cplusplus +} +#endif + +#endif /* __MAIN_H */ diff --git a/firmware/tester/canblinker/Inc/stm32f1xx_hal_conf.h b/firmware/tester/canblinker/Inc/stm32f1xx_hal_conf.h new file mode 100644 index 00000000..51a5d671 --- /dev/null +++ b/firmware/tester/canblinker/Inc/stm32f1xx_hal_conf.h @@ -0,0 +1,391 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f1xx_hal_conf.h + * @brief HAL configuration file. + ****************************************************************************** + * @attention + * + * Copyright (c) 2017 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F1xx_HAL_CONF_H +#define __STM32F1xx_HAL_CONF_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief This is the list of modules to be used in the HAL driver + */ + +#define HAL_MODULE_ENABLED + /*#define HAL_ADC_MODULE_ENABLED */ +/*#define HAL_CRYP_MODULE_ENABLED */ +#define HAL_CAN_MODULE_ENABLED +/*#define HAL_CAN_LEGACY_MODULE_ENABLED */ +/*#define HAL_CEC_MODULE_ENABLED */ +/*#define HAL_CORTEX_MODULE_ENABLED */ +/*#define HAL_CRC_MODULE_ENABLED */ +/*#define HAL_DAC_MODULE_ENABLED */ +/*#define HAL_DMA_MODULE_ENABLED */ +/*#define HAL_ETH_MODULE_ENABLED */ +/*#define HAL_FLASH_MODULE_ENABLED */ +#define HAL_GPIO_MODULE_ENABLED +/*#define HAL_I2C_MODULE_ENABLED */ +/*#define HAL_I2S_MODULE_ENABLED */ +/*#define HAL_IRDA_MODULE_ENABLED */ +/*#define HAL_IWDG_MODULE_ENABLED */ +/*#define HAL_NOR_MODULE_ENABLED */ +/*#define HAL_NAND_MODULE_ENABLED */ +/*#define HAL_PCCARD_MODULE_ENABLED */ +/*#define HAL_PCD_MODULE_ENABLED */ +/*#define HAL_HCD_MODULE_ENABLED */ +/*#define HAL_PWR_MODULE_ENABLED */ +/*#define HAL_RCC_MODULE_ENABLED */ +/*#define HAL_RTC_MODULE_ENABLED */ +/*#define HAL_SD_MODULE_ENABLED */ +/*#define HAL_MMC_MODULE_ENABLED */ +/*#define HAL_SDRAM_MODULE_ENABLED */ +/*#define HAL_SMARTCARD_MODULE_ENABLED */ +/*#define HAL_SPI_MODULE_ENABLED */ +/*#define HAL_SRAM_MODULE_ENABLED */ +/*#define HAL_TIM_MODULE_ENABLED */ +/*#define HAL_UART_MODULE_ENABLED */ +/*#define HAL_USART_MODULE_ENABLED */ +/*#define HAL_WWDG_MODULE_ENABLED */ + +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED + +/* ########################## Oscillator Values adaptation ####################*/ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) + #define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) + #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) + #define HSI_VALUE 8000000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) + #define LSI_VALUE 40000U /*!< LSI Typical Value in Hz */ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz + The real value may vary depending on the variations + in voltage and temperature. */ + +/** + * @brief External Low Speed oscillator (LSE) value. + * This value is used by the UART, RTC HAL module to compute the system frequency + */ +#if !defined (LSE_VALUE) + #define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#define TICK_INT_PRIORITY 15U /*!< tick interrupt priority (lowest by default) */ +#define USE_RTOS 0U +#define PREFETCH_ENABLE 1U + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1U */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB 8U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ + +/* DP83848_PHY_ADDRESS Address*/ +#define DP83848_PHY_ADDRESS 0x01U +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x000000FFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x00) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x01) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ +#define PHY_SR ((uint16_t)0x10U) /*!< PHY status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)0x0002U) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0004U) /*!< PHY Duplex mask */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ + +#define USE_SPI_CRC 0U + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32f1xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32f1xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32f1xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32f1xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED +#include "stm32f1xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED +#include "stm32f1xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED + #include "Legacy/stm32f1xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED +#include "stm32f1xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32f1xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32f1xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32f1xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED +#include "stm32f1xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32f1xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED +#include "stm32f1xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED +#include "stm32f1xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32f1xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED +#include "stm32f1xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32f1xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32f1xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32f1xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED +#include "stm32f1xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED +#include "stm32f1xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED +#include "stm32f1xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32f1xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32f1xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32f1xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32f1xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32f1xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32f1xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32f1xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32f1xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED +#include "stm32f1xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED +#include "stm32f1xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t* file, uint32_t line); +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F1xx_HAL_CONF_H */ + diff --git a/firmware/tester/canblinker/Inc/stm32f1xx_it.h b/firmware/tester/canblinker/Inc/stm32f1xx_it.h new file mode 100644 index 00000000..2ae46aa6 --- /dev/null +++ b/firmware/tester/canblinker/Inc/stm32f1xx_it.h @@ -0,0 +1,68 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f1xx_it.h + * @brief This file contains the headers of the interrupt handlers. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F1xx_IT_H +#define __STM32F1xx_IT_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions prototypes ---------------------------------------------*/ +void NMI_Handler(void); +void HardFault_Handler(void); +void MemManage_Handler(void); +void BusFault_Handler(void); +void UsageFault_Handler(void); +void SVC_Handler(void); +void DebugMon_Handler(void); +void PendSV_Handler(void); +void SysTick_Handler(void); +void CAN1_RX1_IRQHandler(void); +void EXTI9_5_IRQHandler(void); +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F1xx_IT_H */ diff --git a/firmware/tester/canblinker/Src/can.c b/firmware/tester/canblinker/Src/can.c new file mode 100644 index 00000000..779eff55 --- /dev/null +++ b/firmware/tester/canblinker/Src/can.c @@ -0,0 +1,137 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file can.c + * @brief This file provides code for the configuration + * of the CAN instances. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Includes ------------------------------------------------------------------*/ +#include "can.h" + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +CAN_HandleTypeDef hcan; + +/* CAN init function */ +void MX_CAN_Init(void) +{ + + /* USER CODE BEGIN CAN_Init 0 */ + + /* USER CODE END CAN_Init 0 */ + + /* USER CODE BEGIN CAN_Init 1 */ + + /* USER CODE END CAN_Init 1 */ + hcan.Instance = CAN1; + hcan.Init.Prescaler = 18; + hcan.Init.Mode = CAN_MODE_NORMAL; + hcan.Init.SyncJumpWidth = CAN_SJW_1TQ; + hcan.Init.TimeSeg1 = CAN_BS1_13TQ; + hcan.Init.TimeSeg2 = CAN_BS2_2TQ; + hcan.Init.TimeTriggeredMode = DISABLE; + hcan.Init.AutoBusOff = DISABLE; + hcan.Init.AutoWakeUp = DISABLE; + hcan.Init.AutoRetransmission = DISABLE; + hcan.Init.ReceiveFifoLocked = DISABLE; + hcan.Init.TransmitFifoPriority = DISABLE; + if (HAL_CAN_Init(&hcan) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN CAN_Init 2 */ + CAN_FilterTypeDef canfilterconf; + canfilterconf.FilterActivation = CAN_FILTER_ENABLE; + canfilterconf.FilterBank = 0; + canfilterconf.FilterFIFOAssignment = CAN_FILTER_FIFO1; + canfilterconf.FilterIdHigh = 0x399 << 5; + canfilterconf.FilterIdLow = 0x0000; + canfilterconf.FilterMaskIdHigh = 0x7FF << 5; + canfilterconf.FilterMaskIdLow = 0x0000; + canfilterconf.FilterMode = CAN_FILTERMODE_IDMASK; + canfilterconf.FilterScale = CAN_FILTERSCALE_32BIT; + HAL_CAN_ConfigFilter(&hcan, &canfilterconf); + /* USER CODE END CAN_Init 2 */ + +} + +void HAL_CAN_MspInit(CAN_HandleTypeDef* canHandle) +{ + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if(canHandle->Instance==CAN1) + { + /* USER CODE BEGIN CAN1_MspInit 0 */ + + /* USER CODE END CAN1_MspInit 0 */ + /* CAN1 clock enable */ + __HAL_RCC_CAN1_CLK_ENABLE(); + + __HAL_RCC_GPIOB_CLK_ENABLE(); + /**CAN GPIO Configuration + PB8 ------> CAN_RX + PB9 ------> CAN_TX + */ + GPIO_InitStruct.Pin = GPIO_PIN_8; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = GPIO_PIN_9; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + __HAL_AFIO_REMAP_CAN1_2(); + + /* CAN1 interrupt Init */ + HAL_NVIC_SetPriority(CAN1_RX1_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(CAN1_RX1_IRQn); + /* USER CODE BEGIN CAN1_MspInit 1 */ + + /* USER CODE END CAN1_MspInit 1 */ + } +} + +void HAL_CAN_MspDeInit(CAN_HandleTypeDef* canHandle) +{ + + if(canHandle->Instance==CAN1) + { + /* USER CODE BEGIN CAN1_MspDeInit 0 */ + + /* USER CODE END CAN1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_CAN1_CLK_DISABLE(); + + /**CAN GPIO Configuration + PB8 ------> CAN_RX + PB9 ------> CAN_TX + */ + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8|GPIO_PIN_9); + + /* CAN1 interrupt Deinit */ + HAL_NVIC_DisableIRQ(CAN1_RX1_IRQn); + /* USER CODE BEGIN CAN1_MspDeInit 1 */ + + /* USER CODE END CAN1_MspDeInit 1 */ + } +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/firmware/tester/canblinker/Src/gpio.c b/firmware/tester/canblinker/Src/gpio.c new file mode 100644 index 00000000..f590b159 --- /dev/null +++ b/firmware/tester/canblinker/Src/gpio.c @@ -0,0 +1,77 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file gpio.c + * @brief This file provides code for the configuration + * of all used GPIO pins. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "gpio.h" + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/*----------------------------------------------------------------------------*/ +/* Configure GPIO */ +/*----------------------------------------------------------------------------*/ +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ + +/** Configure pins as + * Analog + * Input + * Output + * EVENT_OUT + * EXTI +*/ +void MX_GPIO_Init(void) +{ + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + + /* GPIO Ports Clock Enable */ + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOD_CLK_ENABLE(); + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET); + + /*Configure GPIO pin : PC13 */ + GPIO_InitStruct.Pin = GPIO_PIN_13; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + /*Configure GPIO pin : PB7 */ + GPIO_InitStruct.Pin = GPIO_PIN_7; + GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + GPIO_InitStruct.Pull = GPIO_PULLDOWN; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /* EXTI interrupt init*/ + HAL_NVIC_SetPriority(EXTI9_5_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(EXTI9_5_IRQn); + +} + +/* USER CODE BEGIN 2 */ + +/* USER CODE END 2 */ diff --git a/firmware/tester/canblinker/Src/main.c b/firmware/tester/canblinker/Src/main.c new file mode 100644 index 00000000..566d2ea4 --- /dev/null +++ b/firmware/tester/canblinker/Src/main.c @@ -0,0 +1,227 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.c + * @brief : Main program body + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#include "can.h" +#include "gpio.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN PTD */ + +/* USER CODE END PTD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ + +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +void SystemClock_Config(void); +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +CAN_TxHeaderTypeDef TxHeader; +CAN_RxHeaderTypeDef RxHeader; + +uint8_t TxData[8]; +uint8_t RxData[8]; + +uint32_t TxMailbox; + +uint8_t isValidData; +uint8_t status; + +uint32_t lastDebounceTime = 0; +const uint32_t debounceDelay = 50; +uint8_t delayLED = 0 ; + +/* USER CODE END 0 */ + +/** + * @brief The application entry point. + * @retval int + */ +int main(void) +{ + + /* USER CODE BEGIN 1 */ + + /* USER CODE END 1 */ + + /* MCU Configuration--------------------------------------------------------*/ + + /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ + HAL_Init(); + + /* USER CODE BEGIN Init */ + + /* USER CODE END Init */ + + /* Configure the system clock */ + SystemClock_Config(); + + /* USER CODE BEGIN SysInit */ + + /* USER CODE END SysInit */ + + /* Initialize all configured peripherals */ + MX_GPIO_Init(); + MX_CAN_Init(); + /* USER CODE BEGIN 2 */ + + HAL_CAN_Start(&hcan); + HAL_CAN_ActivateNotification(&hcan, CAN_IT_RX_FIFO1_MSG_PENDING); + HAL_Delay(50); + + TxHeader.DLC = 1; + TxHeader.IDE = CAN_ID_STD; + TxHeader.RTR = CAN_RTR_DATA; + TxHeader.StdId = 0x399; + + TxData[0] = 0x1; + + // milliseconds + + /* USER CODE END 2 */ + + /* Infinite loop */ + /* USER CODE BEGIN WHILE */ + while (1) + { + HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13); + HAL_Delay(delayLED*100); + } + /* USER CODE END 3 */ +} + +void HAL_CAN_RxFifo1MsgPendingCallback(CAN_HandleTypeDef *hcan) +{ + HAL_CAN_GetRxMessage(hcan, CAN_RX_FIFO1, &RxHeader, RxData); + delayLED+=RxData[0]; +} + +void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) +{ + if(GPIO_Pin == GPIO_PIN_7) + { + uint32_t currentTime = HAL_GetTick(); + if ((currentTime - lastDebounceTime) > debounceDelay) + { + lastDebounceTime = currentTime; + TxData[0] ^= 1; + HAL_CAN_AddTxMessage(&hcan, &TxHeader, TxData, &TxMailbox); + } + } +} + + +/** + * @brief System Clock Configuration + * @retval None + */ +void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + Error_Handler(); + } + + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) + { + Error_Handler(); + } +} + +/* USER CODE BEGIN 4 */ + +/* USER CODE END 4 */ + +/** + * @brief This function is executed in case of error occurrence. + * @retval None + */ +void Error_Handler(void) +{ + /* USER CODE BEGIN Error_Handler_Debug */ + /* User can add his own implementation to report the HAL error return state */ + __disable_irq(); + while (1) + { + } + /* USER CODE END Error_Handler_Debug */ +} + +#ifdef USE_FULL_ASSERT +/** + * @brief Reports the name of the source file and the source line number + * where the assert_param error has occurred. + * @param file: pointer to the source file name + * @param line: assert_param error line source number + * @retval None + */ +void assert_failed(uint8_t *file, uint32_t line) +{ + /* USER CODE BEGIN 6 */ + /* User can add his own implementation to report the file name and line number, + ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ + /* USER CODE END 6 */ +} +#endif /* USE_FULL_ASSERT */ diff --git a/firmware/tester/canblinker/Src/stm32f1xx_hal_msp.c b/firmware/tester/canblinker/Src/stm32f1xx_hal_msp.c new file mode 100644 index 00000000..bcfdc02b --- /dev/null +++ b/firmware/tester/canblinker/Src/stm32f1xx_hal_msp.c @@ -0,0 +1,86 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f1xx_hal_msp.c + * @brief This file provides code for the MSP Initialization + * and de-Initialization codes. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN Define */ + +/* USER CODE END Define */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN Macro */ + +/* USER CODE END Macro */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* External functions --------------------------------------------------------*/ +/* USER CODE BEGIN ExternalFunctions */ + +/* USER CODE END ExternalFunctions */ + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ +/** + * Initializes the Global MSP. + */ +void HAL_MspInit(void) +{ + + /* USER CODE BEGIN MspInit 0 */ + + /* USER CODE END MspInit 0 */ + + __HAL_RCC_AFIO_CLK_ENABLE(); + __HAL_RCC_PWR_CLK_ENABLE(); + + /* System interrupt init*/ + + /** NOJTAG: JTAG-DP Disabled and SW-DP Enabled + */ + __HAL_AFIO_REMAP_SWJ_NOJTAG(); + + /* USER CODE BEGIN MspInit 1 */ + + /* USER CODE END MspInit 1 */ +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/firmware/tester/canblinker/Src/stm32f1xx_it.c b/firmware/tester/canblinker/Src/stm32f1xx_it.c new file mode 100644 index 00000000..dff63ba7 --- /dev/null +++ b/firmware/tester/canblinker/Src/stm32f1xx_it.c @@ -0,0 +1,231 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f1xx_it.c + * @brief Interrupt Service Routines. + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#include "stm32f1xx_it.h" +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/* External variables --------------------------------------------------------*/ +extern CAN_HandleTypeDef hcan; +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/******************************************************************************/ +/* Cortex-M3 Processor Interruption and Exception Handlers */ +/******************************************************************************/ +/** + * @brief This function handles Non maskable interrupt. + */ +void NMI_Handler(void) +{ + /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ + + /* USER CODE END NonMaskableInt_IRQn 0 */ + /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ + while (1) + { + } + /* USER CODE END NonMaskableInt_IRQn 1 */ +} + +/** + * @brief This function handles Hard fault interrupt. + */ +void HardFault_Handler(void) +{ + /* USER CODE BEGIN HardFault_IRQn 0 */ + + /* USER CODE END HardFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_HardFault_IRQn 0 */ + /* USER CODE END W1_HardFault_IRQn 0 */ + } +} + +/** + * @brief This function handles Memory management fault. + */ +void MemManage_Handler(void) +{ + /* USER CODE BEGIN MemoryManagement_IRQn 0 */ + + /* USER CODE END MemoryManagement_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ + /* USER CODE END W1_MemoryManagement_IRQn 0 */ + } +} + +/** + * @brief This function handles Prefetch fault, memory access fault. + */ +void BusFault_Handler(void) +{ + /* USER CODE BEGIN BusFault_IRQn 0 */ + + /* USER CODE END BusFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_BusFault_IRQn 0 */ + /* USER CODE END W1_BusFault_IRQn 0 */ + } +} + +/** + * @brief This function handles Undefined instruction or illegal state. + */ +void UsageFault_Handler(void) +{ + /* USER CODE BEGIN UsageFault_IRQn 0 */ + + /* USER CODE END UsageFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ + /* USER CODE END W1_UsageFault_IRQn 0 */ + } +} + +/** + * @brief This function handles System service call via SWI instruction. + */ +void SVC_Handler(void) +{ + /* USER CODE BEGIN SVCall_IRQn 0 */ + + /* USER CODE END SVCall_IRQn 0 */ + /* USER CODE BEGIN SVCall_IRQn 1 */ + + /* USER CODE END SVCall_IRQn 1 */ +} + +/** + * @brief This function handles Debug monitor. + */ +void DebugMon_Handler(void) +{ + /* USER CODE BEGIN DebugMonitor_IRQn 0 */ + + /* USER CODE END DebugMonitor_IRQn 0 */ + /* USER CODE BEGIN DebugMonitor_IRQn 1 */ + + /* USER CODE END DebugMonitor_IRQn 1 */ +} + +/** + * @brief This function handles Pendable request for system service. + */ +void PendSV_Handler(void) +{ + /* USER CODE BEGIN PendSV_IRQn 0 */ + + /* USER CODE END PendSV_IRQn 0 */ + /* USER CODE BEGIN PendSV_IRQn 1 */ + + /* USER CODE END PendSV_IRQn 1 */ +} + +/** + * @brief This function handles System tick timer. + */ +void SysTick_Handler(void) +{ + /* USER CODE BEGIN SysTick_IRQn 0 */ + + /* USER CODE END SysTick_IRQn 0 */ + HAL_IncTick(); + /* USER CODE BEGIN SysTick_IRQn 1 */ + + /* USER CODE END SysTick_IRQn 1 */ +} + +/******************************************************************************/ +/* STM32F1xx Peripheral Interrupt Handlers */ +/* Add here the Interrupt Handlers for the used peripherals. */ +/* For the available peripheral interrupt handler names, */ +/* please refer to the startup file (startup_stm32f1xx.s). */ +/******************************************************************************/ + +/** + * @brief This function handles CAN RX1 interrupt. + */ +void CAN1_RX1_IRQHandler(void) +{ + /* USER CODE BEGIN CAN1_RX1_IRQn 0 */ + + /* USER CODE END CAN1_RX1_IRQn 0 */ + HAL_CAN_IRQHandler(&hcan); + /* USER CODE BEGIN CAN1_RX1_IRQn 1 */ + + /* USER CODE END CAN1_RX1_IRQn 1 */ +} + +/** + * @brief This function handles EXTI line[9:5] interrupts. + */ +void EXTI9_5_IRQHandler(void) +{ + /* USER CODE BEGIN EXTI9_5_IRQn 0 */ + + /* USER CODE END EXTI9_5_IRQn 0 */ + HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_7); + /* USER CODE BEGIN EXTI9_5_IRQn 1 */ + + /* USER CODE END EXTI9_5_IRQn 1 */ +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/firmware/tester/canblinker/lib/README b/firmware/tester/canblinker/lib/README new file mode 100644 index 00000000..93793971 --- /dev/null +++ b/firmware/tester/canblinker/lib/README @@ -0,0 +1,46 @@ + +This directory is intended for project specific (private) libraries. +PlatformIO will compile them to static libraries and link into the executable file. + +The source code of each library should be placed in a separate directory +("lib/your_library_name/[Code]"). + +For example, see the structure of the following example libraries `Foo` and `Bar`: + +|--lib +| | +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| | |- library.json (optional. for custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html +| | +| |--Foo +| | |- Foo.c +| | |- Foo.h +| | +| |- README --> THIS FILE +| +|- platformio.ini +|--src + |- main.c + +Example contents of `src/main.c` using Foo and Bar: +``` +#include +#include + +int main (void) +{ + ... +} + +``` + +The PlatformIO Library Dependency Finder will find automatically dependent +libraries by scanning project source files. + +More information about PlatformIO Library Dependency Finder +- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/firmware/tester/canblinker/platformio.ini b/firmware/tester/canblinker/platformio.ini new file mode 100644 index 00000000..a010e57f --- /dev/null +++ b/firmware/tester/canblinker/platformio.ini @@ -0,0 +1,19 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[env:bluepill_f103c8] +platform = ststm32 +board = bluepill_f103c8 +framework = stm32cube +board_build.stm32cube.custom_config_header = yes + +[platformio] +include_dir = Inc +src_dir = Src diff --git a/firmware/tester/canblinker/stm32pio.ini b/firmware/tester/canblinker/stm32pio.ini new file mode 100644 index 00000000..c5bfa2e7 --- /dev/null +++ b/firmware/tester/canblinker/stm32pio.ini @@ -0,0 +1,18 @@ +[app] +platformio_cmd = platformio +cubemx_cmd = /opt/stm32cubemx/STM32CubeMX +java_cmd = java + +[project] +cubemx_script_content = config load ${ioc_file_absolute_path} + generate code ${project_dir_absolute_path} + exit +platformio_ini_patch_content = [platformio] + include_dir = Inc + src_dir = Src +board = bluepill_f103c8 +ioc_file = CAN-B.ioc +cleanup_ignore = CAN-B.ioc +cleanup_use_git = False +inspect_ioc = True + diff --git a/firmware/tester/canblinker/test/README b/firmware/tester/canblinker/test/README new file mode 100644 index 00000000..9b1e87bc --- /dev/null +++ b/firmware/tester/canblinker/test/README @@ -0,0 +1,11 @@ + +This directory is intended for PlatformIO Test Runner and project tests. + +Unit Testing is a software testing method by which individual units of +source code, sets of one or more MCU program modules together with associated +control data, usage procedures, and operating procedures, are tested to +determine whether they are fit for use. Unit testing finds problems early +in the development cycle. + +More information about PlatformIO Unit Testing: +- https://docs.platformio.org/en/latest/advanced/unit-testing/index.html