launch.bat 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. :: Copyright (C) 2018 RDA Technologies Limited and\or its affiliates("RDA").
  2. :: All rights reserved.
  3. ::
  4. :: This software is supplied "AS IS" without any warranties.
  5. :: RDA assumes no responsibility or liability for the use of the software,
  6. :: conveys no license or title under any patent, copyright, or mask work
  7. :: right to the product. RDA reserves the right to make changes in the
  8. :: software without notification. RDA also make no representation or
  9. :: warranty that such application will be suitable for the specified use
  10. :: without further testing or modification.
  11. @echo off
  12. set PROJECT_ROOT=%CD%
  13. set BUILD_TARGET=%1
  14. set BUILD_RELEASE_TYPE=%2
  15. set KCONFIG_CONFIG=%PROJECT_ROOT%\target\%BUILD_TARGET%\target.config
  16. set PROJECT_OUT=%PROJECT_ROOT%\out\%BUILD_TARGET%_%BUILD_RELEASE_TYPE%
  17. set COMPILER_DEFAULT=gcc-arm-none-eabi-9.2.1
  18. for %%I in ("8850") do (
  19. echo %BUILD_TARGET% | findstr "%%I" > nul && set COMPILER_DEFAULT=gcc-arm-none-eabi-10.2.1)
  20. if "%3"=="" (set COMPILER_VERSION=%COMPILER_DEFAULT%) else (set COMPILER_VERSION=%3)
  21. call :add_path %PROJECT_ROOT%\prebuilts\win32\bin
  22. call :add_path %PROJECT_ROOT%\prebuilts\win32\cmake\bin
  23. call :add_path %PROJECT_ROOT%\prebuilts\win32\python3
  24. call :add_path %PROJECT_ROOT%\prebuilts\win32\gcc-arm-none-eabi\%COMPILER_VERSION%\bin
  25. call :add_path %PROJECT_ROOT%\prebuilts\win32\nanopb
  26. call :add_path %PROJECT_ROOT%\tools
  27. call :add_path %PROJECT_ROOT%\tools\win32
  28. if not exist %PROJECT_OUT% mkdir %PROJECT_OUT%
  29. exit /B 0
  30. :add_path
  31. (echo ";%PATH%;" | findstr /N /I ";%1;" > nul) || set "PATH=%1;%PATH%"
  32. goto :eof