{"id":18650260,"url":"https://github.com/zuki/fatfs_usbhost","last_synced_at":"2025-11-05T11:30:28.845Z","repository":{"id":149401846,"uuid":"316668273","full_name":"zuki/fatfs_usbhost","owner":"zuki","description":"STM32_USB_HOST LibraryとFatFsを使ってUSBメモリを操作するSTM32CubeのプロジェクトをVSCodeとMakefileを使って開発できるようにする。","archived":false,"fork":false,"pushed_at":"2020-11-28T06:27:59.000Z","size":682,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T13:10:21.271Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zuki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-28T06:01:50.000Z","updated_at":"2020-11-28T06:31:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"33b0a2a6-4c93-4e5f-a485-47e6d96682ef","html_url":"https://github.com/zuki/fatfs_usbhost","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuki%2Ffatfs_usbhost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuki%2Ffatfs_usbhost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuki%2Ffatfs_usbhost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuki%2Ffatfs_usbhost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zuki","download_url":"https://codeload.github.com/zuki/fatfs_usbhost/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239457663,"owners_count":19642092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T06:43:05.545Z","updated_at":"2025-11-05T11:30:28.814Z","avatar_url":"https://github.com/zuki.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Makefileファイルで動かすSTM32F4-Discovery\n\nSTM32Cubeで作成したプロジェクトをMakefileでコマンドラインからmakeできるようにする。\n\n## プロジェクト: STM32_USB_Host_LibraryとFatFsを使ってUSBメモリを操作する\n\n\b`Controllerstech: Robotics Simpliefied`サイトの記事[STM32 USB HOST MSC](https://controllerstech.com/stm32-usb-host-msc/)をそのまま使用した。ビデオも非常に参考になった。\n\n## STM32_USB_Host_LibraryとFatFsを使うための処理の内容\n\nSTM32Cubeが作成したソースに上記サイトからダウンロードした３つのファイル`File_Handling.[ch]`と`usb_host.c`を追加または上書きした。変更があったファイルは`USB_HOST/App/usb_host.c`だけであり、\nこの中の`USBH_UserProcess()`関数に行いたい処理が追加されていた。個々の処理は関数化され、\n`Core/Src/File_Handling.c`にまとめられていた。\n\n## 実行結果\n\n```\nUSB mounted successfully...\nUSB  Total Size:        3908100\nUSB Free Space:         546628\nFile: //dspace-1.4.2-source.tar.gz\nDir: dspace-1.4.2-source\n\nDir: bin\n\n*/rootfile.txt* created successfully\n Now use Write_File to write data\nFile */rootfile.txt* CLOSED successfully\n\nOpening file--\u003e  */rootfile.txt*  To WRITE data in it\nFile */rootfile.txt* is WRITTEN and CLOSED successfully\n\n*/dir1* has been created successfully\n\n*dir1/dir1file.txt* created successfully\n Now use Write_File to write data\nFile *dir1/dir1file.txt* CLOSED successfully\n\nOpening file--\u003e  */dir1/dir1file.txt*  To WRITE data in it\nFile */dir1/dir1file.txt* is WRITTEN and CLOSED successfully\n\n*/dir2* has been created successfully\n\n*/dir2/subdir1* has been created successfully\n\n*/dir2/subdir1/dir2file.txt* created successfully\n Now use Write_File to write data\nFile */dir2/subdir1/dir2file.txt* CLOSED successfully\n\nOpening file--\u003e  */dir2/subdir1/dir2file.txt*  To WRITE data in it\nFile */dir2/subdir1/dir2file.txt* is WRITTEN and CLOSED successfully\n\nOpening file--\u003e  */rootfile.txt*  To UPDATE data in it\n*/rootfile.txt* UPDATED successfully\nFile */rootfile.txt* CLOSED successfully\n                                                 # \u003c= ここでUSBメモリを抜く\nUSB UNMOUNTED successfully...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuki%2Ffatfs_usbhost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzuki%2Ffatfs_usbhost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuki%2Ffatfs_usbhost/lists"}