FRDM-KW41Z OTAP client internal storage eeprom device internal flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FRDM-KW41Z OTAP client internal storage eeprom device internal flash

6,800 Views
lschoenfeld
Contributor III

I try to use the FRDM-KW41Z with the BLE OTAP client example and configure it to use the internal Flash for temporary storing the image sent over the air (Kinetis Thread Stack Over-the-Air (OTA) Firmware Update User’s Guide, Chapter 3 Software implementation) and  (BLEApplicationDevelopersGuide, Chapter11.7.2 The OTAP Client) . I can connect to the OTAP client using the IoT Toolbox. But when I start the upload the uploading stops at 9% and restart at 0% for several cycles. What can I do to get the OTAP client work with this configuration?

Labels (1)
18 Replies

5,777 Views
ed_ed
Contributor I

Hi!

I am implementing the reprogramming of a KW41Z board using the OTAP Client Software, with Internal Storage. Following the instructions of the link Reprogramming a FRDM-KW41 board using the OTAP Client Software 

I got update the firmware using the otap_client_att as base and updating to the glucose sensor example. However the glucose sensor does not include the OTAP service so it is possible to reprogramming only once.

I tried to add the OTAP service to the glucose sensor example but I did not get succesfully. I copied the code of the OTAP service at otap_client_att following the document AN12775. The OTAP service requires OtaSupport.h and Eeprom.h.   Selecting #define gEepromType_d gEepromDevice_InternalFlash_c and copying the MKW41Z512xxx4_connectivity.ld I achieved build without errors but the uploading does not start when I try to upload with the IoT Toolbox. It remains at 0%

Do you have any idea of the wrong proccess I am following? 

Thanks and regards!

0 Kudos
Reply

6,322 Views
florian_lebrun5
Contributor III

Lothar, 

can you join your linker file please to see what as necessarry to change please ?

Thanks a lot it could be very helpfull if the tutorial is not enough :smileyhappy:

0 Kudos
Reply

6,322 Views
lschoenfeld
Contributor III

Hi,

I hope this will help you.

Regards

/*
* The Clear BSD License
* Copyright (c) 2014-2015, Freescale Semiconductor, Inc.
* Copyright 2016-2017 NXP
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
*   notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
*   notice, this list of conditions and the following disclaimer in the
*   documentation and/or other materials provided with the distribution.
*
* * Neither the name of the copyright holder nor the names of its
*   contributors may be used to endorse or promote products derived from
*   this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
* GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
* HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* Entry Point */
ENTRY(Reset_Handler)
/* By default, the Bootloader is not used. */
/*
gUseBootloaderLink_d = DEFINED(gUseBootloaderLink_d) ? gUseBootloaderLink_d : 0;
*/
/* By default, the NVM is not used. */
gUseNVMLink_d  = DEFINED(gUseNVMLink_d) ? gUseNVMLink_d : 0;

gNVMSectorCountLink_d = DEFINED(gNVMSectorCountLink_d) ? gNVMSectorCountLink_d : 4;
/*
/* By default, the internal storage is not used. */
/*
gUseInternalStorageLink_d = DEFINED(gUseInternalStorageLink_d) ? gUseInternalStorageLink_d : 0;
*/
__ram_vector_table__ = DEFINED(__ram_vector_table__) ? __ram_vector_table__ : 1;
/*-Memory Limits-*/
__region_ROM_start__   =  (0x00000000);
__region_ROM_end__     =  (0x0007FFFF);
/* Workaround for  SRAM boundary GCC placement issue,
 not to place variables that are accessed by the code
 overlapping this boundary (forbidden by the Kinetis architecture) */
__region_RAM1_start__  =  (0x1FFF8000);
__region_RAM1_end__    =  (0x1FFFFFFF);
__region_RAM2_start__  =  (0x20000000);
__region_RAM2_end__    =  (0x20017FFF);

__vector_table_size__ = (48*4);
__ram_vector_table_size__ = DEFINED(__ram_vector_table__) ? __vector_table_size__ : 0;
_RAM_START_  = __region_RAM1_start__;
_RAM_END_    = __region_RAM2_end__;

/*if(gUseBootloaderLink_d == 1) {*/
 m_bootloader_start   = (__region_ROM_start__);
 m_bootloader_end     = (((__region_ROM_end__ + 1) / 32) - 1);
 m_interrupts_start   = (m_bootloader_end + 1);
 m_interrupts_end     = (m_interrupts_start + __vector_table_size__ - 1);
 m_bootFlags_start    = (m_interrupts_end + 1);
 m_bootFlags_end      = (m_bootFlags_start + 7);
 __BootFlags_Start__  = m_bootFlags_start;
/*}*/
/*else {*/
/*    m_interrupts_start  = (__region_ROM_start__);*/
/*    m_interrupts_end  = (m_interrupts_start + __vector_table_size__ - 1);*/
/*    m_flash_config_start = (0x400);*/
/*    m_flash_config_end = (0x410);*/
/*}*/

/*-Sizes-*/
/* 2k flash sector size */
m_sector_size =  ( 2 * 1024 );
__size_cstack__ = DEFINED(__stack_size__) ? __stack_size__ : 512;

__size_heap__ = DEFINED(__heap_size__) ? __heap_size__ : 0;
/*** FSL Product Info region ***/
m_fsl_prodInfo_start = (__region_ROM_end__ - m_sector_size + 1);
m_fsl_prodInfo_end   = (__region_ROM_end__);
FREESCALE_PROD_DATA_BASE_ADDR = m_fsl_prodInfo_start;

/*** NVM Configuration ***/
/*if(gUseNVMLink_d == 1) {*/
NV_STORAGE_SECTOR_SIZE     = m_sector_size;
NV_STORAGE_MAX_SECTORS     = gNVMSectorCountLink_d;     /* NV_STORAGE_MAX_SECTORS * NV_STORAGE_SECTOR_SIZE = total NV Storage space */
NV_STORAGE_START_ADDRESS   = m_fsl_prodInfo_start - 1;
NV_STORAGE_END_ADDRESS     = NV_STORAGE_START_ADDRESS - (NV_STORAGE_MAX_SECTORS * NV_STORAGE_SECTOR_SIZE) + 1;
NV_STORAGE_SECTOR_SIZE_C   = (m_sector_size);
NV_STORAGE_MAX_SECTORS_C   = (gNVMSectorCountLink_d);
NV_STORAGE_START_ADDRESS_C = (m_fsl_prodInfo_start - 1);
NV_STORAGE_END_ADDRESS_C   = (NV_STORAGE_START_ADDRESS_C - (NV_STORAGE_MAX_SECTORS_C * NV_STORAGE_SECTOR_SIZE_C) + 1);
/*}*/
/*if(gUseInternalStorageLink_d){*/
/* if(gUseNVMLink_d){*/
     INT_STORAGE_START = NV_STORAGE_END_ADDRESS - 1;
        INT_STORAGE_START_C = (NV_STORAGE_END_ADDRESS_C - 1);
/* }*/
/*    else {*/
/*     INT_STORAGE_START = m_fsl_prodInfo_start - 1;*/
/*        INT_STORAGE_START_C = (m_fsl_prodInfo_start - 1);*/
/*    }*/
    INT_STORAGE_SIZE     = m_sector_size * ( ( ( INT_STORAGE_START + 1 - __region_ROM_start__) / 2 ) / m_sector_size + 1 );
    INT_STORAGE_END      = INT_STORAGE_START - INT_STORAGE_SIZE + 1;
    INT_STORAGE_SECTOR_SIZE  = m_sector_size;
    INT_STORAGE_SIZE_C   = (m_sector_size * ( ( ( INT_STORAGE_START_C + 1 - __region_ROM_start__ ) / 2 ) / m_sector_size + 1 ) );
    INT_STORAGE_END_C   = (INT_STORAGE_START_C - INT_STORAGE_SIZE_C + 1);
    INT_STORAGE_SECTOR_SIZE_C = (m_sector_size);
/*}*/
/* Define the limits of the memory regions*/
m_text_start = (m_interrupts_start);
/*if(gUseInternalStorageLink_d){*/
 m_text_end = (INT_STORAGE_END_C);
/*}*/
/*elseif(gUseNVMLink_d) {*/
/* m_text_end   = (NV_STORAGE_END_ADDRESS_C - 1);*/
/*}*/
/*else {*/
/* m_text_end = (m_fsl_prodInfo_start - 1);*/
/*}*/
m_interrupts_ram_start = (__region_RAM2_start__);
m_interrupts_ram_end   = (m_interrupts_ram_start + __ram_vector_table_size__ - 1);
__CSTACK_end__         = (__region_RAM2_end__);
__CSTACK_start__       = (__CSTACK_end__ - __size_cstack__);
__HEAP_end__           = (__CSTACK_start__ - 1);
__HEAP_start__         = (__HEAP_end__ - __size_heap__ - 0x4);
m_data1_start           = (__region_RAM1_start__);
m_data1_end             = (__region_RAM1_end__);
m_data2_start           =  (m_interrupts_ram_start);
m_data2_end             =  (__HEAP_start__ - 1);
__RAM_VECTOR_TABLE_SIZE = __ram_vector_table_size__;
__BOOT_STACK_ADDRESS = m_data2_end - 0x0F;
/* Specify the memory areas */
MEMORY
{
/*if(gUseBootloaderLink_d){*/
        Bootloader_region                               (RW) : ORIGIN = m_bootloader_start,             LENGTH = (m_bootloader_end - m_bootloader_start)
        TEXT_region1                                    (RX) : ORIGIN = m_text_start,                   LENGTH = (m_bootFlags_start - m_text_start)
        BootFlags_region                                (RX) : ORIGIN = m_bootFlags_start,              LENGTH = (m_bootFlags_end - m_bootFlags_start)
        TEXT_region2                                    (RX) : ORIGIN = m_bootFlags_end + 1,            LENGTH = (m_text_end - m_bootFlags_end - 1)
/*}*/
/*else{*/
/*        TEXT_region1                                    (RX) : ORIGIN = m_text_start,                   LENGTH = (m_flash_config_start - m_text_start)*/
/*        m_flash_config_region                           (RX) : ORIGIN = m_flash_config_start,           LENGTH = (m_flash_config_end - m_flash_config_start)*/
/*        TEXT_region2                                    (RX) : ORIGIN = m_flash_config_end+1,           LENGTH = (m_text_end - m_flash_config_end - 1)*/
/*}*/
/*if(gUseInternalStorageLink_d){*/
        InternalStorage                                 (RW) : ORIGIN = INT_STORAGE_END_C,              LENGTH = (INT_STORAGE_START_C - INT_STORAGE_END_C)
/*}*/
/*if(gUseNVMLink_d){*/
        NVM_region           (RW) : ORIGIN = NV_STORAGE_END_ADDRESS_C,       LENGTH = (NV_STORAGE_START_ADDRESS_C - NV_STORAGE_END_ADDRESS_C)
/*}*/
        DATA1_region         (RW) : ORIGIN = m_data1_start, LENGTH = (m_data1_end - m_data1_start + 1)
        DATA2_region         (RW) : ORIGIN = m_data2_start, LENGTH = (__region_RAM2_end__ - __region_RAM2_start__ + 1)
        PRODUCT_INFO_region  (RX) : ORIGIN = m_fsl_prodInfo_start, LENGTH = (m_fsl_prodInfo_end - m_fsl_prodInfo_start)
}
/* Define output sections */
SECTIONS
{
   /* Place in the first memory bank the memHeap */
  /*
  .data1 :
  {
    ./framework/MemManager/Source/MemManager.o(.bss*)
  } > DATA1_region
  */
  /* The startup code goes first into internal flash */
  .interrupts :
  {
    __VECTOR_TABLE = .;
    . = ALIGN(4);
    KEEP(*(.isr_vector))     /* Startup code */
    . = ALIGN(4);
  } > TEXT_region1
  .freescale_prod_data :
  {
    . = ALIGN(4);
    KEEP(*(.FREESCALE_PROD_DATA))
    . = ALIGN(4);
  } > PRODUCT_INFO_region
/*if(gUseBootloaderLink_d){*/
        .BootloaderFlags :
        {
            . = ALIGN(4);
            KEEP(*(.BootloaderFlags));
            . = ALIGN(4);
        } > BootFlags_region
/*}*/
/*else{*/
/*  .flash_config :*/
/*  {*/
/*    . = ALIGN(4);*/
/*    KEEP(*(.FlashConfig))*/    /* Flash Configuration Field (FCF) */
/*    . = ALIGN(4);*/
/*  } > m_flash_config_region*/
/*}*/
  /* The program code and other data goes into internal flash */
  .text :
  {
    . = ALIGN(4);
    *(.text)                 /* .text sections (code) */
    *(.text*)                /* .text* sections (code) */
    *(.rodata)               /* .rodata sections (constants, strings, etc.) */
    *(.rodata*)              /* .rodata* sections (constants, strings, etc.) */
    *(.glue_7)               /* glue arm to thumb code */
    *(.glue_7t)              /* glue thumb to arm code */
    *(.eh_frame)
    KEEP (*(.init))
    KEEP (*(.fini))
    . = ALIGN(4);
  } > TEXT_region2
  .NVM_TABLE :
  {
    . = ALIGN(4);
    PROVIDE(__start_NVM_TABLE = .);
    KEEP(*(.NVM_TABLE));
    PROVIDE(__stop_NVM_TABLE = .);
    . = ALIGN(4);
  } > TEXT_region2
  .VERSION_TAGS :
  {
    . = ALIGN(4);
    PROVIDE(__start_VERSION_TAGS = .);
    KEEP(*(.VERSION_TAGS));
    PROVIDE(__stop_VERSION_TAGS = .);
    . = ALIGN(4);
  } > TEXT_region2
  .ARM.extab :
  {
    *(.ARM.extab* .gnu.linkonce.armextab.*)
  } > TEXT_region2
  .ARM :
  {
    __exidx_start = .;
    *(.ARM.exidx*)
    __exidx_end = .;
  } > TEXT_region2
 .ctors :
  {
    __CTOR_LIST__ = .;
    /* gcc uses crtbegin.o to find the start of
       the constructors, so we make sure it is
       first.  Because this is a wildcard, it
       doesn't matter if the user does not
       actually link against crtbegin.o; the
       linker won't look for a file to match a
       wildcard.  The wildcard also means that it
       doesn't matter which directory crtbegin.o
       is in.  */
    KEEP (*crtbegin.o(.ctors))
    KEEP (*crtbegin?.o(.ctors))
    /* We don't want to include the .ctor section from
       from the crtend.o file until after the sorted ctors.
       The .ctor section from the crtend file contains the
       end of ctors marker and it must be last */
    KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors))
    KEEP (*(SORT(.ctors.*)))
    KEEP (*(.ctors))
    __CTOR_END__ = .;
  } > TEXT_region2
  .dtors :
  {
    __DTOR_LIST__ = .;
    KEEP (*crtbegin.o(.dtors))
    KEEP (*crtbegin?.o(.dtors))
    KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors))
    KEEP (*(SORT(.dtors.*)))
    KEEP (*(.dtors))
    __DTOR_END__ = .;
  } > TEXT_region2
  .preinit_array :
  {
    PROVIDE_HIDDEN (__preinit_array_start = .);
    KEEP (*(.preinit_array*))
    PROVIDE_HIDDEN (__preinit_array_end = .);
  } > TEXT_region2
  .init_array :
  {
    PROVIDE_HIDDEN (__init_array_start = .);
    KEEP (*(SORT(.init_array.*)))
    KEEP (*(.init_array*))
    PROVIDE_HIDDEN (__init_array_end = .);
  } > TEXT_region2
  .fini_array :
  {
    PROVIDE_HIDDEN (__fini_array_start = .);
    KEEP (*(SORT(.fini_array.*)))
    KEEP (*(.fini_array*))
    PROVIDE_HIDDEN (__fini_array_end = .);
  } > TEXT_region2
  __etext = .;    /* define a global symbol at end of code */
  __DATA_ROM = .; /* Symbol is used by startup for data initialization */
  /* reserve MTB memory at the beginning of m_data */
  .mtb : /* MTB buffer address as defined by the hardware */
  {
    . = ALIGN(8);
    _mtb_start = .;
    KEEP(*(.mtb_buf)) /* need to KEEP Micro Trace Buffer as not referenced by application */
    . = ALIGN(8);
    _mtb_end = .;
  } > DATA2_region
  .interrupts_ram :
  {
    . = ALIGN(4);
    __VECTOR_RAM__ = .;
    __interrupts_ram_start__ = .; /* Create a global symbol at data start */
    *(.m_interrupts_ram)     /* This is a user defined section */
    . += __ram_vector_table_size__;
    . = ALIGN(4);
    __interrupts_ram_end__ = .; /* Define a global symbol at data end */
  } > DATA2_region
  __VECTOR_RAM = __VECTOR_RAM__;
  __RAM_VECTOR_TABLE_SIZE_BYTES = (__interrupts_ram_end__ - __interrupts_ram_start__);
  .data : AT(__DATA_ROM)
  {
    . = ALIGN(4);
    __DATA_RAM = .;
    __data_start__ = .;      /* create a global symbol at data start */
    *(.data)                 /* .data sections */
    *(.data*)                /* .data* sections */
    KEEP(*(.jcr*))
    . = ALIGN(4);
    __data_end__ = .;        /* define a global symbol at data end */
  } > DATA2_region
  __DATA_END = __DATA_ROM + (__data_end__ - __data_start__);
  text_end = ORIGIN(TEXT_region2) + LENGTH(TEXT_region2);
  ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data")
  /* Uninitialized data section */
  .bss :
  {
    /* This is used by the startup in order to initialize the .bss section */
    . = ALIGN(4);
    __START_BSS = .;
    __bss_start__ = .;
    *(.bss)
    *(.bss*)
    *(COMMON)
    /*
    *(EXCLUDE_FILE (./framework/MemManager/Source/MemManager.o) .bss*)
    */
    . = ALIGN(4);
    __bss_end__ = .;
    __END_BSS = .;
  } > DATA2_region
  .heap :
  {
    . = ALIGN(8);
    __end__ = .;
    PROVIDE(end = .);
    __HeapBase = .;
    . += __size_heap__;
    __HeapLimit = .;
  } > DATA2_region
  .stack :
  {
    . = ALIGN(8);
    . += __size_cstack__;
  } > DATA2_region
  /* Initializes stack on the end of block */
  __StackTop   = ORIGIN(DATA2_region) + LENGTH(DATA2_region);
  __StackLimit = __StackTop - __size_cstack__;
  PROVIDE(__stack = __StackTop);
  .ARM.attributes 0 : { *(.ARM.attributes) }
  /* Remove this section to keep the nvm section on writting the device */
/*  #if gUseNVMLink_d && gEraseNVMLink_d */
/*  .NVM : */
/*  { */
/*    FILL(0xFFFFFFFF); */
/*    . = ORIGIN(NVM_region) + LENGTH(NVM_region) - 1; */
/*    BYTE(0xFF) */
/*  } > NVM_region */
  ASSERT(__StackLimit >= __HeapLimit, "region m_data overflowed with stack and heap")
}

6,322 Views
bobpaddock
Senior Contributor III

/* Workaround for  SRAM boundary GCC placement issue,
 not to place variables that are accessed by the code
 overlapping this boundary (forbidden by the Kinetis architecture) */
__region_RAM1_start__  =  (0x1FFF8000);
__region_RAM1_end__    =  (0x1FFFFFFF);
__region_RAM2_start__  =  (0x20000000);
__region_RAM2_end__    =  (0x20017FFF);

That is a bit unsettling to see.

Variables would normally be aligned to a 16 or 32 bit boundary would they not?
So why would they cross that boundary?

I can see that a struct with the packed attribute could do it, anything else?

0 Kudos
Reply

6,322 Views
florian_lebrun5
Contributor III

I'm really surprised that it works fine becuse i compare your file and the one in USB sdk, and i have note some differences like :

___________________________________________

Lothar:

gUseBootloaderLink_d : 0;

USB SDK linker file:

gUseBootloaderLink_d : 1;

____________________________________________

Lothar:

gUseInternalStorageLink_d : 0;

USB SDK linker file:

gUseInternalStorageLink_d : 1;

____________________________________________

 m_bootFlags_end      = (m_bootFlags_start + 7);

m_bootFlags_end     = (m_bootFlags_start + 16);

____________________________________________

/* #if gUseNVMLink_d && gEraseNVMLink_d */
/* .NVM : */
/* { */
/* FILL(0xFFFFFFFF); */
/* . = ORIGIN(NVM_region) + LENGTH(NVM_region) - 1; */
/* BYTE(0xFF) */
/* } > NVM_region */

should be linke this according to the tutorial:

.NVM :
{
FILL(0xFFFFFFFF);
. = ORIGIN(NVM_region) + LENGTH(NVM_region) - 1;
BYTE(0xFF)
} > NVM_region

but ORIGIN should stay and Lothar remove all.

So it seems that Lothar , you don't use the bootloader that is necessary to upgrade the firmware once downloaded and it seems you use external memory. Then how is it possible that you successfully use internal memory OTA feature please?

0 Kudos
Reply

6,322 Views
florian_lebrun5
Contributor III

Thanks a lot Lothar !

0 Kudos
Reply

6,322 Views
florian_lebrun5
Contributor III

in one month an application note will be written to merge OTAP example into HRS demo code. I will do the job upfront. I already did on previous sdk. With the new there is few differences. I will upte all my tool and re do the job to start clean. then i will follow this first tutorial: 

Reprogramming a FRDM-KW41 board using the OTAP Client Software 

doo you have the samedi linker fiile than the one in USB sdk now ?Or something quiet similar ?

0 Kudos
Reply

6,330 Views
lschoenfeld
Contributor III

Hi,

I also started with an usb sdk and had to modify the linker file. The tutorial is helpful.

Regards.

0 Kudos
Reply

6,330 Views
florian_lebrun5
Contributor III

hi , i m interrested in it too. does it mean ota can not work on kw41z please ? what are the news niw ? thanks a lot

0 Kudos
Reply

6,330 Views
lschoenfeld
Contributor III

Hi Florian,

in my project the OTAP works with the KW41Z now. I had to modify the memory layout for the KW41Z.

I’m able to do firmware update with the OTAP IoT Toolbox.

Regards

Lothar

6,330 Views
lschoenfeld
Contributor III

Hi Felipe,

how long does it takt to get a solution? Sorry, but I'm a little bit under pressure.

Regards

Lothar

0 Kudos
Reply

6,330 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Lothar,

 

Sorry but I don’t have that information. Sorry for any inconvenience.

 

Regards,

Felipe

0 Kudos
Reply

6,333 Views
lschoenfeld
Contributor III

Hi Felipe,

what issue will be fixed? The OTAP IoT Toolbox problem, the map file or both?

Regards

Lothar

0 Kudos
Reply

6,333 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Lothar,

The internal team has confirmed Internal Flash Storage is currently not supported on KW41Z linker and bootloader. They will take a look into this, thanks for bringing this issue to our attention.

Best regards,

Felipe

0 Kudos
Reply

6,333 Views
lschoenfeld
Contributor III

Hi Felipe,

the document describes the same thinks I did in KW41Z configuration. Sorry but that didn't help me. I tried to replace the Linker file. After building the application with the KW36 linker file I compare the memory configuration in the map file and I get totally confused. The Symbol _APP_START_ is 0x00000000 and __BootFlags_Start__ is 0x000020c0. How can this be? The Symbol gUseBootloaderLink_d is set to 1 in the MCUXpresso.

               0x00000400                HEAP_SIZE = DEFINED (__heap_size__)?__heap_size__:0x400
                0x00000400                STACK_SIZE = DEFINED (__stack_size__)?__stack_size__:0x400
                0x00000000                M_VECTOR_RAM_SIZE = DEFINED (__ram_vector_table__)?0xc0:0x0
                0x1fffc000                _RAM_START_ = 0x1fffc000
                0x2000c000                _RAM_END_ = 0x2000c000
                0x00000000                _ROM_START_ = 0x0
                0x00080000                _ROM_END_ = 0x80000
                0x0007f800                FREESCALE_PROD_DATA_BASE_ADDR = 0x7f800
                0x00000800                __sector_size__ = 0x800
                0x000000c0                __vector_table_size__ = 0xc0
                0x00000000                _APP_START_ = DEFINED (gUseBootloaderLink_d)?(_ROM_END_ / 0x40):_ROM_START_
                0x000020c0                __BootFlags_Start__ = (_APP_START_ + __vector_table_size__)
                0x00000000                __BootFlags_Size__ = DEFINED (gUseBootloaderLink_d)?0x20:0x0
                0x0007f800                NV_STORAGE_START_ADDRESS = FREESCALE_PROD_DATA_BASE_ADDR
                0x00000800                NV_STORAGE_SECTOR_SIZE = __sector_size__
                0x00000004                NV_STORAGE_MAX_SECTORS = 0x4
                0x0007d800                NV_STORAGE_END_ADDRESS = (NV_STORAGE_START_ADDRESS - (NV_STORAGE_MAX_SECTORS * NV_STORAGE_SECTOR_SIZE))
                0x00000800                INT_STORAGE_SECTOR_SIZE = NV_STORAGE_SECTOR_SIZE
                0x0007f800                INT_STORAGE_START = DEFINED (gUseNVMLink_d)?NV_STORAGE_END_ADDRESS:FREESCALE_PROD_DATA_BASE_ADDR
                0x00000000                INT_STORAGE_SIZE = DEFINED (gUseInternalStorageLink_d)?(INT_STORAGE_SECTOR_SIZE * ((((INT_STORAGE_START - _APP_START_) / 0x2) / INT_STORAGE_SECTOR_SIZE) + 0x1)):0x0
                0x0003f800                INT_STORAGE_END = (INT_STORAGE_START - INT_STORAGE_SIZE)
                0x00000400                _FLASH_CONFIG_START_ = DEFINED (gUseBootloaderLink_d)?(__BootFlags_Start__ + __BootFlags_Size__):0x400
                0x00000010                _FLASH_CONFIG_SIZE_ = 0x10
                0x000020f0                _TEXT_START_ = (_FLASH_CONFIG_START_ + _FLASH_CONFIG_SIZE_)
                0x0007f800                _TEXT_END_ = DEFINED (gUseNVMLink_d)?NV_STORAGE_END_ADDRESS:FREESCALE_PROD_DATA_BASE_ADDR

Second:

I tried to update the FRDM-KW41Z using the NXP Test Tool 12 with a FRDM-KW41Z Server module. In this case I can do the OTAP Update. So the problem isn't the configuration of the FRDM-KW41Z Client it is the iOS IoT OTAP application. Please be so kind and do some test bevor replay to my request.

0 Kudos
Reply

6,333 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Lothar,

 

This issue has been confirmed as an error in the OTAP example when using internal flash. It has been reported internally so it can be fixed for next releases. Thanks for your comments.

 

Best regards,

Felipe

0 Kudos
Reply

6,333 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Lothar,

 

Could you please try using the following document? It is intended for KW36 but it should work for KW41Z.

https://community.nxp.com/docs/DOC-342493

 

Best regards,

Felipe

0 Kudos
Reply

6,333 Views
pradnyachaudhar
Contributor I

I am implementing the same with FRDM-KW36Z OTAP client internal storage eeprom device internal flash, and have the same issue. Firmware update restarts at 24 percent.

Also i found the progress bar of the  Firmware update is fake, even if the device is switched/powered off the App still shows connected and the progress bar increases to the percent last shown and starts again.

NXP please update this and stop misleading us.