How to Compiling CF's FW on win7 !

Firmware/software/electronics/mechanics
gl516
Member
Posts: 35
Joined: Thu May 30, 2013 1:43 am

How to Compiling CF's FW on win7 !

Post by gl516 »

Hi guys
I use Windows 7, I have already downloaded and installed the "gnu TOOL ARM EMB... (win32.exe)", but I don't know how to use and compile the CF existing source code file.Tks!

Here is my in CMD. Exe using the Make command to complete compilation of screenshot.
Attachments
cf WIN7
cf WIN7
无标题.png (9.56 KiB) Viewed 8610 times
gl516
Member
Posts: 35
Joined: Thu May 30, 2013 1:43 am

Re: How to Compiling CF's FW on win7 !

Post by gl516 »

good news! i try to compiling CF BOOTLOAD FILES ,,,,,,it's okay !
cfbt.jpg
so .why i used make command to compiling CF Firmware ...display error informations.
JoshLillie
Beginner
Posts: 5
Joined: Tue May 14, 2013 1:10 pm
Location: Illinois, USA
Contact:

Re: How to Compiling CF's FW on win7 !

Post by JoshLillie »

Mine is not compiling. :( I haven't messed with it too much, probably something missing.

Code: Select all

C:\CF>make
  AS    startup_stm32f10x_md.o
process_begin: CreateProcess(NULL, arm-none-eabi-as -mcpu=cortex-m3 -mthumb -Ilib/FreeRTOS/include -Ilib/FreeRTOS/portable/GCC/ARM_CM3 -I. -Ilib//STM32F10x_StdPeriph_Driver/inc -Ilib//CMSIS/Core/CM3 -Iconfig -Ihal/interface -Imodules/interface -Iutils/interface -Idrivers/interface lib//CMSIS/Core/CM3/startup/gcc/startup_stm32f10x_md.s -o bin/startup_stm32f10x_md.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [startup_stm32f10x_md.o] Error 2

C:\CF>
smokedasphalt
Beginner
Posts: 16
Joined: Sun May 19, 2013 1:51 pm
Location: Pune, India

Re: How to Compiling CF's FW on win7 !

Post by smokedasphalt »

Hi, JoshLillie. Have you installed the GCC ARM Embedded tools? If not, then download the installer for windows from here https://launchpad.net/gcc-arm-embedded/+download . Once that is done, go to the directory where you installed the tools, and just have a look inside the bin folder. You should see a lot of. exe files beginning with arm-none-eabi-. Now, copy the full path of the bin directory and append it to the system PATH variable. This is easy to do. Check Google (Sorry, I'm on my phone or I'd have told you how to do it. ) Restart the command prompt and try compiling again. :)
gl516
Member
Posts: 35
Joined: Thu May 30, 2013 1:43 am

Re: How to Compiling CF's FW on win7 !

Post by gl516 »

Hi smilies...Can you tell me my Crazyfile firmware compile: why can't I success? (I've been install GCC ARM Embeded tools on win7) but I'm crzayfile bootloader FW to compile a success?
JoshLillie
Beginner
Posts: 5
Joined: Tue May 14, 2013 1:10 pm
Location: Illinois, USA
Contact:

Re: How to Compiling CF's FW on win7 !

Post by JoshLillie »

@smokedasphalt - Thanks for the tip! I thought I had that installed, but I recently uninstalled a bunch of stuff. It got a lot further, but now I'm getting the version.c error others have mentioned.

Code: Select all

C:\CF\bitcraze-crazyflie-firmware-e6f9fbdc42b3>make
  AS    startup_stm32f10x_md.o
  CC    list.o
  CC    tasks.o
  CC    queue.o
  CC    timers.o
  CC    heap_4.o
  CC    port.o
  CC    misc.o
  CC    stm32f10x_adc.o
  CC    stm32f10x_dbgmcu.o
  CC    stm32f10x_dma.o
  CC    stm32f10x_exti.o
  CC    stm32f10x_flash.o
  CC    stm32f10x_gpio.o
  CC    stm32f10x_i2c.o
  CC    stm32f10x_iwdg.o
  CC    stm32f10x_rcc.o
  CC    stm32f10x_spi.o
  CC    stm32f10x_tim.o
  CC    stm32f10x_usart.o
  CC    main.o
  CC    led.o
  CC    uart.o
  CC    adc.o
  CC    nrf24l01.o
  CC    exti.o
  CC    nvic.o
  CC    motors.o
  CC    mpu6050.o
  CC    i2cdev.o
  CC    i2croutines.o
  CC    hmc5883l.o
  CC    ms5611.o
  CC    crtp.o
  CC    ledseq.o
  CC    freeRTOSdebug.o
  CC    imu.o
  CC    pm.o
  CC    radiolink.o
  CC    eskylink.o
  CC    system.o
  CC    comm.o
  CC    console.o
  CC    pid.o
  CC    crtpservice.o
  CC    param.o
  CC    commander.o
  CC    controller.o
  CC    sensfusion6.o
  CC    stabilizer.o
  CC    log.o
  CC    worker.o
  CC    filter.o
  CC    cpuid.o
  CC    cfassert.o
  CC    configblock.o
  CC    eprintf.o
  CC    crc.o
  CC    fp16.o
  CC    debug.o
  VTMPL version.c
Traceback (most recent call last):
  File "scripts/versionTemplate.py", line 20, in <module>
    identify = subprocess.check_output(["hg", "identify", "-nitb"])
  File "C:\Python27\lib\subprocess.py", line 537, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "C:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 896, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
make: *** [version.c] Error 1

C:\CF\bitcraze-crazyflie-firmware-e6f9fbdc42b3>
smokedasphalt
Beginner
Posts: 16
Joined: Sun May 19, 2013 1:51 pm
Location: Pune, India

Re: How to Compiling CF's FW on win7 !

Post by smokedasphalt »

@gl516 - Hi, I'm sorry but I don't comprehend you. It looks like you are compiling the bootloader. Why would you want to do that? If you want to compile the firmware, please make sure you have downloaded the correct files and refer to the wiki so that you don't go wrong. I think you have all the tools installed and working.


@JoshLillie - Have you installed Mercurial for windows? Is it in your PATH? (Type hg in the command prompt and you should see some output instead of an error.) Once that is done, clone whichever repository you want by running hg clone URL after replacing URL with the link to the repository. (for example, if you want to clone the firmware by Bitcraze, the command looks like hg clone https://bitbucket.org/bitcraze/crazyflie-firmware)
gl516
Member
Posts: 35
Joined: Thu May 30, 2013 1:43 am

Re: How to Compiling CF's FW on win7 !

Post by gl516 »

Hi smokedasphalt
......My purpose is how to compile the CF 'S firmware, not in order to compile the CF' S BOOTLOADER firmware (this only to test the function). I have been in the GCC installed in the Windows 7 ARM Emb and python 2.7... Is not installed any other things (such as openocd...) .
smokedasphalt
Beginner
Posts: 16
Joined: Sun May 19, 2013 1:51 pm
Location: Pune, India

Re: How to Compiling CF's FW on win7 !

Post by smokedasphalt »

gl516 wrote:My purpose is how to compile the CF 'S firmware
gl516 wrote:GCC installed in the Windows 7 ARM Emb and python 2.7
Have you installed Mercurial? Make sure it is in your PATH. Then clone the firmware repository using hg clone URL. (Refer to my reply to JoshLillie in my previous comment.) Once you have the repository, cd into it and then run make CLOAD=1

The entire process looks like this

Code: Select all

C:\Users\Test\Desktop>hg clone https://bitbucket.org/bitcraze/crazyflie-firmware
C:\Users\Test\Desktop>cd crazyflie-firmware
C:\Users\Test\Desktop\crazyflie-firmware>make CLOAD=1
This should be the output when make completes. If it says CLEAN, then all's well and you are ready to flash the firmware.

Code: Select all

Build 38:e6f9fbdc42b3 (tip) CLEAN
CrazyLoader build!
   text    data     bss     dec     hex filename
  48060     400   19344   67804   108dc cflie.elf
rm version.c
gl516
Member
Posts: 35
Joined: Thu May 30, 2013 1:43 am

Re: How to Compiling CF's FW on win7 !

Post by gl516 »

What's this " Mercurial"?
===================
I don't have to install this in my PC. Can you provide a download links for me , I will be installed on Windows 7....
Post Reply