0

I am trying to build free RTOS application. My application has may submodules and the paths are getting very long. I have updated the windows path limit. but the problem is that the command to give to bash is getting very long [33192] bytes in size. and window has a limitation of 8191 chars in one single command. I am using scons to build the project and using win32process.CreateProcess to create the command line which has a limit of 32,767 chars but even that is not suitable. How can i reduce the command size.

work env: windows build env: scons/python toolchain: arm-none-eabi-gcc

Here is what I am trying. This is a small piece of command:

C:\data\code\gcc\win32\10.3-2021.10\bin\arm-none-eabi-gcc -o build\fsvui_da14695w_xec\board_config\da1469x\datalog_mgr\src\data_log_mgr_cfg.o -c -mcpu=cortex-m33 -mthumb -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -Wall -std=gnu11 -D__FILENAME__="data_log_mgr_cfg.c" -includeC:\data\code\project2\board_config\da1469x\fsvui_config\board_defconfig.h -includeC:\data\code\project2\board_config\da1469x\ble\config\lec_cfg.h -Werror -O2 -g -mfloat-abi=hard -mfpu=fpv5-sp-d16 -DARM_MATH_CM33 -D__STARTUP_CLEAR_BSS -Ddg_configDEVICE=DA14699_00 -Wno-missing-braces -Wno-unused-variable -Werror=unused-but-set-variable -Wno-cpp -Wno-unused-function -Wno-memset-elt-size -Wno-discarded-qualifiers -Werror=unused-but-set-variable -Wno-sizeof-pointer-memaccess -Werror=unused-but-set-variable -Wno-sizeof-pointer-memaccess -Wno-incompatible-pointer-types -Wno-pointer-sign -Wno-stringop-truncation -Dmalloc=ptOsalAlloc_malloc -Dfree=ptOsalAlloc_free -DBOARD_CONFIG_BLE=1 -DBOARD_CONFIG_FUM=1 -DBOARD_CONFIG_SECURITY_ENABLED=1 -DBOARD_CONFIG_SYSTEMVIEW=0 -DBOARD_REV=BOARD_REV_X692_UI_WINBOND_32MB -DBUILD_COMPONENT=COMPONENT_UI -DBUILD_FOR_DIALOG=1 -DCFG_PT_FUM_DISABLE_CMAC=true -DCFG_PT_FUM_DISABLE_DECRYPTION=true -DCFG_PT_FUM_EOL_DISABLED=true -DCFG_PT_OSAL_FREERTOS_PT_REALLOC=1 -DENABLE_DIAGNOSTICS=0 -DENABLE_PT2_COMPONENTS=1 -DENABLE_SPHERE_COMPONENTS=1 -DPRODUCTION_BUILD=0 -DPROJECT_REV=PROJECT_REV_X692 -DPT_CRC32_FAST=1 -DPT_CRC8_FAST=1 -DPT_DATA_LOG_MGR_ENABLE_READ_ALGORITHM=1 -DPT_DIPC_FIREWALL_ENABLED=1 -DPT_FLASH_MGR_FLASH_HAL_ENABLED=true -DPT_FLASH_MGR_GENERAL_STORAGE_ENABLED=true -DPT_FLASH_MGR_HASH_ENABLED=true -DPT_FLASH_MGR_POWER_SAFE_ENABLED=true -DPT_HAL_FLASH_ENABLED=true -DPT_HAL_WDOG_ENABLED=true -DPT_MCU_MGR_CFG_DIPC_MGR_DISABLE=true -DPT_OSAL_ASSERT_RUNTIME_DISABLE=1 -DPT_SPHERE_CFG_REROUTE_DISABLE=true -DPT_SVC_FLASH_ENABLED=true -DPT_SVC_SECURITY_AL_CRYPTO_ENABLED=1 -DPT_SVC_SECURITY_EOL_ENABLED=1 -DPT_UTILS_STORAGE_ENABLED=true -DWOLFSSL_IGNORE_FILE_WARN=1 -DWOLFSSL_USER_SETTINGS=1 -Ddg_configDEVICE=DA14699_00 -IC:\data\code\gcc\win32\10.3-2021.10\arm-none-eabi\include -IC:\data\code\gcc\win32\10.3-2021.10\lib\gcc\arm-none-eabi\10.3.1\include -Ibuild\fsvui_da14695w_xec\submodules\project1\submodules\core\submodules\thirdparty_da_1469x_sdk\sdk\free_rtos\include -Isubmodules\project1\submodules\core\submodules\thirdparty_da_1469x_sdk\sdk\free_rtos\include -Ibuild\fsvui_da14695w_xec\submodules\project1\submodules\core\submodules\thirdparty_da_1469x_sdk\sdk\free_rtos\portable\GCC\DA1469x -Isubmodules\project1\submodules\core\submodules\thirdparty_da_1469x_sdk\sdk\free_rtos\portable\GCC\DA1469x -Ibuild\fsvui_da14695w_xec\submodules\project1\submodules\core\submodules\platinum_osal\public_inc -Isubmodules\project1\submodules\core\submodules\platinum_osal\public_inc -Ibuild\fsvui_da14695w_xec\submodules\project1\submodules\core\submodules\platinum_osal_freertos\variant_inc -Isubmodules\project1\submodules\core\submodules\platinum_osal_freertos\variant_inc 

and there are may more folders being included. I have been thinking if there is a way to reduce these big names to small one and give the common part in each include path separately.

or is there any other way to do this.

ALK007
  • 23
  • 7
  • Have you tried to use an arguments file, and use it as argument `@file`? See docu [here at the bottom](https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gcc/Overall-Options.html). – ssbssa Jul 27 '23 at 10:36
  • 1
    SCons does have a mechanism for this (and it does indeed involve using a "response file"), but it's only enabled by default for the windows/msvc combination. It would need to be enabled for the linker setup you're using - perhaps a little beyond being able to describe here. Look in docs for `TEMPFILE` to get an idea. – Mats Wichmann Jul 27 '23 at 13:04

0 Answers0