Rebuilding EWL Libraries from Command Prompt

The following steps help rebuild the EWL library files on the command prompt.

  1. Open a DOS command prompt.
  2. Change your working directory to the ewl folder, for example,

    cd C:\Freescale\CW MCU v10.x\MCU\ARM_GCC_Support\ewl

  3. Define the ARM_TOOLS, PLATFORM and VENDOR environment variables.
    For example, if your Kinetis product layout is in the folder C:\Freescale\CW MCU v10.x then you can do:
    ..\ewl>set ARM_TOOLS=C:\Freescale\CW MCU v10.x\Cross_Tools\arm-none-eabi-gcc-4_7_3
    
    ..\ewl>set PLATFORM=arm
    
    ..\ewl>set VENDOR=GCC
  4. ' make' to build all libraries:

    You can find make utility at ' \CW MCU v10.x\gnu\bin\'

    Note: The make command rebuilds all the libraries required for cortex-m0 and cortex-m4 architectures.
  5. You can rebuild individual libraries for individual target.

    For example: If you want to build libc.a for cortex-m0, do: make TARGET=/armv6-m/ libc .

    This builds libc.a under lib/armv6-m folder. Also you can build only C/C++/runtime libraries.

  6. To build C libraries, cd to EWL_C and perform following command: make -f EWL_C.GCC.mak

    This builds all C libraries such as libc.a, libc99.a and libm.a for cortex-m0 and cortex-m4 architectures at armv6-m and armv7e-m respectively.

  7. To build C++ libraries, cd to EWL_C++ directory and do: make -f EWL_C++.GCC.mak

    This builds C++ libraries such as libc++.a and libstdc++.a for cortex-m0 and cortex-m4 architectures.

  8. To build runtime libraries, cd to EWL_Runtime and do: make -f EWL_Runtime.GCC.mak

    This builds runtime libraries such as librt.a, libhosted.a, libuart.a, __arm_start.o, __arm_start- hosted.o, __arm_end.o and __arm_end-hosted.o for the both architectures.

9. To clean the libraries: make clean

Note: The clean command cleans all the libraries required for cortex-m0 and cortex-m4 architectures.