3 Replies Latest reply on Jun 2, 2020 2:22 PM by iono_4292956

    Question about image signing and using .bin




      I have two question:


      a) Any way in WICED SDK to sign the image file : elf or bin. I have reuiqrment from client to sign image, so looking for solution.


      b) WICED makes .elf and use openocd to flash. Also makes .bin file. Any way to use .bin to flash? I tried openocd command:

      flash write_image erase my_bin.bin 0x08000000

      0x08000000 is stm32 flash start location. But cannot boot after flash. I think all placement/padding information lost. Can you help?

        • 1. Re: Question about image signing and using .bin


          Have you tried the openocd command mentioned in the following link to write .bin to flash?

          Re: How do I write a binary image to WICED micro?

          Let us know if you face any issues.



          1 of 1 people found this helpful
          • 2. Re: Question about image signing and using .bin

            My openocd command is same. I remove extra config file to keep simple for my question.


            I think i know problem. linker app code location is at 0x0800C000 because space reserved for bootloader and dct, so I cannot flash app code at 0x08000000. I have one follow up question. This is linker file:

                BTLDR_VECTORS    (rx)  : ORIGIN = 0x08000000, LENGTH = 512
                SHARED_API       (rx)  : ORIGIN = 0x08000200, LENGTH = 512
                BTLDR_CODE       (rx)  : ORIGIN = 0x08000400, LENGTH = 15K
                DCT1_FLASH       (rx)  : ORIGIN = 0x08004000, LENGTH = 16K
                DCT2_FLASH       (rx)  : ORIGIN = 0x08008000, LENGTH = 16K
                APP_CODE         (rx)  : ORIGIN = 0x0800C000, LENGTH = 976K
                SRAM             (rwx) : ORIGIN = 0x20000000, LENGTH = 256K
                BTLDR_SRAM       (rwx) : ORIGIN = 0x2001BC00, LENGTH = 17k       /* Boot loader stack at the end. */


            I can flash app code at 0x0800C000 correctly.

            Please tell me if I use bootloader.bin(waf.bootloader-NoOS) and flash at 0x08000000, it will take care of BTLDR_VECTORS, SHARED_API, BTLDR_CODE?

            Do I need to flash DCT at DCT1_FLASH and DCT2_FLASH two time? I am not sure what the .elf version will do?


            May be it is better idea to combine all separate .bin (bootloader + dct.bin + app.bin) into one .bin file for flashing. Any idea to combine correctly?


            Also, please help with image sign question.

            • 3. Re: Question about image signing and using .bin



              I find "ota2_manuf_image" target use perl script to comine binary. Is it made for one flash memory (internal or external)? In my examply, I have no OTA2, but OTA1, so I use internal flash and external flash . Will script create one binary for both flash that can be use by openocd???