Skip to content

How to build

Takeo Takahashi edited this page Apr 21, 2023 · 6 revisions
  • Windows host
    • Install Python3.
      When installing, enable "Add Python 3.xx to PATH" check box to investigate the PATH.
    • Install Git
    • Install GNU Arm Embedded Toolchain and set the install directory to PATH. For example, the path is like "C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major".
    • Install MSYS2.
      When the installation is done, "MSYS2 MinGW 64 bit" will run.
    • Run "pacman -Syu"
      $ pacman -Syu
      
    • Close "MSYS2 MinGW 64 bit" to complete installation.
    • Run "MSYS2 MSYS" from start menu and run "pacman -Su" and install development tools.
      $ pacman -Su
      $ pacman -S --needed base-devel mingw-w64-x86_64-toolchain
      
    • Close "MSYS2 MSYS" and run "MSYS2 MinGW 64 bit"
    • Install vim editor and edit .bash_profile to add python path, git path and Arm compiler path.
      $ pacman vim
      $ vim .bash_profile
      
      Add following path setting according to your installed tools version and your folder name.
      PATH="/c/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin":"${PATH}"
      PATH="/c/Users/xxxxx/AppData/Local/Programs/Git/mingw64/bin":"${PATH}"
      PATH="/c/Users/xxxxx/AppData/Local/Prorams/Python/Python310":"${PATH}"
      PATH="/c/Users/xxxxx/AppData/Local/Programs/Python/Python310/Scripts":"${PATH}"
      
    • Close "MSYS2 MinGW 64 bit" and run again.
    • Make a clone of micropython.git in local PC.
      $ git clone https://github.com/micropython/micropython.git
      
    • Build mpy-cross:
      $ make -C mpy-cross
      
    • Update submodules:
      $ cd ports/renesas-ra
      $ make submodules
      
    • Build MicroPython for RENESAS-RA:
      $ cd ports/renesas-ra
      $ ./build_all_boards.sh
      
      or
      $ cd ports/renesas-ra
      $ make BOARD=RA6M2_EK clean
      $ make BOARD=RA6M2_EK
      $ make BOARD=RA6M1_EK clean
      $ make BOARD=RA6M1_EK
      $ make BOARD=RA4W1_EK clean
      $ make BOARD=RA4W1_EK
      $ make BOARD=RA4M1_EK clean
      $ make BOARD=RA4M1_EK
      $ make BOARD=RA4M1_CLICKER clean
      $ make BOARD=RA4M1_CLICKER
      
      If you want to debug the program, please add DEBUG=1. For example in case of RA6M2_EK board as below.
      $ make DEBUG=1 BOARD=RA6M2_EK
      
    • Hex files of MicroPython for RA are generated in the following folder in ports/renesas-ra. You can program this firmware.hex to the target board.
      build-RA4M1_CLICKER/firmware.hex
      build-RA4M1_EK/firmware.hex
      build-RA4W1_EK/firmware.hex
      build-RA6M1_EK/firmware.hex
      build-RA6M2_EK/firmware.hex
      

Home

ホーム

Clone this wiki locally