1 2 Previous Next 24 Replies Latest reply on Oct 10, 2018 11:20 PM by rroy

    Add a new platform in WICED

    user_493830251

      Hi ,

       

      Do you have a guide provide to user about how to add a new platform in WICED?

      I would like to porting a new platform to WICED, but I don't know how start.

       

      Thanks!

        • 1. Re: Add a new platform in WICED
          mifo

          This section of chapter 2 from the WICED 101 training introduces platform files and how platform.c/platform.h are leveraged within WICED to properly reflect pins on your hardware.

           

          WICED Wi-Fi 101 | Chapter 2-1

          • 2. Re: Add a new platform in WICED
            rroy

            Could you please tell what platform are you planning to add in WICED? As mifo pointed out, the first part will be adding the platform files (platform.c, platform.h, <platfiorm_name>.mk, platform_config.h) and then port the host MCU src files in the following location 43xxx_Wi-Fi/WICED/platform/MCU. You also have to write your own linker script (.ld) and add it to the following location 43xxx_Wi-Fi/WICED/platform/MCU/<target_MCU>/GCC. We are working on a document to provide some more granular details of platform porting but unfortunately I can't provide you with an ETA for the same as of now.

            1 of 1 people found this helpful
            • 3. Re: Add a new platform in WICED
              user_493830251

              I am working enable NXP's i.mxRT1050 on WICED with CYW4343W wifi module and i have finished most of porting, but i have some questions,

              i have created a target named,

               

              snip.led_Example-EVKBMIMXRT1050_4343W-FreeRTOS-LwIP-debug download

               

              i want to enable a simple led example firstly, but when i build the target, i saw two more target generated,

               

              waf.bootloader-NoOS-EVKBMIMXRT1050_4343W

              waf.sflash_write-NoOS-EVKBMIMXRT1050_4343W-SDIO

               

              and i got error

              I have no idea why bootloader and sflash write is needed.

               

              when i remove debug and download string, and add no boot loader in makefile, i can generate a elf file, so my questions is,

               

              1. how can i avoid  use of bootloader and sflash_write? they are removable?

              2. why NoOS is needed while i have enabled freertos?

              • 4. Re: Add a new platform in WICED
                rroy

                The bootloader essentially loads the program entry point along with setting up the timing etc. Similarly, sflash_write is used to facilitate the application download to sflash, which is leveraged in all the Cypress EVK. Please go through the waf.sflash_write and waf.bootloader code to get a detailed understanding of Wiced Application Framework. If you check the makefiles of these files, you can find these apps do not require an OS, hence you are seeing NoOS tag in the error log.

                 

                If you do not want to use the bootloader (which is not recommended ) or sflash_write, WICED allows you the flexibility to do that. To understand the WICED eco-system better, you can have a look at the makefiles as located in 43xxx_Wi-Fi/tools/makefiles to understand how the bootloader or sflash_write calls are being invoked. If you specify RESOURCES_LOCATION := RESOURCES_IN_DIRECT_RESOURCES, and comment-out the USES_RESOURCE_FILESYSTEM part in plaform_config.h, then all the resources will be stored in the internal flash and waf.sflash_write will not be used. To avoid downloading the bootloader, you can use NO_BOOTLOADER_REQUIRED=1 NO_BUILD_BOOTLOADER=1 macros.

                1 of 1 people found this helpful
                • 5. Re: Add a new platform in WICED
                  mifo

                  Which module partner are you using? Have you approached them for help with the port and creation of a new BSP not currently supported within WICED?

                  • 6. Re: Add a new platform in WICED
                    user_493830251

                    Thank you very much for your reply, i just want to enable the wifi moudle for RT with WICED, i got a big ram memory on board, so i want to avoid use of bootloader or flash write and the linker file which i configured were all allocated from RAM.

                    • 7. Re: Add a new platform in WICED
                      user_493830251

                      Do you mean the wifi module?

                      Seems it is Murate Type1DX FS EVB P2ML3661A.

                      • 8. Re: Add a new platform in WICED
                        user_493830251

                        Hi,

                         

                        Sorry for trouble you again,

                        I got another questions ,  application run failed when get the DCT magic number, in the wiced_network_init/wiced_network_get_hostname function, seems the DCT section has no available information,

                         

                        I am using Jlink gdb server + arm-gdb download the elf file directly,

                        1.download snip.led_Example-EVKBMIMXRT1050_4343W-FreeRTOS-LwIP-debug.elf

                        2.load DCT.elf(in build/snip.led_Example-EVKBMIMXRT1050_4343W-FreeRTOS-LwIP-debug/DCT.elf )

                        3.Correct the PC pointer.

                         

                        Seems the DCT.elf generated is not correct, how can i correct it?Or can I use no dct to disable DCT, i have no idea if it is necessary or not!

                         

                        Thanks!

                        • 9. Re: Add a new platform in WICED
                          rroy

                          Did you create the correct dct.ld required to be present 43xxx_Wi-Fi/WICED/platform/MCU/<MCU_SERIES>( e.g STM32F4xx)/GCC/<MCU_NAME> (e.g STM32F429)/dct.ld? If you are not using the bootloader then also this problem might appear because bootloader code checks the DCT INTERNAL section for boot-up information. To understand the DCT requirement in WICED, please go through the DCT app note as provided in 43xxx_Wi-Fi/doc/WICED-DCT.pdf

                          • 10. Re: Add a new platform in WICED
                            user_493830251

                            yes, i believe i have created a correct dct.ld,

                            MEMORY

                            {

                            /*

                                BTLDR_OR_VECTOR_FLASH      (rx)  : ORIGIN = 0x08000000, LENGTH = 16K

                            */

                                DCT1_FLASH                 (rx)  : ORIGIN = 0x80004000, LENGTH = 16K

                                DCT2_FLASH                 (rx)  : ORIGIN = 0x80008000, LENGTH = 16K

                                APP_FLASH                  (rx)  : ORIGIN = 0x8000c000, LENGTH = 976K

                                SRAM                       (rwx) : ORIGIN = 0x20000000, LENGTH = 128K

                            }

                             

                             

                            PHDRS

                            {

                                rodata PT_LOAD ;

                            }

                             

                             

                            SECTIONS

                            {

                                .rodata :

                                {

                                    dct_location = .;

                                    KEEP(*(.rodata.initial_dct))

                                    KEEP(*(.rodata._app_dct))

                                    KEEP(*(.rodata.wiced_apps_lut))

                                    KEEP(*(.rodata.wiced_apps_lut_fill))

                                    dct_end = .;

                             

                             

                                } >DCT1_FLASH  AT> DCT1_FLASH :rodata

                            }

                             

                             

                            PROVIDE( dct_full_size_loc = LENGTH( DCT1_FLASH ));

                            PROVIDE( dct_used_size_loc = (dct_end - ORIGIN( DCT1_FLASH )));

                             

                            what do you mean by

                            If you are not using the bootloader then also this problem might appear because bootloader code checks the DCT INTERNAL section for boot-up information

                            ?

                            Do you mean no matter use bootloader or not, DCT section check is always perform?

                            • 11. Re: Add a new platform in WICED
                              user_493830251

                              I checked the generated DCT.bin,

                               

                              0040 0000 401f 0000 0001 0100 4252 434d

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0100 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0200 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0200 0000 2200 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0200 0000 4400 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0200 0000

                              6600 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0200 0000 8800 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0200 0000 aa00 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0200 0000 cc00 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0200 0000

                              ee00 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000

                              0000 0000 0000 0000 0000 0000 0000 0000   -------------->offset is 0x200

                               

                              Above high light line is the line read to compare, it is all zero.

                               

                               

                               

                              • 12. Re: Add a new platform in WICED
                                rroy

                                I hope you have correctly checked the address mapping in the dct.bin file and the one you wrote in .ld file. Please check the Dump of the dct.bin and see if you get some meaningful comments like the AP name, passphrase etc. Some sections of the DCT might be unused hence those might be zero but the other sections should have some meaningful comments in the dump. Regarding "because bootloader code checks the DCT INTERNAL section for boot-up information" comment means bootloader checks the INTERNAL section of DCT for boot details which the device won't be able to fetch as bootloader is not being used.

                                • 13. Re: Add a new platform in WICED
                                  user_493830251

                                  yes, thanks for your reply.

                                  The issue is caused by the address allocated for DCT1_FLASH mismatch between DCT.ld and memory_with_bootloader.ld.

                                  By the way, i got timeout in wwd_bus_sdio_download_firmware,

                                   

                                  if ( loop_count >= (uint32_t) HT_AVAIL_TIMEOUT_MS )

                                      {

                                          /* If your system times out here, it means that the WLAN firmware is not booting.

                                           * Check that your WLAN chip matches the 'wifi_image.c' being built - in GNU toolchain, $(CHIP)

                                           * makefile variable must be correct.

                                           */

                                           WPRINT_WWD_ERROR(("Timeout while waiting for high throughput clock\n"));

                                           /*@-unreachable@*/ /* Reachable after hitting assert */

                                           return WWD_TIMEOUT;

                                           /*@+unreachable@*/

                                      }

                                  Then i checked i my makefile configurations, in platform/EVKBMIMXRT1050_4343W/.mk

                                   

                                  NAME := Platform_EVKBMIMXRT1050_4343W

                                   

                                   

                                  WLAN_CHIP            := 4343W

                                  WLAN_CHIP_REVISION   := A1

                                  WLAN_CHIP_FAMILY     := 4343x

                                  HOST_MCU_FAMILY      := MIMXRT1052

                                  HOST_MCU_VARIANT     := MIMXRT1052

                                  HOST_MCU_PART_NUMBER := MIMXRT1052DVL6B

                                   

                                   

                                  BT_CHIP          := 43438

                                  BT_CHIP_REVISION := A1

                                  BT_CHIP_XTAL_FREQUENCY := 26MHz

                                  PLATFORM_SUPPORTS_BUTTONS := 1

                                   

                                   

                                  ifndef BUS

                                  BUS := SDIO

                                  endif

                                   

                                  And the wifi module which i am using is,

                                  muRata Type1DX FS EVB P2ML3661A

                                  Part number on chip is:

                                  SS7224015

                                  1DX

                                   

                                  Do i have some configurations error? I have checked the .map file, 4343WA_bin firmware is included correctly.

                                  • 14. Re: Add a new platform in WICED
                                    rroy

                                    Please check the LPO_IN pin of your module which according to the datasheet should be connected to the sleep_clock of your host MCU. If you don't have any idea about that, you can alternatively ground the LPO_IN pin but the LPO_IN should not be left hanging. In case, the pin is grounded, it will use the internal LPO which is not really as accurate as the external sleep clock, hence we don't recommend or support to use it at all. If you want to have good low power numbers and the wwd_bus_sdio_download_firmware to pass, please connect the LPO_IN pin with external sleep clock generated from i.mx side.

                                    1 2 Previous Next