Build Error FRDMKW41z bluetooth otap client example

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

Build Error FRDMKW41z bluetooth otap client example

1,096 Views
lschoenfeld
Contributor III

I'm working with MCUXpresso IDE v10.3.0 [Build 2200] [2018-12-03] on Windows 10 and the SDK_2.x_MKW41Z512xxx4 Version 2.2.0.I import the SDK example frdmkw41z_wireless_examples_bluetooth_otap_client_att_freertos. When I try to build the project I get the following error message: ../startup/startup_MKW41Z4.S:176: undefined reference to `_start'

What can I do to resolve the problem?

0 Kudos
10 Replies

809 Views
lschoenfeld
Contributor III

Hi Estephania,

 

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 modified KW36 linker file it seems to work.

Regards

Lothar

0 Kudos

809 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

The issue has been reported, thank you for the feedback. What you can do meanwhile it's either to use the linker file you mention or you can also add the missing elements in the KW41Z using as a base the KW36 code examples. 

Sorry for the inconvenience this might cause you. 

Regards, 

Estephania 

0 Kudos

809 Views
lschoenfeld
Contributor III

Dear Estephania,

the error messages I send you at 03.05. for example "undefined reference to `INT_STORAGE_SIZE'" haven't anything to do with the UART or Semihosting.

Please have a look at my comment from 06.05. and tell me when you provide a new MKW41Z512xxx4_connectivity.ld file. The problem is that some required declarations didn't exist.

Regards

0 Kudos

809 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 


Could you please try adapting you project as it is mentioned here? 

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

Regards, 

Estephania

0 Kudos

809 Views
lschoenfeld
Contributor III

Dear Estephania,

I found an older version of the MKW41Z512xxx4_connectivity.ld file. In that file the following additional code exist:

#if gUseInternalStorageLink_d
        #if gUseNVMLink_d
                INT_STORAGE_START = NV_STORAGE_END_ADDRESS - 1;
                #define INT_STORAGE_START_C   (NV_STORAGE_END_ADDRESS_C - 1)
        #else
                INT_STORAGE_START = m_fsl_prodInfo_start - 1;
                #define INT_STORAGE_START_C   (m_fsl_prodInfo_start - 1)
        #endif
        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;
        #define INT_STORAGE_SIZE_C                (m_sector_size * ( ( ( INT_STORAGE_START_C + 1 - __region_ROM_start__ ) / 2 ) / m_sector_size + 1 ) )
        #define INT_STORAGE_END_C                 (INT_STORAGE_START_C - INT_STORAGE_SIZE_C + 1)
        #define INT_STORAGE_SECTOR_SIZE_C (m_sector_size)
#endif
There is the missing reference for the INT_STORAGE_SIZE defined.
Do you have a new version of the MKW41Z512xxx4_connectivity.ld which supports the use of internal storage?
Regards.
0 Kudos

809 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

When importing the project there is an option to use the UART or the Semhosting, in the wireless connectivity examples there is the need to use the UART interface, and that might be the reason why you are having the issues. 

Also, the fags you are using are intended to be for OTA, are you using that example? Are you configuring the client or the server? 

Which it'your end application? 

Regards, 

Estephania 

0 Kudos

809 Views
lschoenfeld
Contributor III

Dear Estephania,

I didn't understand what you mean. I import the project from the SDK example folder wireless_examples/Bluetooth/otap_client_att/freertos. What does the uart or semihosting have to do with the error messeges when I like to use the internal storage for the eeprom (#define gEepromType_d  gEepromDevice_InternalFlash_c in the app_preinclude.h)?

Regards

0 Kudos

809 Views
lschoenfeld
Contributor III

Dear,

I've installed the new MCUXpresso IDE and it works.

Now I've configured the project how it was diecribed in the document "Bluetooth® Low Energy Application
Developer’s Guide" Chapter 11.7.2. To use internal storage  I set up the gUseInternalStorageLink_d=1 Symbol and the gEepromType_d value to gEepromDevice_InternalFlash_c in the app_preinclude.h. I also set gUseNVMLink_d=1, gEraseNVMLink_d=1 and gUseBootloadeLink_d=1. 

The I tried to build and get the following Errors:

Memory region         Used Size  Region Size  %age Used
Bootloader_region:          0 GB      16383 B      0.00%
    TEXT_region1:         192 B        192 B    100.00%
BootFlags_region:           4 B          7 B     57.14%
    TEXT_region2:      203292 B     497463 B     40.87%
      NVM_region:        8191 B       8191 B    100.00%
    DATA1_region:          0 GB        32 KB      0.00%
    DATA2_region:       30784 B        96 KB     31.32%
./framework/OtaSupport/Source/OtaSupport.o: In function `OTA_StartImage':
C:\CK130\frdmkw41z_wireless_examples_bluetooth_otap_client_att_freertos\Debug/../framework/OtaSupport/Source/OtaSupport.c:231: undefined reference to `INT_STORAGE_SIZE'
./framework/OtaSupport/Source/OtaSupport.o: In function `OTA_InitExternalMemory':
C:\CK130\frdmkw41z_wireless_examples_bluetooth_otap_client_att_freertos\Debug/../framework/OtaSupport/Source/OtaSupport.c:475: undefined reference to `INT_STORAGE_END'
./framework/Flash/External/Source/Eeprom_InternalFlash.o: In function `EEPROM_EraseBlock':
C:\CK130\frdmkw41z_wireless_examples_bluetooth_otap_client_att_freertos\Debug/../framework/Flash/External/Source/Eeprom_InternalFlash.c:153: undefined reference to `INT_STORAGE_SECTOR_SIZE'
C:\CK130\frdmkw41z_wireless_examples_bluetooth_otap_client_att_freertos\Debug/../framework/Flash/External/Source/Eeprom_InternalFlash.c:153: undefined reference to `INT_STORAGE_END'
./framework/Flash/External/Source/Eeprom_InternalFlash.o: In function `EEPROM_WriteData':
C:\CK130\frdmkw41z_wireless_examples_bluetooth_otap_client_att_freertos\Debug/../framework/Flash/External/Source/Eeprom_InternalFlash.c:208: undefined reference to `INT_STORAGE_END'
./framework/Flash/External/Source/Eeprom_InternalFlash.o: In function `EEPROM_ReadData':
C:\CK130\frdmkw41z_wireless_examples_bluetooth_otap_client_att_freertos\Debug/../framework/Flash/External/Source/Eeprom_InternalFlash.c:235: undefined reference to `INT_STORAGE_END'
PRODUCT_INFO_region:          0 GB       2047 B      0.00%
./framework/Flash/External/Source/Eeprom_InternalFlash.o: In function `EEPROM_PrepareForWrite':
C:\CK130\frdmkw41z_wireless_examples_bluetooth_otap_client_att_freertos\Debug/../framework/Flash/External/Source/Eeprom_InternalFlash.c:288: undefined reference to `INT_STORAGE_SECTOR_SIZE'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:72: frdmkw41z_wireless_examples_bluetooth_otap_client_att_freertos.axf] Error 1

Regards

0 Kudos

809 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

Please be sure that import your problem making sure you are using the UART interface and not the semihosting. 

Regards, 
Estephania

0 Kudos

809 Views
lpcxpresso_supp
NXP Employee
NXP Employee

There are issues using some of the Connectivity examples with MCUXpresso IDE 10.3.0. So in the first place, please download and install the latest MCUXpresso IDE v10.3.1 :

And make sure that you use a new workspace and then reimport the examples. 

Regards,

MCUXpresso IDE Support

0 Kudos