PS E:\xiangmuziliao\xiangmu\daolubaojingqi20240830\PHY6222_TuyaOS-3.10.0> cd 'e:\xiangmuziliao\xiangmu\daolubaojingqi20240830\PHY6222_TuyaOS-3.10.0\software\TuyaOS\'
PS E:\xiangmuziliao\xiangmu\daolubaojingqi20240830\PHY6222_TuyaOS-3.10.0\software\TuyaOS> & python.exe .\build_app.py apps\tuyaos_demo_ble_peripheral tuyaos_demo_ble_peripheral 1.0.0
4
DEMO_PATH: apps/tuyaos_demo_ble_peripheral
DEMO_NAME: tuyaos_demo_ble_peripheral     
DEMO_FIRMWARE_VERSION: 1.0.0
BOARD_NAME: phy6222_ble
BUILD_COMMAND: build
build-pre...
windows
D:\python3_8\Scripts\pip-script.py:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html  from pkg_resources import load_entry_point
Requirement already satisfied: intelhex in d:\python3_8\lib\site-packages (2.3.0)

[notice] A new release of pip is available: 24.2 -> 25.0.1      
[notice] To update, run: python.exe -m pip install --upgrade pip

SYN app TEMPLATE------------------------
Compare Some Files With Template:
>> ['.gitignore', 'build_app.py', 'ci_autobuild.sh', 'ci_autopack.sh', 'gitx.sh', 'prepare.sh']
-> [Y] .gitignore is same
-> [Y] build_app.py is same   
-> [Y] ci_autobuild.sh is same
-> [Y] ci_autopack.sh is same
-> [Y] gitx.sh is same
-> [Y] prepare.sh is same

Change URL:------------------------

MY KCONFIG------------------------
INPUT:
    -------------------------------------
    project_path:     ./
    app_path:         apps/tuyaos_demo_ble_peripheral
    auto:             1
    -------------------------------------

    > Check ./apps/tuyaos_demo_ble_peripheral/tuya_iot.config exists
    > Copy ./apps/tuyaos_demo_ble_peripheral/tuya_iot.config To ./build/tuya_iot.config
    > Create HEAD_FILE = ./apps/tuyaos_demo_ble_peripheral/app_config.h

INPUT:
    -------------------------------------
    project_path:     E:/xiangmuziliao/xiangmu/daolubaojingqi20240830/PHY6222_TuyaOS-3.10.0/software/TuyaOS
    app_path:         apps/tuyaos_demo_ble_peripheral
    vendor_name:      phy6222_ble
    output_path:      _output
    firmware_name:    tuyaos_demo_ble_peripheral
    firmware_version: 1.0.0
    -------------------------------------

CREATE:
    -> apps/apps/tuyaos_demo_ble_peripheral
    -> components
        -> app_tuya_driver
        -> tal_ble_app_passthrough
        -> tal_ble_attach_ota
        -> tal_ble_beacon
        -> tal_ble_bulkdata
        -> tal_ble_file
        -> tal_ble_iot_channel
        -> tal_ble_ota
        -> tal_ble_product_test
        -> tal_ble_protocol
        -> tal_ble_scene
        -> tal_ble_uart_common
        -> tal_ble_weather
        -> tal_bluetooth
        -> tal_driver
        -> tal_feature_ext_module
        -> tal_key
        -> tal_local_timer
        -> tal_oled
        -> tal_repeater
        -> tal_sdk_test
        -> tal_system
        -> tal_utc
        -> tal_util
    -> app libs
    -> libs
    -> include
    -> adapter
    -> vendor/phy6222_ble/tkl
        -> drivers
        -> system
        -> utilities
        -> bluetooth
        -> zigbee
        -> security
        -> include
    -> output
    -> vendor/phy6222_ble/sdk
    -> tool

WRITE TO FILE...
build...
windows
D:\python3_8\Scripts\pip-script.py:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html  from pkg_resources import load_entry_point
Requirement already satisfied: intelhex in d:\python3_8\lib\site-packages (2.3.0)

[notice] A new release of pip is available: 24.2 -> 25.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip

SYN app TEMPLATE------------------------
Compare Some Files With Template:
>> ['.gitignore', 'build_app.py', 'ci_autobuild.sh', 'ci_autopack.sh', 'gitx.sh', 'prepare.sh']
-> [Y] .gitignore is same
-> [Y] build_app.py is same
-> [Y] ci_autobuild.sh is same
-> [Y] ci_autopack.sh is same
-> [Y] gitx.sh is same
-> [Y] prepare.sh is same

Change URL:------------------------
./project.json

MAKE
> clean .log
> copy json_file to .log
#1. fill the output dict
#2. fill the cmd dict
#3. fill flash cmd dict
#4. fill the src dict
#5. get var map
> AFTER MAKE CALL VENDOR PYTHON SCRIPTS...

BUILD
> [cmd]:UV4.exe -j0 -b ./.log/Demo.uvprojx  -o Demo.log
> wait about 2 min ...
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'Target 1'
compiling app_led.c...
compiling tal_adc.c...
compiling tal_spi.c...
compiling app_key.c...
compiling tal_gpio.c...
compiling tuya_ble_protocol_callback.c...
compiling tal_i2c.c...
compiling app_dp_parser.c...
compiling tal_ble_app_passthrough.c...
compiling tal_pwm.c...
compiling app_product_test.c...
compiling tuya_sdk_callback.c...
compiling tuya_ble_bulkdata.c...
compiling tuya_ble_product_test_over_air.c...
compiling tal_ble_beacon.c...
compiling tuya_ble_ota.c...
compiling tuya_ble_data_handler.c...
compiling tuya_ble_bulkdata_demo.c...
compiling tal_gpio_test.c...
compiling tuya_ble_product_test.c...
compiling tuya_ble_event.c...
compiling tuya_ble_attach_ota_port.c...
compiling tuya_ble_attach_ota.c...
compiling tal_ble_file.c...
compiling tuya_ble_iot_channel.c...
compiling tuya_ble_api.c...
compiling tuya_ble_event_handler.c...
compiling tuya_ble_feature_accessory.c...
compiling tuya_ble_gatt_send_queue.c...
compiling tuya_ble_main.c...
compiling tuya_ble_mem.c...
compiling tuya_ble_mutli_tsf_protocol.c...
compiling tuya_ble_port.c...
compiling tuya_ble_queue.c...
compiling tuya_ble_storage.c...
compiling tuya_ble_uart_common.c...
compiling tuya_ble_scene.c...
compiling tuya_ble_weather.c...
compiling tal_bluetooth.c...
compiling tal_flash.c...
compiling tal_rtc.c...
compiling tal_uart.c...
compiling tal_watchdog.c...
compiling tal_ble_x_demo.c...
compiling tal_feature_ext_module.c...
compiling tal_key.c...
compiling tal_local_timer.c...
compiling tal_oled.c...
compiling tal_local_timer_storage.c...
compiling tal_repeater.c...
compiling tal_log.c...
compiling tal_sdk_test.c...
compiling tal_memory.c...
compiling tal_ota.c...
compiling tal_sleep.c...
compiling tal_sw_timer.c...
compiling tal_system.c...
compiling tal_utc.c...
compiling tal_util.c...
compiling tkl_rtc.c...
compiling tkl_memory.c...
compiling tkl_adc.c...
compiling tkl_flash.c...
compiling tkl_gpio.c...
compiling tkl_pwm.c...
compiling tkl_i2c.c...
compiling tkl_spi.c...
compiling tkl_timer.c...
compiling tkl_uart.c...
compiling tkl_watchdog.c...
compiling tkl_ota.c...
compiling tuya_list.c...
compiling tuya_mem_heap.c...
compiling tuya_queue.c...
compiling tkl_sleep.c...
compiling tkl_system.c...
compiling tkl_wakeup.c...
compiling tkl_bluetooth.c...
compiling main.c...
compiling uart.c...
compiling clock.c...
compiling gpio.c...
compiling timer.c...
compiling key.c...
compiling my_printf.c...
compiling pwrmgr.c...
compiling pwm.c...
compiling osal_snv.c...
compiling flash.c...
compiling adc.c...
compiling i2c.c...
compiling spi.c...
compiling dma.c...
compiling watchdog.c...
compiling gap.c...
compiling peripheral.c...
compiling gapgattserver.c...
compiling gattservapp.c...
compiling OSAL_SimpleBLEPeripheral.c...
compiling jump_table.c...
assembling startup_ARMCM0.s...
compiling simpleBLEPeripheral.c...
compiling SimpleBLEPeripheral_Main.c...
compiling system_ARMCM0.c...
linking...
.\scatter_load.sct(9): warning: L6329W: Pattern *.o(_section_standby_code_) only matches removed unused sections.
.\scatter_load.sct(34): warning: L6329W: Pattern app_led.o(RO) only matches removed unused sections.
.\scatter_load.sct(35): warning: L6314W: No section matches pattern app_product_test.o(RO).
.\scatter_load.sct(38): warning: L6314W: No section matches pattern tal_ble_beacon_remoter.o(RO).
.\scatter_load.sct(40): warning: L6329W: Pattern tal_ble_ccm.o(RO) only matches removed unused sections.
.\scatter_load.sct(41): warning: L6314W: No section matches pattern tal_ble_hmac.o(RO).
.\scatter_load.sct(43): warning: L6314W: No section matches pattern tal_ble_sha1.o(RO).
.\scatter_load.sct(44): warning: L6314W: No section matches pattern tal_ble_sha256.o(RO).
.\scatter_load.sct(46): warning: L6314W: No section matches pattern tal_xxtea.o(RO).
.\scatter_load.sct(52): warning: L6314W: No section matches pattern tal_ble_app_passthrough.o(RO).
.\scatter_load.sct(55): warning: L6329W: Pattern tal_ble_beacon.o(RO) only matches removed unused sections.
.\scatter_load.sct(58): warning: L6314W: No section matches pattern tal_ble_file.o(RO).
.\scatter_load.sct(61): warning: L6314W: No section matches pattern tal_gpio_test.o(RO).
.\scatter_load.sct(77): warning: L6314W: No section matches pattern tuya_ble_uart_common.o(RO).
.\scatter_load.sct(84): warning: L6314W: No section matches pattern tal_ble_x_demo.o(RO).
.\scatter_load.sct(85): warning: L6314W: No section matches pattern tal_feature_ext_module.o(RO).
.\scatter_load.sct(87): warning: L6329W: Pattern tal_local_timer.o(RO) only matches removed unused sections.
.\scatter_load.sct(88): warning: L6314W: No section matches pattern tal_local_timer_storage.o(RO).
.\scatter_load.sct(90): warning: L6314W: No section matches pattern tal_repeater.o(RO).
.\scatter_load.sct(115): warning: L6329W: Pattern tuya_list.o(RO) only matches removed unused sections.
.\scatter_load.sct(117): warning: L6329W: Pattern tuya_queue.o(RO) only matches removed unused sections.
Program Size: Code=128060 RO-data=14580 RW-data=3484 ZI-data=29124
Finished: 0 information, 21 warning and 0 error messages.
FromELF: creating hex file...
After Build - User command #1: fromelf.exe .\Objects\Demo.axf --i32combined --output .\bin\Demo.hex
After Build - User command #2: .\bin\material\mk_hexf_bin.bat

E:\xiangmuziliao\xiangmu\daolubaojingqi20240830\PHY6222_TuyaOS-3.10.0\software\TuyaOS\.log>.\bin\material\PhyPlusKit_v2.5.2a.exe -c -p .\bin\Demo.hex -b ..\vendor\phy6222_ble\sdk\phy62xx-sdk-v3\example\OTA\slboot\bin\slboot.hex -m SN -v 6222

E:\xiangmuziliao\xiangmu\daolubaojingqi20240830\PHY6222_TuyaOS-3.10.0\software\TuyaOS\.log>python .\bin\material\ooo_bin.py .\bin\Demo_phy6222.hex16        
run is 0xffff00f0 faddr is 0x0 offset is 16 size is  256
crc is  0x5440
run is 0x11018000 faddr is 0x100 offset is 32 size is  16384
crc is  0x40c4
run is 0x1101c000 faddr is 0x4100 offset is 48 size is  16384
crc is  0x2a00
run is 0x11020000 faddr is 0x8100 offset is 64 size is  16384
crc is  0x5af0
run is 0x11024000 faddr is 0xc100 offset is 80 size is  16384
crc is  0x8d21
run is 0x11028000 faddr is 0x10100 offset is 96 size is  16384
crc is  0x522f
run is 0x1102c000 faddr is 0x14100 offset is 112 size is  16384
crc is  0x3d2e
run is 0x11030000 faddr is 0x18100 offset is 128 size is  16384
crc is  0x1d17
run is 0x11034000 faddr is 0x1c100 offset is 144 size is  4040
crc is  0xef9d
run is 0x1fff0000 faddr is 0x1d0c8 offset is 160 size is  1036
crc is  0xc4a9
run is 0x1fff1838 faddr is 0x1d4d4 offset is 176 size is  16384
crc is  0xbe8f
run is 0x1fff5838 faddr is 0x214d4 offset is 192 size is  7160
crc is  0x2ad
".\Objects\Demo.axf" - 0 Error(s), 21 Warning(s).
Build Time Elapsed:  00:10:05
> build end, create final fw...
copy ./.log/bin/Demo_phy6222.hex16.bin -> UG
copy ./.log/bin/Demo_phy6222.hexf -> UA
copy ./.log/bin/Demo_phy6222.hexf -> QIO
copy ./.log/bin/Demo_phy6222.hexf -> PROD
> build success
PS E:\xiangmuziliao\xiangmu\daolubaojingqi20240830\PHY6222_TuyaOS-3.10.0\software\TuyaOS> 