Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Web開発の知見を活かして組み込み開発環境を整備した話_2021秋版

 Web開発の知見を活かして組み込み開発環境を整備した話_2021秋版

More Decks by 株式会社ビットキー / Bitkey Inc.

Other Decks in Technology

Transcript

  1. 2015 ࣾձਓͷελʔτ ৘ใܥͷେֶӃΛଔۀɺERPϕϯμʔʹब৬ ࣾ಺Ϋϥ΢υΛKubernetes/Go/Vue.jsͰߏங ௡ౡ խढ़ Masatoshi Tsushima 2004 ιϑτ΢ΣΞ։ൃͱͷग़ձ͍

    WebαΠτ΍ܞଳΞϓϦΛ࡞ͬͯ༡ΜͰ͍·ͨ͠ 2018ळ Bitkeyʹࢀը ౰ॳ͸bitkey platformͷ։ൃΛ୲౰ ओʹGoͰαʔόαΠυΛ։ൃ 2019ळ ϑΝʔϜ΢ΣΞνʔϜΛ্ཱͪ͛ bitlock LITEͷϑΝʔϜ΢ΣΞΛ಺੡Խ ݱࡏʹଓ͘։ൃελΠϧΛߏங 2020Ն ୈೋੈ୅ϩοΫσόΠεͷ։ൃ ಺੡Λલఏͱͨ͠ϑΝʔϜ΢ΣΞ։ൃ 2021य़ϦϦʔε
  2. ૊ΈࠐΈʹҠͬͯมΘͬͨ͜ͱ εϥΠυͷλΠτϧ 13 Code Web։ൃɿࣗ༝ͳΤσΟλͱϓϥάΠϯ ૊ΈࠐΈ։ൃɿಛघͳIDE Build Web։ൃɿCLIͷϏϧυπʔϧɺϏϧυεΫϦϓτɺ Live Reload

    ૊ΈࠐΈ։ൃɿϝχϡʔͷϘλϯʹϒϥοΫϘοΫεԽ Release Web։ൃɿCIύΠϓϥΠϯͰࣗಈԽ ૊ΈࠐΈ։ൃɿϦϦʔε࡞ۀΛखॱԽ Test Web APIɿॆ࣮ͨ͠൚༻πʔϧ (curl, Postman, Swagger UI…) BLEɿtelnet૬౰ͷπʔϧ͸͋Δ͕…ࣗ࡞͢Δʁ
  3. ୤IDEґଘ 17 IDEͷઃఆϑΝΠϧΛม׵ • Makefile ◦ CLIϕʔεͰ࠷খͷ։ൃ؀ڥΛఆٛ • VS Code

    ͷઃఆ ◦ σόοάͳͲɺҠߦલͷIDEͱಉ౳ͷػೳΛ࣮ݱ ίϯτϩʔϧՄೳͳϏϧυ ޻෉ͷ༨஍͕૿͑Δ ΤσΟλࣗ༝Խ ඪ४ͱͯ͠ͷ VS Code
  4. Մೳʹͳͬͨ޻෉ Ϟμϯͳ։ൃςΫχοΫΛͲΜͲΜऔΓࠐΉ 18 • ίʔυϑΥʔϚοτΛڧ੍ ◦ ClangFormatΛಋೖ ▪ ΤσΟλͷϓϥάΠϯ ▪

    ҕୗઌʹ΋ՄೳͳݶΓ͓ئ͍ ▪ CIͰνΣοΫ ◦ ϨϏϡʔָ͕ʹͳΔ ▪ ຊ࣭తͰ͸ͳ͍ࠩ෼͕ফ͑Δ ▪ ͠ΐʔ΋ͳ͍ࢦఠ͕ແ͘ͳΔ • ίʔυࣗಈੜ੒ ◦ BLEΛOpenAPIతͳ࢓༷͔Β ◦ ΫϥΠΞϯτ΋ࣗಈੜ੒ • ܯࠂΦϓγϣϯΛݫ͘͠ • υΩϡϝϯτͷੜ੒ ◦ DoxygenΛར༻ ◦ C/C++քͷJavadoc • C++17 ◦ ෦෼తʹಋೖ ◦ ϕΫτϧɾߦྻͷܭࢉʹར༻ ◦ constexprϥϜμˠؔ਺ϙΠϯλ • ϥΠϒϥϦ ◦ Git SubmoduleͰऔΓࠐΉ • ୯ମςετ ◦ ςετ༻ϏϧυΛ࣮ߦ • εχϖοτͷڞ༗ • σόοάϩάͷՃ޻
  5. ίʔυԽ͞ΕͨBLE API࢓༷ॻ ࢓༷͔ΒίʔυΛੜ੒ 19 C: ϦΫΤετϋϯυϥ Markdown: APIυΩϡϝϯτ TypeScript: ΫϥΠΞϯτCLI

    Python Markdown TypeScript C (Handler) σόΠε୯ಠͰςετ ΞϓϦͱૄ݁߹ͳ։ൃεέδϡʔϧ
  6. ϦϦʔεύΠϓϥΠϯΛ੔උ CI/CD for Embedded Systems 20 • ʮGitͰλάΛଧͭˠߋ৽༻ύοέʔδͷΞοϓϩʔυʯΛࣗಈԽ ◦ ։ൃऀ͸λάΛଧ͚ͭͩ

    ◦ ࣗಈͰνΣοΫɾϏϧυɾΞοϓϩʔυˠSlackʹ௨஌ • GitHub Workflows Λར༻ ◦ DockerΛ࢖ͬͨ࠶ݱੑͷߴ͍Ϗϧυ ◦ ޙ͔ΒݕূͰ͖Δ ίʔυԽ͞ΕͨϦϦʔε ϛεͷՄೳੑΛݮΒ͢
  7. Ͳ͏ͳ͔ͬͨʁ εϥΠυͷλΠτϧ 21 Code ׳Εͨ΋ͷΛ࢖͍͍ͨ →CLIͰߏஙɺࣗ෼ͷ࢖͏ΤσΟλͱ࿈ܞ Build ঢ়گʹԠͯ͡޻෉͍ͨ͠ →ίʔυԽ͞ΕͨϏϧυʹػೳΛ௥Ճ Release

    ࣗಈԽ͍ͨ͠ →։ൃ؀ڥͷCLIԽͰCI/CDύΠϓϥΠϯ΋ߏஙՄೳʹ Test εϚϗΞϓϦͱͷ૬ޓґଘΛղফ͍ͨ͠ →࢓༷͔ΒΫϥΠΞϯτΛࣗಈੜ੒ɺσόΠε୯ಠͰςετ
  8. 25