'2017/12/17'에 해당되는 글 1건

  1. 2017.12.17 Embitz에서 VESC 펌웨어 컴파일 방법


비교적 무거운 환경인 ChibiStudio 혹은 Eclipse IDE나 제한이 많은 Keil, IAR 등의 상용 IDE를 사용하지 않고 Windows 환경에서 무료로 사용할 수 있는 Embitz 환경으로, 오픈 소스 RTOS인 ChibiOS를 사용한 VESC 펌웨어의 컴파일 방법입니다. 참고로 Embitz는 emblocks의 새로운 이름입니다.


VESC firmware compile step for Embitz v1.11


VESC firmware : https://github.com/vedderb/bldc

Embitz : https://www.embitz.org/

Msys : http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe


1. Settings->Tools... , Toolchain executables , additional paths.

- enter path to Msys/bin

1. 'Tools' 메뉴의 'Toolchain executables' 탭을 클릭하고 'additional paths' 눌러 Msys/bin 경로를 찾아 추가합니다. 여기서 Msys를 설치하지 않으며 'make.exe'파일을 이용할 수 없게 됩니다.


2. Create new project.

- choose Empty template

- name project title as 'BLDC_4_ChibiOS', will make things easier.

- untick debug checkbox

- change create release configuration to 'upload'

- change ouput dir to 'build\'

- change objects output dir to 'build\obj\'

2. 'new project'를 생성합니다.

- 'Empty template' 를 선택합니다

- 'project title'을 'BLDC_4_ChibiOS'으로 입력하는데 이는 makefile에 이미 정의된 것으로 후에 생길 오류들을 없애기 위함입니다.

- 'debug checkbox'를 체크 해제합니다

- 'release'대신 'upload' 폴더로 생성하도록 'release'를 'upload'로 변경합니다

- 'output dir'를 'build\'로 변경합니다

- 'objects output dir'를 'build\obj\'로 변경합니다


3. copy all files from bldc-master to BLDC_4_ChibiOS

3. github에서 다운로드하여 압축해제 한 'bldc-master' 폴더 내에 모든 파일을 새롭게 생성된 'BLDC_4_ChibiOS' 폴더 안으로 복사합니다


4. right click on your project choose 'add files recursivly'

- choose folder 'BLDC_4_ChibiOS'

4. project를 오른쪽 클릭하여 'add files recursivly'를 선택합니다.

- 'BLDC_4_ChibiOS' 폴더를 선택합니다


5. right click on your project choose 'properties'

- check checkbox 'this is a custom Makefile'

5. project를 오른쪽 클릭하여 'properties'를 선택합니다.

- 'this is a custom Makefile'의 체크 박스를 체크합니다. 즉 기존의 makefile를 사용함을 의미합니다.


6. Build target

6. Build target을 클릭하여 컴파일 합니다.


7. Clean target을 클릭하여 생성된 파일을 삭제할 수 있는데 삭제되지 않으면, 'Project'의 'Build options' 메뉴를 클릭하여 '"Make commands' 탭을 선택하고 'Clean project/target'란 '$make -f $makefile clean $target'라는 정보가 올바로 입력되어 있는지 확인합니다.


during build there is no response or status.

컴파일하는 동안에 어떤 응답이나 상태를 보이지는 않습니다.


제 경우에는 15분 26초 정도 걸렸습니다.

Intel Atom CPU Z3735F @1.33GHz / 2GB 메모리 / Windows 10 Home(32bit)



VESC는 Unix 환경에서 작성되어 비록 Windows 환경에서 Embitz IDE를 사용하더라도 Compile과 Link에 사용되는 Toolchain과 Makefile을 사용하기 때문에 Unix 기반의 'make.exe', 'rm.exe' 등이 포함된 [Msys와 같은] Build 유틸이 설치되어야 합니다. GNU ARM Embedded Toolchain과 Debugger로는 오픈 소스인 OpenOCD를 사용합니다.



'Flight Controller 이해 > 전자속도제어기(ESC)' 카테고리의 다른 글

Qt에서 bldc-tool 컴파일 방법  (0) 2017.12.24
VESC 하드웨어(v4.8) 회로도  (0) 2017.12.21
VESC - Open Source ESC(4)  (0) 2017.11.09
VESC - Open Source ESC(3)  (0) 2017.11.04
VESC - Open Source ESC(2)  (0) 2017.11.04
Posted by Nature & Life