Target:  generate a script which can work on windows PC, and can download different build output without using eclipse to compile again.

 

1.  Add VERBOSE=1 in the Make Target area, for 43907 you can get below input:

          snip.apsta-CYW943907AEVAL1F VERBOSE=1 download download_apps run

          snip.softap_issue-CYW94343WWCD1_EVB download download_apps run

          Create two for final download switch test.

          Then you can get the detailed compile information in the Console:

 

"./tools/ARM_GNU/Win32/bin/arm-none-eabi-gcc.exe" -isystem

./tools/ARM_GNU/Win32/bin/../../include -isystem ./tools/ARM_GNU/Win32/bin/../../lib/include -isystem ./tools/ARM_GNU/Win32/bin/../../lib/include-fixed @build/snip.apsta-CYW943907AEVAL1F/libraries/WWD_for_SoC.43909_ThreadX.c_opts -o build/snip.apsta-CYW943907AEVAL1F/Modules/./WICED/WWD/internal/wwd_internal.o WICED/WWD/internal/wwd_internal.c

"./tools/ARM_GNU/Win32/bin/arm-none-eabi-gcc.exe" -isystem

./tools/ARM_GNU/Win32/bin/../../include -isystem

./tools/ARM_GNU/Win32/bin/../../lib/include -isystem ./tools/ARM_GNU/Win32/bin/../../lib/include-fixed @build/snip.apsta-CYW943907AEVAL1F/libraries/WWD_for_SoC.43909_ThreadX.c_opts -o build/snip.apsta-CYW943907AEVAL1F/Modules/./WICED/WWD/internal/wwd_management.o WICED/WWD/internal/wwd_management.c

"./tools/ARM_GNU/Win32/bin/arm-none-eabi-strip.exe" -o build/waf.sflash_write-NoOS-CYW943907AEVAL1F-P103-SoC.43909/binary/waf.sflash_write-NoOS-CYW943907AEVAL1F-P103-SoC.43909.stripped.elf  build/waf.sflash_write-NoOS-CYW943907AEVAL1F-P103-SoC.43909/binary/waf.sflash_write-NoOS-CYW943907AEVAL1F-P103-SoC.43909.elf

 

2. Filter the key string “.\tools\OpenOCD\Win32\openocd-all-brcm-libftdi.exe” , you can get all the download output command:

 

.\tools\OpenOCD\Win32\openocd-all-brcm-libftdi.exe -s .\tools\OpenOCD\scripts -f ./tools/OpenOCD/CYW9WCD1EVAL1.cfg -f ./tools/OpenOCD/BCM4390x.cfg -f apps/waf/sflash_write/sflash_write.tcl -c "sflash_write_file build/snip.apsta-CYW943907AEVAL1F/DCT.bin 0x00008000 CYW943907AEVAL1F-P103-SoC.43909 0 43909" -c shutdown >> build/openocd_log.txt 2>&1

 

.\tools\OpenOCD\Win32\openocd-all-brcm-libftdi.exe -s .\tools\OpenOCD\scripts -f ./tools/OpenOCD/CYW9WCD1EVAL1.cfg -f ./tools/OpenOCD/BCM4390x.cfg -f apps/waf/sflash_write/sflash_write.tcl -c "sflash_write_file build/waf.bootloader-NoOS-NoNS-CYW943907AEVAL1F-P103-SoC.43909/binary/waf.bootloader-NoOS-NoNS-CYW943907AEVAL1F-P103-SoC.43909.trx.bin  0x00000000 CYW943907AEVAL1F-P103-SoC.43909 1 43909" -c shutdown >> build/openocd_log.txt 2>&1

 

.\tools\OpenOCD\Win32\openocd-all-brcm-libftdi.exe -s .\tools\OpenOCD\scripts -f ./tools/OpenOCD/CYW9WCD1EVAL1.cfg -f ./tools/OpenOCD/BCM4390x.cfg -f apps/waf/sflash_write/sflash_write.tcl -c "sflash_write_file build/snip.apsta-CYW943907AEVAL1F/filesystem.bin 69632 CYW943907AEVAL1F-P103-SoC.43909 0 43909" -c shutdown >> build/openocd_log.txt 2>&1

 

.\tools\OpenOCD\Win32\openocd-all-brcm-libftdi.exe -s .\tools\OpenOCD\scripts -f ./tools/OpenOCD/CYW9WCD1EVAL1.cfg -f ./tools/OpenOCD/BCM4390x.cfg -f apps/waf/sflash_write/sflash_write.tcl -c "sflash_write_file build/snip.apsta-CYW943907AEVAL1F/binary/snip.apsta-CYW943907AEVAL1F.stripped.elf 598016 CYW943907AEVAL1F-P103-SoC.43909 0 43909" -c shutdown >> build/openocd_log.txt 2>&1

 

.\tools\OpenOCD\Win32\openocd-all-brcm-libftdi.exe -s .\tools\OpenOCD\scripts -f ./tools/OpenOCD/CYW9WCD1EVAL1.cfg -f ./tools/OpenOCD/BCM4390x.cfg -f apps/waf/sflash_write/sflash_write.tcl -c "sflash_write_file build/snip.apsta-CYW943907AEVAL1F/APPS.bin 0x00010000 CYW943907AEVAL1F-P103-SoC.43909 0 43909" -c shutdown >> build/openocd_log.txt 2>&1

 

.\tools\OpenOCD\Win32\openocd-all-brcm-libftdi.exe -s .\tools\OpenOCD\scripts -f ./tools/OpenOCD/CYW9WCD1EVAL1.cfg -f ./tools/OpenOCD/BCM4390x.cfg  -f ./tools/OpenOCD/BCM4390x_gdb_jtag.cfg -c "resume" -c shutdown >> build/openocd_log.txt 2>&1 && echo Target running

 

3. Create a Windows “.bat” file, copy above output into the .bat file, and add prefix in each string line,  you can change the echo string to describe the download info with more detail.

@echo First Step: Downloading DCT ... build/snip.apsta-CYW943907AEVAL1F/DCT.bin @ SFLASH_DCT_LOC=0x00008000   

@call .\tools\OpenOCD\Win32\openocd-all-brcm-libftdi.exe -s .\tools\OpenOCD\scripts -f ./tools/OpenOCD/CYW9WCD1EVAL1.cfg -f ./tools/OpenOCD/BCM4390x.cfg -f apps/waf/sflash_write/sflash_write.tcl -c "sflash_write_file build/snip.apsta-CYW943907AEVAL1F/DCT.bin 0x00008000 CYW943907AEVAL1F-P103-SoC.43909 0 43909" -c shutdown >> build/openocd_log.txt 2>&1

 

 

4. you need to copy the tool environment and the binary that will be downloaded into the .bat directory, I didn’t filter the only necessary tools , just copy them all with below picture:

 

   tools\OpenOCD\scripts\

  Tools\OpenOCD\Win32\

  Tools\OpenOCD\

   apps\waf\sfalsh_write\sflash_write.tcl

  All build results.   I will attach the results in this blog .

 

5.  go to the download test, and have a switch to verify the results.