{"id":550,"date":"2015-10-02T02:23:50","date_gmt":"2015-10-02T11:23:50","guid":{"rendered":"\/blog\/?p=550"},"modified":"2023-09-21T09:38:12","modified_gmt":"2023-09-21T00:38:12","slug":"taranis-plus-opentx-%eb%b9%8c%eb%93%9c","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=550","title":{"rendered":"Taranis Plus OpenTX \ube4c\ub4dc"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>\u25a0 \ube4c\ub4dc \uc804 \uc900\ube44\uc0ac\ud56d\n\n1. \ud544\uc694\ud55c \ub9ac\ub205\uc2a4 \ud328\ud0a4\uc9c0 \uc124\uce58\nyum -y install git gcc gcc-c++ avr-gcc-c++ PyQt4 fox-devel avr-libc python-argparse\n\n2. \ud234\uccb4\uc778 \ub2e4\uc6b4\ub85c\ub4dc\nhttps:&#47;&#47;launchpad.net\/gcc-arm-embedded\n\uc5d0\uc11c gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 \ud30c\uc77c\uc744 \ub2e4\uc6b4\ub85c\ub4dc \ubc1b\ub294\ub2e4.\n\n\uc555\ucd95 \ud574\uc81c \ud6c4 \ub514\ub809\ud1a0\ub9ac \uba85\uc744 \ub2e8\uc21c\ud558\uac8c \ubcc0\uacbd\ud55c\ub2e4.\nmv gcc-arm-none-eabi-4_9-2015q3 gcc-arm-none-eabi\n\n3. opentx \uc18c\uc2a4\ucf54\ub4dc \ub2e4\uc6b4\ub85c\ub4dc\ngit clone https:\/\/github.com\/opentx\/opentx\ngit checkout master\n\n\u25a0 radio\/util\/taranisicons.py \uc624\ub958 \uc218\uc815 (\uacf5\ud1b5)\n\nQt \ubc84\uc804\uc774 4.8\uc774\ud558\uc774\uae30 \ub54c\ubb38\uc5d0 \uc0dd\uae30\ub294 \uc624\ub958\ub85c\u2026\n10\ubc88\uc9f8 \ub77c\uc778\uc744 \uc544\ub798\ucc98\ub7fc \uc218\uc815\ud55c\ub2e4.\n\n#image.fill(QtGui.QColor(255, 255, 255))\n\u2193 \uc544\ub798\uc640 \uac19\uc774 (QtGui.QColor(255, 255, 255))\u2192(3)\uc73c\ub85c \ubcc0\uacbd\ud55c\ub2e4.\n\nimage.fill(3)\n\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\n\n\u25b6 USB \uace0\uc7a5\uc744 \ud30c\uc6cc\ubc84\ud2bc\uc5d0 USB\uc0c1\ud0dc\ub97c \ubb34\uc2dc\ud558\ub3c4\ub85d \uc218\uc815-1 (opentx)\n\nradio\/src\/targets\/taranis\/pwr_driver.c\n\uac00\uc7a5 \uc544\ub798\uc5d0 \uc788\ub294 uint32_t pwrCheck() \ud568\uc218\uc758 \uc544\ub798 \ubd80\ubd84\uc744 \uc218\uc815\ud55c\ub2e4.\n\n#if defined(SIMU)\n  return e_power_on;\n#else\n  if (GPIO_ReadInputDataBit(PWR_GPIO, PWR_GPIO_PIN_SWITCH) == Bit_RESET)\n    return e_power_on;\n  else if (usbPlugged())\n    return e_power_usb;\n  else\n    return e_power_off;\n\n\n\u2193 \uc544\ub798\ucc98\ub7fc USB \ud50c\ub7ec\uadf8 \uccb4\ud06c\uc778\uc744 \uc704\ud55c 2\uc904\uc744 \uc8fc\uc11d\ucc98\ub9ac\ud55c\ub2e4.\n\n\n#if defined(SIMU)\n  return e_power_on;\n#else\n  if (GPIO_ReadInputDataBit(PWR_GPIO, PWR_GPIO_PIN_SWITCH) == Bit_RESET)\n    return e_power_on;\n\/\/  else if (usbPlugged())\n\/\/    return e_power_usb;\n  else\n    return e_power_off;\n\n\ub85c \uc218\uc815\ud55c\ub2e4.\n\n\n\u25b6 USB \uace0\uc7a5\uc744 \ud30c\uc6cc\ubc84\ud2bc\uc5d0 USB\uc0c1\ud0dc\ub97c \ubb34\uc2dc\ud558\ub3c4\ub85d \uc218\uc815-1 (bootloader)\n\nradio\/src\/targets\/taranis\/bootloader\/boot.cpp\n\uac00\uc7a5 \uc544\ub798\uc5d0 \uc788\ub294 main \ud568\uc218\uc758 \uc544\ub798 \ubd80\ubd84\uc744 \uc218\uc815\ud55c\ub2e4.\n\n    if (state != ST_FLASHING &amp;&amp; state != ST_USB) {\n#if defined(REV9E)\n      if (pwrPressed()) {\n#else\n      if (pwrCheck() == e_power_off) {\n#endif\n        lcdOff(); \/\/ this drains LCD caps\n        pwrOff();\n\n\n\u2193\uc544\ub798\ucc98\ub7fc \uccab if\ubb38\uc5d0\uc11c ST_USB \ube44\uad50\ubd80\ubd84\uc744 \uc81c\uac70\ud55c\ub2e4.\n\n    \/\/ if (state != ST_FLASHING &amp;&amp; state != ST_USB) {\n    if (state != ST_FLASHING) {\n#if defined(REV9E)\n      if (pwrPressed()) {\n#else\n      if (pwrCheck() == e_power_off) {\n#endif\n        lcdOff(); \/\/ this drains LCD caps\n        pwrOff();\n\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\n\n\u25b6 USB\ub97c \uc778\uc2dd\ud558\uc9c0 \ubabb\ud558\ub3c4\ub85d \uc218\uc815-1 (opentx)\n\nradio\/src\/targets\/taranis\/usb_driver.c\nint usbPlugged(void)\ub97c \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub3c4\ub85d \uc544\ub798\ucc98\ub7fc \uc218\uc815\ud55c\ub2e4.\n\nint usbPlugged(void)\n{\n  \/\/ debounce\n  static uint8_t debounced_state = 0;\n  static uint8_t last_state = 0;\n\n  return 0;\n\u2026\n\n\n\u25b6 bootloader\ub294 USB\ub97c \uc778\uc2dd\ud558\ub3c4\ub85d \uc218\uc815-2 (bootloader)\n\nradio\/src\/targets\/taranis\/usb_driver.c\uc5d0\uc11c \uc815\uc0c1\uc801\uc778 int usbPlugged(void) \ud568\uc218\ub97c\nradio\/src\/targets\/taranis\/bootloader\/boot.cpp\n\ub9e8 \uc717 \ubd80\ubd84\uc5d0 \ucd94\uac00\ud558\uace0 \uc774\ub984\uc744 \ubcc0\uacbd \ud6c4 radio\/src\/targets\/taranis\/bootloader\/boot.cpp\n\uc548\uc5d0 \ubaa8\ub4e0 \ud568\uc218\ub97c \uad50\uccb4\ud55c \ud568\uc218\uba85\uc73c\ub85c \ubcc0\uacbd\ud55c\ub2e4.\n\uc5d0\ub514\ud130\uc5d0\uc11c \"usbPlugged(\" \u2192 \"usbPlugged_hasu0707(\"\ub85c \ubb38\uc790\uc5f4 \uce58\ud658 \uc2e4\ud589\n\nint usbPlugged_hasu0707(void)\n{\n  \/\/ debounce\n  static uint8_t debounced_state = 0;\n  static uint8_t last_state = 0;\n\u2026\n\n\n\u25a0 \ube4c\ub4dc\n\nbuild.sh\ub97c \uc544\ub798\uc640 \uac19\uc774 \uc791\uc131\ud558\uc5ec \uc791\uc5c5 \ub8e8\ud2b8 \ub514\ub809\ud1a0\ub9ac\uc5d0\uc11c .\/scripts\/build.sh\ub85c \uc2e4\ud589\ud55c\ub2e4.\n\n#!\/bin\/sh\n######################################################################\n#\n# Taranis Plus \ube4c\ub4dc \uc2a4\ud06c\ub9bd\ud2b8\n# (TARANISPLUS_OPENTX_BASE_PATH\uc5d0\uc11c \uc2e4\ud589\ud55c\ub2e4.)\n#\n######################################################################\nexport OPENTX_VERSION=2.1.5\nexport TARANISPLUS_OPENTX_BASE_PATH=\/opt\/taranisplus_opentx\n\nexport ARCH=arm\nexport PATH=${TARANISPLUS_OPENTX_BASE_PATH}\/gcc-arm-none-eabi\/bin:${PATH}\nexport CROSS_COMPILE=arm-none-eabi-\n\n######################################################################\n#\n# \uc18c\uc2a4\ucf54\ub4dc \uc555\ucd95\ud480\uae30 #1\n#\n######################################################################\ncd ${TARANISPLUS_OPENTX_BASE_PATH}\nrm -rf opentx-${OPENTX_VERSION}\ntar xzf opentx-${OPENTX_VERSION}.tar.gz\n\n######################################################################\n#\n# USB \uacc4\uc18d \uc5f0\uacb0\ub418\uc5b4 \uc788\ub294 \ubc84\uadf8 \ud328\uce58 (USB\uac00 \uc778\uc2dd\ub418\uc9c0 \uc54a\uac8c-\uc548\uc815\uc801)\n# diff -urN opentx-2.1.5-orig opentx-2.1.5 > script\/hasu0707_nousb.patch\n#\n######################################################################\npatch -p0 &lt; .\/script\/hasu0707_nousb.patch\n#echo \"hasu0707_nousb.patch complete. press enter to continue\u2026\"\n#read\n\n######################################################################\n#\n# \ube4c\ub4dc #1\n#\n######################################################################\ncd ${TARANISPLUS_OPENTX_BASE_PATH}\/opentx-${OPENTX_VERSION}\/radio\/src &amp;&amp; make clean\ncd ${TARANISPLUS_OPENTX_BASE_PATH}\/opentx-${OPENTX_VERSION}\/radio\/src &amp;&amp; make \\\nOPENTX_VERSION_SUFFIX=-nousb \\\nPCB=TARANIS PCBREV=REVPLUS \\\nHELI=NO \\\nLUA=YES \\\nMIXERS_MONITOR=YES \\\nSHUTDOWN_CONFIRMATION=YES \\\nUSB=JOYSTICK \\\nall\nsync\n\n######################################################################\n#\n# \ube4c\ub4dc\ub41c \ud38c\uc6e8\uc5b4 \ud604\uc7ac \ub514\ub809\ud1a0\ub9ac\ub85c \uc774\ub3d9 #1\n#\n######################################################################\nrm -f ${TARANISPLUS_OPENTX_BASE_PATH}\/opentx-${OPENTX_VERSION}_nousb.bin\nmv -f ${TARANISPLUS_OPENTX_BASE_PATH}\/opentx-${OPENTX_VERSION}\/radio\/src\/opentx.bin ${TARANISPLUS_OPENTX_BASE_PATH}\/opentx-${OPENTX_VERSION}_nousb.bin\n\n######################################################################\n#\n# \uc18c\uc2a4\ucf54\ub4dc \uc555\ucd95\ud480\uae30 #2\n#\n######################################################################\ncd ${TARANISPLUS_OPENTX_BASE_PATH}\nrm -rf opentx-${OPENTX_VERSION}\ntar xzf opentx-${OPENTX_VERSION}.tar.gz\n\n######################################################################\n#\n# USB \uacc4\uc18d \uc5f0\uacb0\ub418\uc5b4 \uc788\ub294 \ubc84\uadf8 \ud328\uce58 (\ud30c\uc6ccOFF \uc2dc USB\ub97c \ubb34\uc2dc\ud558\uac8c-\ubd88\uc548\uc815)\n# diff -urN opentx-2.1.5-orig opentx-2.1.5 > script\/hasu0707_ignoreusb.patch\n#\n######################################################################\npatch -p0 &lt; .\/script\/hasu0707_ignoreusb.patch\n#echo \"hasu0707_ignoreusb.patch complete. press enter to continue\u2026\"\n#read\n\n######################################################################\n#\n# \ube4c\ub4dc #2\n#\n######################################################################\ncd ${TARANISPLUS_OPENTX_BASE_PATH}\/opentx-${OPENTX_VERSION}\/radio\/src &amp;&amp; make clean\ncd ${TARANISPLUS_OPENTX_BASE_PATH}\/opentx-${OPENTX_VERSION}\/radio\/src &amp;&amp; make \\\nOPENTX_VERSION_SUFFIX=-ignoreusb \\\nPCB=TARANIS PCBREV=REVPLUS \\\nHELI=NO \\\nLUA=YES \\\nMIXERS_MONITOR=YES \\\nSHUTDOWN_CONFIRMATION=YES \\\nUSB=JOYSTICK \\\nall\nsync\n\n######################################################################\n#\n# \ube4c\ub4dc\ub41c \ud38c\uc6e8\uc5b4 \ud604\uc7ac \ub514\ub809\ud1a0\ub9ac\ub85c \uc774\ub3d9 #2\n#\n######################################################################\nrm -f ${TARANISPLUS_OPENTX_BASE_PATH}\/opentx-${OPENTX_VERSION}_ignoreusb.bin\nmv -f ${TARANISPLUS_OPENTX_BASE_PATH}\/opentx-${OPENTX_VERSION}\/radio\/src\/opentx.bin ${TARANISPLUS_OPENTX_BASE_PATH}\/opentx-${OPENTX_VERSION}_ignoreusb.bin\n\n\n\u25a0 \ube4c\ub4dc \uc644\ub8cc\n\n\ube4c\ub4dc \ud6c4 \ud38c\uc6e8\uc5b4 \ud30c\uc77c\uc774 \uc791\uc5c5 \ub8e8\ud2b8 \ub514\ub809\ud1a0\ub9ac\uc5d0 opentx-x.x.x-hasu0707.bin \uc73c\ub85c \uc0dd\uc131\ub418\uc5b4 \uc788\ub2e4\uba74 \uc815\uc0c1\uc801\uc73c\ub85c \ube4c\ub4dc\uac00 \ub41c \uac83\uc774\ub2e4.\n\n\u203b \uac01 \uae30\uc885\ubcc4 \ube4c\ub4dc\n\ncd radio\/src\n\n# OpenTX on 9X stock\nmake clean\nmake PCB=9X EXT=FRSKY HELI=YES\nmake simu PCB=9X EXT=FRSKY HELI=YES\nmake gtests EXT=FRSKY HELI=YES\n.\/gtests\n\n# OpenTX on Taranis Plus\nmake clean\nmake PCB=TARANIS PCBREV=REVPLUS HELI=YES LUA=YES\nmake simu PCB=TARANIS PCBREV=REVPLUS HELI=YES LUA=YES\nmake gtests PCB=TARANIS PCBREV=REVPLUS HELI=YES LUA=YES\n.\/gtests\n\n# OpenTX on Taranis\nmake clean\nmake PCB=TARANIS HELI=YES LUA=YES\nmake simu PCB=TARANIS HELI=YES LUA=YES\nmake gtests PCB=TARANIS HELI=YES LUA=YES\n.\/gtests\n\n# OpenTX on Sky9x\nmake clean\nmake PCB=SKY9X EXT=FRSKY HELI=YES\nmake simu PCB=SKY9X EXT=FRSKY HELI=YES\nmake gtests PCB=SKY9X EXT=FRSKY HELI=YES\n.\/gtests\n\n# OpenTX on Gruvin9x\nmake clean\nmake PCB=GRUVIN9X EXT=FRSKY SDCARD=YES\nmake simu PCB=GRUVIN9X EXT=FRSKY SDCARD=YES\n\n# OpenTX on MEGA2560\nmake clean\nmake PCB=MEGA2560\n\n# Companion\ncd ..\/..\/buildir\/\nmake<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[35],"tags":[],"class_list":["post-550","post","type-post","status-publish","format-standard","hentry","category-multi_copter_radio"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=550"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/550\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}