3 Replies Latest reply on Jan 9, 2017 10:47 PM by AxLi_1746341

    sflash_write.tcl error

    user_2170816

      Hello,

       

      I am trying to upload an image to my hardware with download download_apps. But APP download sometimes it fails and console message is the following:

       

      tools/makefiles/wiced_apps.mk:252: recipe for target 'APP0_DOWNLOAD' failed

      make.exe[1]: *** [APP0_DOWNLOAD] Error 1

      make: *** [main_app] Error 2

      Makefile:220: recipe for target 'main_app' failed

       

      When I took a look at the openocd_log file these are the logs:

       

      Open On-Chip Debugger 0.7.0-dev-00227-g9d47214-dirty (2013-04-16-10:43)

      Licensed under GNU GPL v2

      For bug reports, read

        http://openocd.sourceforge.net/doc/doxygen/bugs.html

      Info : only one transport option; autoselect 'jtag'

      DEPRECATED! use 'adapter_khz' not 'jtag_khz'

      adapter speed: 1000 kHz

      DEPRECATED! use 'adapter_nsrst_delay' not 'jtag_nsrst_delay'

      adapter_nsrst_delay: 100

      jtag_ntrst_delay: 100

      cortex_m3 reset_config vectreset

      post_init_43909_setup

      Info : J-Link initialization started / target CPU reset initiated

      Info : J-Link V10 compiled Oct  9 2015 20:36:39

      Info : J-Link caps 0xb9fe7bbf

      Info : J-Link hw version 101000

      Info : J-Link hw type J-Link

      Info : J-Link max mem block 26488

      Error: dummy byte read failed

      Error: jlink_usb_read failed (requested=256, result=-107)

      Info : J-Link JTAG Interface ready

      Info : clock speed 1000 kHz

      Info : JTAG tap: stm32f2xxx.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)

      Info : JTAG tap: stm32f2xxx.bs tap/device found: 0x06411041 (mfg: 0x020, part: 0x6411, ver: 0x0)

      Info : Selecting JTAG transport command set.

      Info : AP INIT COMPLETE

      Info : stm32f2xxx.cpu: hardware has 6 breakpoints, 4 watchpoints

      target state: halted

      target halted due to debug-request, current mode: Handler SVCall

      xPSR: 0x4100000b pc: 0x0800d1b6 msp: 0x20010fcc

      27856 bytes written at address 0x20000000

      downloaded 27856 bytes in 0.455026s (59.784 KiB/s)

      entry_address= 536888649

      stack_address= 536908240

      buffer_size= 16384

      pc (/32): 0x20004549

      Total write size is 534804

      writing 16384 bytes at 4096

      target state: halted

      target halted due to breakpoint, current mode: Handler HardFault

      xPSR: 0x21000003 pc: 0x2000445a msp: 0x20009130

      loadimage address 536870940 foffset 0 16384

      16384 bytes written at address 0x2000001c

      downloaded 16384 bytes in 0.255014s (62.742 KiB/s)

      target state: halted

      target halted due to debug-request, current mode: Handler SVCall

      xPSR: 0x4100000b pc: 0x0800d1b6 msp: 0x20010fcc

      Runtime Error: apps/waf/sflash_write/sflash_write.tcl:207: can't read "RESULT(62)": no such element in array

      in procedure 'sflash_write_file'

      in procedure 'program_sflash' called at file "apps/waf/sflash_write/sflash_write.tcl", line 255

      at file "apps/waf/sflash_write/sflash_write.tcl", line 207

       

      I underlined "sometimes" at the very beginning of the post because I realized that when I changed something in the code uploading image is successful. I think that the error could be caused by image size. Is there any comment or solution about issue?

       

      Bests,

       

      Oguz.

        • 1. Re: sflash_write.tcl error
          JeGu_2199941

          I'm not sure if your issue is related to image size.

          Bu if it is, what I will try first is turn off some unnecessary debug prints.

          You can try toggling WICED print macros from <wiced_defaults.h>
          (And of course the same thing for your own macros)

           

          Or if you're using WIFI and being sure that you won't need TLS, put the below line in your .mk

          GLOBAL_DEFINES += WICED_DISABLE_TLS

           

          Or if you use TLS and being sure you won't need some cipher suites, un-define them in <tls_cipher_suites.h>

           

          Basically it's naively "turn off things you don't need".

           

          Please kindly report if the above modification may go wrong in some cases.

          Other tricks for reducing code size are also welcomed.

          Appreciated.

          1 of 2 people found this helpful
          • 2. Re: sflash_write.tcl error
            AxLi_1746341

            xavier@candyhouse wrote:

             

            I'm not sure if your issue is related to image size.

            Bu if it is, what I will try first is turn off some unnecessary debug prints.

            Then you are trying to hide the issue.

             

            If image size might be an issue, try increase the image size to see if it's easier to reproduce.

            If yes, that would be helpful for the developers to figure out the real problem.

             

            BTW, I do see such issue sometimes.

            • 3. Re: sflash_write.tcl error
              AxLi_1746341

              oguzkerem wrote:

               

              Hello,

               

              I am trying to upload an image to my hardware with download download_apps. But APP download sometimes it fails and console message is the following:

               

              tools/makefiles/wiced_apps.mk:252: recipe for target 'APP0_DOWNLOAD' failed

              make.exe[1]: *** [APP0_DOWNLOAD] Error 1

              make: *** [main_app] Error 2

              Makefile:220: recipe for target 'main_app' failed

               

               

              I hit similar issue on SDK-3.7.0-7:

               

              tools/makefiles/wiced_apps.mk:244: recipe for target 'FR_APP_DOWNLOAD' failed

              make[1]: *** [FR_APP_DOWNLOAD] Error 1

              Makefile:286: recipe for target 'main_app' failed

              make: *** [main_app] Error 2

               

               

              apps/waf/sflash_write/sflash_write.tcl:207: Error: can't read "RESULT(134609288)": no such element in array

              in procedure 'sflash_write_file'

              in procedure 'program_sflash' called at file "apps/waf/sflash_write/sflash_write.tcl", line 255

              at file "apps/waf/sflash_write/sflash_write.tcl", line 207