Fork from bluejay at github and modified for my custom ESC. I need to modify it because some mistake design on my ESC hardware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

267 lines
4.7 KiB

  1. @ECHO off
  2. @ECHO ***** Batch file for BlHeli_S (from 4712) v.2 *****
  3. @ECHO ***** All Messages will be saved to MakeHex_Result.txt *****
  4. @ECHO ***** Start compile with any key - CTRL-C to abort *****
  5. Break ON
  6. @pause
  7. DEL MakeHex_Result.txt /Q
  8. rem ***** Adapt settings to your enviroment ****
  9. DEL Output\Hex\*.* /Q
  10. RMDIR Output\Hex
  11. DEL Output\*.* /Q
  12. RMDIR Output
  13. MKDIR Output
  14. MKDIR Output\Hex
  15. SET Revision=REV16_7
  16. SET KeilPath=C:\SiliconLabs\SimplicityStudio\v4\developer\toolchains\keil_8051\9.53\BIN
  17. @ECHO Revision: %Revision% >> MakeHex_Result.txt
  18. @ECHO Path for Keil toolchain: %KeilPath% >> MakeHex_Result.txt
  19. @ECHO Start compile ..... >> MakeHex_Result.txt
  20. SET ESCNO=1
  21. SET ESC=A_L_
  22. SET MCU_48MHZ=0
  23. call:compile
  24. SET ESC=A_H_
  25. SET MCU_48MHZ=1
  26. call:compile
  27. SET /A ESCNO+=1
  28. SET ESC=B_L_
  29. SET MCU_48MHZ=0
  30. call:compile
  31. SET ESC=B_H_
  32. SET MCU_48MHZ=1
  33. call:compile
  34. SET /A ESCNO+=1
  35. SET ESC=C_L_
  36. SET MCU_48MHZ=0
  37. call:compile
  38. SET ESC=C_H_
  39. SET MCU_48MHZ=1
  40. call:compile
  41. SET /A ESCNO+=1
  42. SET ESC=D_L_
  43. SET MCU_48MHZ=0
  44. call:compile
  45. SET ESC=D_H_
  46. SET MCU_48MHZ=1
  47. call:compile
  48. SET /A ESCNO+=1
  49. SET ESC=E_L_
  50. SET MCU_48MHZ=0
  51. call:compile
  52. SET ESC=E_H_
  53. SET MCU_48MHZ=1
  54. call:compile
  55. SET /A ESCNO+=1
  56. SET ESC=F_L_
  57. SET MCU_48MHZ=0
  58. call:compile
  59. SET ESC=F_H_
  60. SET MCU_48MHZ=1
  61. call:compile
  62. SET /A ESCNO+=1
  63. SET ESC=G_L_
  64. SET MCU_48MHZ=0
  65. call:compile
  66. SET ESC=G_H_
  67. SET MCU_48MHZ=1
  68. call:compile
  69. SET /A ESCNO+=1
  70. SET ESC=H_L_
  71. SET MCU_48MHZ=0
  72. call:compile
  73. SET ESC=H_H_
  74. SET MCU_48MHZ=1
  75. call:compile
  76. SET /A ESCNO+=1
  77. SET ESC=I_L_
  78. SET MCU_48MHZ=0
  79. call:compile
  80. SET ESC=I_H_
  81. SET MCU_48MHZ=1
  82. call:compile
  83. SET /A ESCNO+=1
  84. SET ESC=J_L_
  85. SET MCU_48MHZ=0
  86. call:compile
  87. SET ESC=J_H_
  88. SET MCU_48MHZ=1
  89. call:compile
  90. SET /A ESCNO+=1
  91. SET ESC=K_L_
  92. SET MCU_48MHZ=0
  93. call:compile
  94. SET ESC=K_H_
  95. SET MCU_48MHZ=1
  96. call:compile
  97. SET /A ESCNO+=1
  98. SET ESC=L_L_
  99. SET MCU_48MHZ=0
  100. call:compile
  101. SET ESC=L_H_
  102. SET MCU_48MHZ=1
  103. call:compile
  104. SET /A ESCNO+=1
  105. SET ESC=M_L_
  106. SET MCU_48MHZ=0
  107. call:compile
  108. SET ESC=M_H_
  109. SET MCU_48MHZ=1
  110. call:compile
  111. SET /A ESCNO+=1
  112. SET ESC=N_L_
  113. SET MCU_48MHZ=0
  114. call:compile
  115. SET ESC=N_H_
  116. SET MCU_48MHZ=1
  117. call:compile
  118. SET /A ESCNO+=1
  119. SET ESC=O_L_
  120. SET MCU_48MHZ=0
  121. call:compile
  122. SET ESC=O_H_
  123. SET MCU_48MHZ=1
  124. call:compile
  125. SET /A ESCNO+=1
  126. SET ESC=P_L_
  127. SET MCU_48MHZ=0
  128. call:compile
  129. SET ESC=P_H_
  130. SET MCU_48MHZ=1
  131. call:compile
  132. SET /A ESCNO+=1
  133. SET ESC=Q_L_
  134. SET MCU_48MHZ=0
  135. call:compile
  136. SET ESC=Q_H_
  137. SET MCU_48MHZ=1
  138. call:compile
  139. SET /A ESCNO+=1
  140. SET ESC=R_L_
  141. SET MCU_48MHZ=0
  142. call:compile
  143. SET ESC=R_H_
  144. SET MCU_48MHZ=1
  145. call:compile
  146. SET /A ESCNO+=1
  147. SET ESC=S_L_
  148. SET MCU_48MHZ=0
  149. call:compile
  150. SET ESC=S_H_
  151. SET MCU_48MHZ=1
  152. call:compile
  153. SET /A ESCNO+=1
  154. SET ESC=T_L_
  155. SET MCU_48MHZ=0
  156. call:compile
  157. SET ESC=T_H_
  158. SET MCU_48MHZ=1
  159. call:compile
  160. SET /A ESCNO+=1
  161. SET ESC=U_L_
  162. SET MCU_48MHZ=0
  163. call:compile
  164. SET ESC=U_H_
  165. SET MCU_48MHZ=1
  166. call:compile
  167. SET /A ESCNO+=1
  168. SET ESC=V_L_
  169. SET MCU_48MHZ=0
  170. call:compile
  171. SET ESC=V_H_
  172. SET MCU_48MHZ=1
  173. call:compile
  174. SET /A ESCNO+=1
  175. SET ESC=W_L_
  176. SET MCU_48MHZ=0
  177. call:compile
  178. SET ESC=W_H_
  179. SET MCU_48MHZ=1
  180. call:compile
  181. SET /A ESCNO+=1
  182. goto :end
  183. :compile
  184. SET FETON_DELAY=0
  185. SET ESCNAME=%ESC%%FETON_DELAY%
  186. call :compile_code
  187. SET /A FETON_DELAY=5
  188. SET ESCNAME=%ESC%%FETON_DELAY%
  189. call :compile_code
  190. SET /A FETON_DELAY=10
  191. SET ESCNAME=%ESC%%FETON_DELAY%
  192. call :compile_code
  193. SET /A FETON_DELAY=15
  194. SET ESCNAME=%ESC%%FETON_DELAY%
  195. call :compile_code
  196. SET /A FETON_DELAY=20
  197. SET ESCNAME=%ESC%%FETON_DELAY%
  198. call :compile_code
  199. SET /A FETON_DELAY=25
  200. SET ESCNAME=%ESC%%FETON_DELAY%
  201. call :compile_code
  202. SET /A FETON_DELAY=30
  203. SET ESCNAME=%ESC%%FETON_DELAY%
  204. call :compile_code
  205. SET /A FETON_DELAY=40
  206. SET ESCNAME=%ESC%%FETON_DELAY%
  207. call :compile_code
  208. SET /A FETON_DELAY=50
  209. SET ESCNAME=%ESC%%FETON_DELAY%
  210. call :compile_code
  211. SET /A FETON_DELAY=70
  212. SET ESCNAME=%ESC%%FETON_DELAY%
  213. call :compile_code
  214. SET /A FETON_DELAY=90
  215. SET ESCNAME=%ESC%%FETON_DELAY%
  216. call :compile_code
  217. goto :eof
  218. :compile_code
  219. @ECHO compiling %ESCNAME%
  220. @ECHO. >> MakeHex_Result.txt
  221. @ECHO ******************************************************************** >> MakeHex_Result.txt
  222. @ECHO %ESCNAME% >> MakeHex_Result.txt
  223. @ECHO ******************************************************************** >> MakeHex_Result.txt
  224. %KeilPath%\AX51.exe "BLHeli_S.asm" DEFINE(ESCNO=%ESCNO%) DEFINE(MCU_48MHZ=%MCU_48MHZ%) DEFINE(FETON_DELAY=%FETON_DELAY%) OBJECT(Output\%ESCNAME%_%Revision%.OBJ) DEBUG MACRO NOMOD51 COND SYMBOLS PAGEWIDTH(120) PAGELENGTH(65) >> MakeHex_Result.txt
  225. %KeilPath%\LX51.exe "Output\%ESCNAME%_%Revision%.OBJ" TO "Output\%ESCNAME%_%Revision%.OMF" PAGEWIDTH (120) PAGELENGTH (65) >> MakeHex_Result.txt
  226. %KeilPath%\Ohx51 "Output\%ESCNAME%_%Revision%.OMF" "HEXFILE (Output\%ESCNAME%_%Revision%.HEX)" "H386" >> MakeHex_Result.txt
  227. copy "Output\%ESCNAME%_%Revision%.HEX" "Output\Hex\%ESCNAME%_%Revision%.HEX" > nul
  228. del "Output\%ESCNAME%_%Revision%.HEX" > nul
  229. @ECHO. >> MakeHex_Result.txt
  230. goto :eof
  231. :end
  232. @pause
  233. exit