Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
TYY427
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

How to update CY_IDE_BT_TOOLS_DIR= -j12 to CY_IDE_BT_TOOLS_DIR= -j16.

Thank you

0 Likes
1 Solution
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @TYY427 ,

It is the limitation of your pc
you can't update from CY_IDE_BT_TOOLS_DIR= -j12 to CY_IDE_BT_TOOLS_DIR= -j16.

Thanks and regards,
Sidramesh

View solution in original post

0 Likes
13 Replies
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @TYY427 ,

Can you please let us know which CE you are using ?

Also you please provide more information about your issue.

Thanks and regards,
Sidramesh

0 Likes
TYY427
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

CY8C6347BZI-BLD53
IDE:ModusToolbox;tools version:3.0
Thank you for your reply.

0 Likes
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @TYY427 ,

Are you building any Code Example?

If you are getting any error please share the error logs .

Thanks and regards,
Sidramesh

0 Likes
TYY427
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

17:34:37 **** Incremental Build of configuration Debug for project TD8266BatServerV301_0721 ****
"C:\\Users\\Mycomputer\\ModusToolbox\\tools_3.0\\modus-shell\\bin\\make" CY_MAKE_IDE=eclipse CY_IDE_TOOLS_DIR=C:/Users/Mycomputer/ModusToolbox/tools_3.0 CY_IDE_BT_TOOLS_DIR= -j12 all
include flashmap.mk
Tools Directory: C:/Users/Mycomputer/ModusToolbox/tools_3.0
Searching installed tools in progress...
Searching installed tools complete

 

"flashmap.py C:/Users/Mycomputer/ModusToolbox/tools_3.0/python/python.exe ../mtb_shared/ota-update/release-v2.0.0/scripts/flashmap.py -p PSOC_062_1M -i ../mtb_shared/ota-update/release-v2.0.0/configs/flashmap/psoc62_1m_int_overwrite_single_taidoc.json > flashmap.mk"
include flashmap.mk

Prebuild operations complete

Auto-discovery in progress...
Auto-discovery complete
Commencing build operations...

include flashmap.mk
Tools Directory: C:/Users/Mycomputer/ModusToolbox/tools_3.0

Initializing build: mtb-example-btstack-freertos-battery-server Release APP_CY8CKIT-062-BLE GCC_ARM

Constructing build rules...
Build rules construction complete
"flashmap.py C:/Users/Mycomputer/ModusToolbox/tools_3.0/python/python.exe ../mtb_shared/ota-update/release-v2.0.0/scripts/flashmap.py -p PSOC_062_1M -i ../mtb_shared/ota-update/release-v2.0.0/configs/flashmap/psoc62_1m_int_overwrite_single_taidoc.json > flashmap.mk"
include flashmap.mk

==============================================================================
= Building application =
==============================================================================
Generating compilation database file...
-> ./build/compile_commands.json
Compilation database file generation complete
Building 295 file(s)
Compiling motion_task.c -DAPP_VERSION_BUILD=2 -DAPP_VERSION_MAJOR=5 -DAPP_VERSION_MINOR=0 -DCOMPONENT_APP_CY8CKIT_062_BLE -DCOMPONENT_BLESS_IPC -DCOMPONENT_CAT1 -DCOMPONENT_CAT1A -DCOMPONENT_CM0P_BLESS_OTA -DCOMPONENT_CM4 -DCOMPONENT_CM4_0 -DCOMPONENT_FREERTOS -DCOMPONENT_GCC_ARM -DCOMPONENT_HARDFP -DCOMPONENT_MW_ABSTRACTION_RTOS -DCOMPONENT_MW_AWS_IOT_DEVICE_SDK_EMBEDDED_C -DCOMPONENT_MW_AWS_IOT_DEVICE_SDK_PORT -DCOMPONENT_MW_BTSTACK -DCOMPONENT_MW_BTSTACK_INTEGRATION -DCOMPONENT_MW_CAT1CM0P -DCOMPONENT_MW_CLIB_SUPPORT -DCOMPONENT_MW_CMSIS -DCOMPONENT_MW_CONNECTIVITY_UTILITIES -DCOMPONENT_MW_CORE_LIB -DCOMPONENT_MW_CORE_MAKE -DCOMPONENT_MW_CY_MBEDTLS_ACCELERATION -DCOMPONENT_MW_FREERTOS -DCOMPONENT_MW_HTTP_CLIENT -DCOMPONENT_MW_LWIP -DCOMPONENT_MW_LWIP_FREERTOS_INTEGRATION -DCOMPONENT_MW_LWIP_NETWORK_INTERFACE_INTEGRATION -DCOMPONENT_MW_MBEDTLS -DCOMPONENT_MW_MQTT -DCOMPONENT_MW_MTB_HAL_CAT1 -DCOMPONENT_MW_MTB_PDL_CAT1 -DCOMPONENT_MW_OTA_UPDATE -DCOMPONENT_MW_RECIPE_MAKE_CAT1A -DCOMPONENT_MW_RETARGET_IO -DCOMPONENT_MW_SECURE_SOCKETS -DCOMPONENT_MW_WHD_BSP_INTEGRATION -DCOMPONENT_MW_WIFI_CONNECTION_MANAGER -DCOMPONENT_MW_WIFI_CORE_FREERTOS_LWIP_MBEDTLS -DCOMPONENT_MW_WIFI_HOST_DRIVER -DCOMPONENT_MW_WPA3_EXTERNAL_SUPPLICANT -DCOMPONENT_OTA_BLUETOOTH -DCOMPONENT_OTA_PSOC_062 -DCOMPONENT_PSOC6HAL -DCOMPONENT_PSOC6_01 -DCOMPONENT_Release -DCOMPONENT_WICED_BLE -DCORE_NAME_CM4_0=1 -DCY8C6347BZI_BLD53 -DCY_APPNAME_mtb_example_btstack_freertos_battery_server -DCY_RETARGET_IO_CONVERT_LF_TO_CRLF -DCY_RTOS_AWARE -DCY_SUPPORTS_DEVICE_VALIDATION -DCY_TARGET_BOARD=APP_CY8CKIT_062_BLE -DCY_USING_HAL -DFLASH_AREA_BOOTLOADER_DEV_ID="FLASH_DEVICE_INTERNAL_FLASH" -DFLASH_AREA_BOOTLOADER_SIZE=0x018000 -DFLASH_AREA_BOOTLOADER_START=0x000000 -DFLASH_AREA_IMG_1_PRIMARY_DEV_ID="FLASH_DEVICE_INTERNAL_FLASH" -DFLASH_AREA_IMG_1_PRIMARY_SIZE=0x06fc00 -DFLASH_AREA_IMG_1_PRIMARY_START=0x020000 -DFLASH_AREA_IMG_1_SECONDARY_DEV_ID="FLASH_DEVICE_INTERNAL_FLASH" -DFLASH_AREA_IMG_1_SECONDARY_SIZE=0x06fc00 -DFLASH_AREA_IMG_1_SECONDARY_START=0x090000 -DMCUBOOT_IMAGE_NUMBER=1 -DMCUBOOT_MAX_IMG_SECTORS=894 -DNDEBUG -DOTA_SUPPORT=1 -DPSOC_062_1M -DTARGET_APP_CY8CKIT_062_BLE -I./configs -I. -IBMA400_mtb -IBMA400_mtb/BMA400_driver -IBQ21061_mtb -Ibsps/TARGET_APP_CY8CKIT-062-BLE -Ibsps -Ibsps/TARGET_APP_CY8CKIT-062-BLE/bluetooth -Ibsps/TARGET_APP_CY8CKIT-062-BLE/config/GeneratedSource -Ibsps/TARGET_APP_CY8CKIT-062-BLE/config -Iconfigs/COMPONENT_CM4 -Iconfigs -IGeneral_mtb -Iota_source -Iota_source/GeneratedSource -IPAH8151_mtb -IPAH8151_mtb/pah -IPAH8151_mtb/pah_sensor -IPAH8151_mtb/PXI_ALG -IPAH8151_mtb/PXI_ALG/SS -IQK/include -IQK -IQK/ports/freertos -IQK/ports -IQK/src -ISleepWake -ISource/Include -ISource -I../mtb_shared/btstack-integration/release-v4.3.0/COMPONENT_BLESS-IPC/platform/include -I../mtb_shared/btstack-integration/release-v4.3.0/COMPONENT_BLESS-IPC/platform -I../mtb_shared/btstack-integration/release-v4.3.0/COMPONENT_BLESS-IPC -I../mtb_shared/btstack-integration/release-v4.3.0 -I../mtb_shared/btstack-integration/release-v4.3.0/COMPONENT_BLESS-IPC/platform/ipc -I../mtb_shared/btstack-integration/release-v4.3.0/COMPONENT_BLESS-IPC/platform/ipc/include -I../mtb_shared/ota-update/release-v2.0.0/include -I../mtb_shared/ota-update/release-v2.0.0 -I../mtb_shared/ota-update/release-v2.0.0/source -I../mtb_shared/ota-update/release-v2.0.0/source/COMPONENT_OTA_BLUETOOTH -I../mtb_shared/ota-update/release-v2.0.0/source/port_support/mcuboot -I../mtb_shared/ota-update/release-v2.0.0/source/port_support -I../mtb_shared/ota-update/release-v2.0.0/source/port_support/mcuboot/COMPONENT_OTA_PSOC_062 -I../mtb_shared/ota-update/release-v2.0.0/source/port_support/mcuboot/COMPONENT_OTA_PSOC_062/flash_qspi -I../mtb_shared/ota-update/release-v2.0.0/source/port_support/serial_flash -I../mtb_shared/ota-update/release-v2.0.0/source/port_support/untar -I../mtb_shared/retarget-io/release-v1.4.0 -I../mtb_shared/abstraction-rtos/release-v1.7.1/include -I../mtb_shared/abstraction-rtos/release-v1.7.1 -I../mtb_shared/abstraction-rtos/release-v1.7.1/include/COMPONENT_FREERTOS -I../mtb_shared/btstack/release-v3.7.0/wiced_include -I../mtb_shared/btstack/release-v3.7.0 -I../mtb_shared/cat1cm0p/release-v1.0.0/COMPONENT_CAT1A -I../mtb_shared/cat1cm0p/release-v1.0.0 -I../mtb_shared/clib-support/release-v1.3.0 -I../mtb_shared/clib-support/release-v1.3.0/TOOLCHAIN_GCC_ARM -I../mtb_shared/cmsis/release-v5.8.0/Core/Include -I../mtb_shared/cmsis/release-v5.8.0/Core -I../mtb_shared/cmsis/release-v5.8.0 -I../mtb_shared/connectivity-utilities/release-v4.1.1 -I../mtb_shared/connectivity-utilities/release-v4.1.1/cy_log -I../mtb_shared/connectivity-utilities/release-v4.1.1/cy_string -I../mtb_shared/connectivity-utilities/release-v4.1.1/JSON_parser -I../mtb_shared/connectivity-utilities/release-v4.1.1/linked_list -I../mtb_shared/connectivity-utilities/release-v4.1.1/network -I../mtb_shared/core-lib/release-v1.3.1/include -I../mtb_shared/core-lib/release-v1.3.1 -I../mtb_shared/freertos/release-v10.4.305/Source/include -I../mtb_shared/freertos/release-v10.4.305/Source -I../mtb_shared/freertos/release-v10.4.305 -I../mtb_shared/freertos/release-v10.4.305/Source/portable/COMPONENT_CM4 -I../mtb_shared/freertos/release-v10.4.305/Source/portable -I../mtb_shared/freertos/release-v10.4.305/Source/portable/COMPONENT_CM4/TOOLCHAIN_GCC_ARM -I../mtb_shared/mtb-hal-cat1/release-v2.3.0/COMPONENT_CAT1A/include/pin_packages -I../mtb_shared/mtb-hal-cat1/release-v2.3.0/COMPONENT_CAT1A/include -I../mtb_shared/mtb-hal-cat1/release-v2.3.0/COMPONENT_CAT1A -I../mtb_shared/mtb-hal-cat1/release-v2.3.0 -I../mtb_shared/mtb-hal-cat1/release-v2.3.0/COMPONENT_CAT1A/include/triggers -I../mtb_shared/mtb-hal-cat1/release-v2.3.0/include -I../mtb_shared/mtb-hal-cat1/release-v2.3.0/include_pvt -I../mtb_shared/mtb-hal-cat1/release-v2.3.0/source -I../mtb_shared/mtb-pdl-cat1/release-v3.3.0/devices/COMPONENT_CAT1A/include -I../mtb_shared/mtb-pdl-cat1/release-v3.3.0/devices/COMPONENT_CAT1A -I../mtb_shared/mtb-pdl-cat1/release-v3.3.0/devices -I../mtb_shared/mtb-pdl-cat1/release-v3.3.0 -I../mtb_shared/mtb-pdl-cat1/release-v3.3.0/devices/COMPONENT_CAT1A/include/ip -I../mtb_shared/mtb-pdl-cat1/release-v3.3.0/drivers/include -I../mtb_shared/mtb-pdl-cat1/release-v3.3.0/drivers -I../mtb_shared/mtb-pdl-cat1/release-v3.3.0/drivers/third_party/ethernet/include -I../mtb_shared/mtb-pdl-cat1/release-v3.3.0/drivers/third_party/ethernet -I../mtb_shared/mtb-pdl-cat1/release-v3.3.0/drivers/third_party -I../mtb_shared/wifi-core-freertos-lwip-mbedtls/release-v1.0.0/configs -I../mtb_shared/wifi-core-freertos-lwip-mbedtls/release-v1.0.0
motion_task.c: In function 'Bma400act_obj_Record':
motion_task.c:1047:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=]
1047 | printf("state %d %s %ld\n", \
| ~^
| |
| int
| %ld
1048 | motion_act.Step, \
| ~~~~~~~~~~~~~~~
| |
| uint32_t {aka long unsigned int}
motion_task.c:1047:25: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'int' [-Wformat=]
1047 | printf("state %d %s %ld\n", \
| ~~^
| |
| long int
| %d
......
1050 | motion_act.state_Len);
| ~~~~~~~~~~~~~~~~~~~~
| |
| int
motion_task.c:1008:12: warning: variable 'result' set but not used [-Wunused-but-set-variable]
1008 | cy_rslt_t result = CY_RSLT_SUCCESS;
| ^~~~~~
motion_task.c: In function 'enter_deepsleep':
motion_task.c:1100:15: warning: variable 'result' set but not used [-Wunused-but-set-variable]
1100 | cy_rslt_t result;
| ^~~~~~
motion_task.c: In function 'I2cForbiddenCaptureSpo2':
motion_task.c:1706:8: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
1706 | if (spo2_alg_busy==true);
| ^~
motion_task.c:1707:8: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
1707 | {
| ^
motion_task.c: In function 'resetFlashBackup':
motion_task.c:3433:12: warning: unused variable 'trycnt' [-Wunused-variable]
3433 | uint8_t trycnt=0;
| ^~~~~~
motion_task.c: In function 'save_SpO2_debug':
motion_task.c:3465:11: warning: variable 'i_r_ir_ratio' set but not used [-Wunused-but-set-variable]
3465 | uint16_t i_r_ir_ratio;
| ^~~~~~~~~~~~
motion_task.c: In function 'trigger_motion_read':
motion_task.c:3587:10: warning: unused variable 'int_value' [-Wunused-variable]
3587 | int32 int_value=range+Adj_range;
| ^~~~~~~~~
Linking output file mtb-example-btstack-freertos-battery-server.elf
C:/Users/Mycomputer/ModusToolbox/tools_3.0/gcc/bin/arm-none-eabi-objcopy -O ihex D:/mtd_ota/TD8266BatServerV301_0721/build/APP_CY8CKIT-062-BLE/Release/mtb-example-btstack-freertos-battery-server.elf D:/mtd_ota/TD8266BatServerV301_0721/build/APP_CY8CKIT-062-BLE/Release/mtb-example-btstack-freertos-battery-server.hex
../mtb_shared/ota-update/release-v2.0.0/scripts/sign_script.bash ./build/APP_CY8CKIT-062-BLE/Release mtb-example-btstack-freertos-battery-server C:/Users/Mycomputer/ModusToolbox/tools_3.0/python/python.exe C:/Users/Mycomputer/ModusToolbox/tools_3.0/gcc/bin/arm-none-eabi-objcopy "-O ihex" "elf_first" ../mtb_shared/ota-update/release-v2.0.0/source/port_support/mcuboot imgtool/imgtool.py sign 0x00 0x400 894 5.0.2 0x020000 0x06fc00 "C:/Users/Mycomputer/ModusToolbox/tools_3.0/gcc/bin/arm-none-eabi-objcopy" "-k ./ota_source/keys/cypress-test-ec-p256.pem"

Create unsigned.hex
imgtool sign signed .hex.
imgtool/imgtool.py sign -R 0 -e little --pad-header --align 8 -H 0x400 -M 894 -v 5.0.2 -L 0x020000 -S 0x06fc00 -k ./ota_source/keys/cypress-test-ec-p256.pem ./build/APP_CY8CKIT-062-BLE/Release/mtb-example-btstack-freertos-battery-server.unsigned.hex ./build/APP_CY8CKIT-062-BLE/Release/mtb-example-btstack-freertos-battery-server.hex
Usage: imgtool.py sign [OPTIONS] INFILE OUTFILE
Try 'imgtool.py sign -h' for help.

Error: Image size (0x6d41a) + trailer (0x5400) exceeds requested size 0x6fc00
make[1]: *** [../mtb_shared/core-make/release-v3.0.3/make/core/bwc.mk:161: _mtb_build__legacy_project_postbuild] Error 2
make: *** [../mtb_shared/core-make/release-v3.0.3/make/core/main.mk:376: secondstage_build] Error 2
"C:/Users/Mycomputer/ModusToolbox/tools_3.0/modus-shell/bin/make CY_MAKE_IDE=eclipse CY_IDE_TOOLS_DIR=C:/Users/Mycomputer/ModusToolbox/tools_3.0 CY_IDE_BT_TOOLS_DIR= -j12 all" terminated with exit code 2. Build might be incomplete.

17:34:46 Build Failed. 3 errors, 8 warnings. (took 8s.963ms)

but,in other computer

CY_IDE_TOOLS_DIR=C:/Users/Mycomputer/ModusToolbox/tools_3.0 CY_IDE_BT_TOOLS_DIR= -j16 all
this is successful

0 Likes
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @TYY427 ,

Could you please try giving CY_IDE_BT_TOOLS_DIR= -j16 all after TOOLCHAIN variable and see whether error still persists.

Sidramesh_0-1691562384219.png

 



Thanks and regards,
Sidramesh

0 Likes
TYY427
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

Thank you for your suggestion.

but,the log still show CY_IDE_BT_TOOLS_DIR= -j12.

0 Likes
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @TYY427 ,

Could you please share your project, we will try it from our end.

Thanks and regards,
Sidramesh

0 Likes

Hi @Sidramesh_S ,

1.CY_IDE_BT_TOOLS_DIR= -jn all 

I guess this number follows the number of threads in the CPU.

2.This project was modified from Bluetooth_LE_Battery_Server.
Makefile CONFIG=Release

TYY427_0-1691992949419.png

Bluetooth_LE_Battery_Server compiled by -j12

len(self.payload): (0x4463c)

Bluetooth_LE_Battery_Server compiled by -j16

len(self.payload): (0x462a3)

I don't know why there is a difference.

螢幕擷取畫面 2023-08-14 205232.png

3.in my project

Bluetooth_LE_Battery_Server compiled by -j12

len(self.payload): (0x6d3e2)

Bluetooth_LE_Battery_Server compiled by -j16

len(self.payload): (0x678f0)

The Image size of -j12 is relatively large, so an error occurs in check_trailer.

but I can't reduce the amount of code.

Thanks for your reply and help.

0 Likes

Sorry for the correction.

Hi @Sidramesh ,

1.CY_IDE_BT_TOOLS_DIR= -jn all 

I tested 4 computers, the number of execution threads were 4, 8, 12, 16
The console display:

CY_IDE_BT_TOOLS_DIR= -j4 all 

CY_IDE_BT_TOOLS_DIR= -j8 all 

CY_IDE_BT_TOOLS_DIR= -j12 all 

CY_IDE_BT_TOOLS_DIR= -j16 all 

so,I guess this number follows the number of threads in the CPU.

 

2.My project was modified from Bluetooth_LE_Battery_Server.
Makefile CONFIG=Release

(My project is a company product, sorry I can't provide it.)

TYY427_0-1692028228265.png

Because in my project, the error occurred in check_trailer.

I print Image_size in the console. 

TYY427_1-1692028228134.png

Bluetooth_LE_Battery_Server compiled by -j12

len(self.payload): (0x4463c)

Bluetooth_LE_Battery_Server compiled by -j16

len(self.payload): (0x462a3)

I don't know why there is a difference.

 

3.in my project

My project compiled by -j12

len(self.payload): (0x6d3e2)

My project compiled by -j16

len(self.payload): (0x678f0)

The Image size of -j12 is relatively large, so an error occurs in check_trailer.

but I can't reduce the amount of code.

by the way, I tried specifying t_size as 0, which allowed my project to compile successfully, but I don't know of any side effects.

Thanks for your reply and help.

0 Likes
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @TYY427 ,

I just want to confirm this, please check whether you provide the CY_TOOLS_PATH variable and its value as C:/Users/XYZ(User  Name)/ModusToolbox/tools_3.0 in the System Environment variables?

Thanks and regards,
Sidramesh


0 Likes

Hi @Sidramesh ,

未命名.png

Thanks for your reply.

0 Likes
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @TYY427 ,

It is the limitation of your pc
you can't update from CY_IDE_BT_TOOLS_DIR= -j12 to CY_IDE_BT_TOOLS_DIR= -j16.

Thanks and regards,
Sidramesh

0 Likes

Hi @Sidramesh_S 

I got it, thanks for your reply and help.

0 Likes