background image

Software

 Migration in MCUXpresso IDE 

Migration Guide from MKW36Z512xxx4 to MKW35Z512xxx4, User's Guide, Rev. 1, 06/2019 

NXP Semiconductor 

 

21 

 

 

 

Figure 26.  Updating assembler paths 

 

10.

 

Open 

MCU C Compiler/Preprocessor 

window, edit the CPU_MKW36Z512VHT4 and 

CPU_MKW36Z512VHT4_cm0plus macros by CPU_MKW3

5

Z512VHT4_cm0plus and 

CPU_MKW3

5

Z512VHT4_cm0plus respectively. Delete FRDM_KW36 and FREEDOM 

macros. Then click Apply and Close button.  

Summary of Contents for MKW35Z512xxx4 Series

Page 1: ...ftware testers software integrators and customers designing their own hardware NXP Semiconductor Document Number AN12252 User s Guide Rev 1 06 2019 Contents 1 Introduction 1 2 Hardware Considerations 2 2 1 Peripherals Instantiation 2 2 2 MCU On chip Memory 3 3 Software Development Kit Download and Install 5 4 Software Migration in IAR Embedded Workbench 8 4 1 Changes Required in Project Options an...

Page 2: ... Instantiation KW36 35 devices are pin to pin compatible for both available packages 40 pin QFN and 48 pin LQFN MKW35 does not support LPUART1 and FlexCAN therefore the signals of the last instances are not available for multiplexing in this device Bold alternatives are only included for MKW36 microcontroller MKW35 36 instance comparative Pin Name ALT0 ALT1 ALT2 ALT3 ALT4 ALT5 ALT6 ALT7 ALT8 ALT9 ...

Page 3: ...ATA SPI1_PCS0 CAN0_RX PTC16 PTC16 LLWU_P0 RF_ STATUS SPI0_SCK I2C0_SDA LPUART0_ RTS_b TPM0_CH3 LPUART1_ RTS_b PTC17 PTC17 LLWU_P1 RF_EXT_ OSC_EN SPI0_SOUT I2C1_SCL LPUART0_ RX BSM_ FRAME DTM_RX LPUART1_ RX PTC18 PTC18 LLWU_P2 SPI0_SIN I2C1_SDA LPUART0_ TX BSM_DATA DTM_TX LPUART1_ TX PTC19 PTC19 LLWU_P3 RF_ EARLY_ WARNING SPI0_PCS0 I2C0_SCL LPUART0_ CTS_b BSM_CLK LPUART1_ CTS_b Table 2 is not a ful...

Page 4: ...y divided in 2 KB sectors flash address range from 0x1000_0000 to 0x1003_FFFF with an Alias memory with address range 0x0004_0000 to 0x0007_FFFF FlexNVM memory can be used as Program Flash P Flash Data Flash D Flash and EEPROM Flash Figure 1 KW36 Flash Memory Map 2 2 2 MKW35 Flash Memory MKW35 Flash does not support FlexNVM nor Alias memory therefore Program Flash array increase to 2x256 KB Progra...

Page 5: ...d Install This chapter provides all the steps needed to download the SDK Software Development Kit for MKW35Z512xxx4 due it is used as starting point to migrate a MKW36 code to MKW35 MCU Below are the steps to download the SDK package 1 Go to MCUXpresso web page mcuxpresso nxp com 2 Log in with your registered account 3 Search for KW35Z device Then click on the suggested processor and click on Buil...

Page 6: ...elect All toolchains in the Toolchain IDE box and provide name to identify the package Figure 4 Selecting version of SDK 5 Click on the Request Build button This will start the building process of the desired SDK It will take few minutes until the system get the package into your profile in MCUXpresso web page 6 Once the SDK is ready to download it is displayed in the MCUXpresso Dashboard as shown...

Page 7: ... download icon as shown in Figure 5 A new window appears to download the package Figure 6 MKW35 SDK displayed in Dashboard 8 Accept the license agreement and save the SDK in your desired location 9 If MCUXpresso IDE is used drag and drop the MKW35 SDK zip folder in Installed SDK s perspective to install the package At this point you have downloaded and installed the SDK package for MKW35Z device ...

Page 8: ...uded in SDK 4 1 Changes Required in Project Options and Settings In this section bare metal version of the project was used however the same steps apply for freertos projects Some paths related to bm projects may differ if freertos versions were used 1 Open the heart rate sensor project located at the following path SDK_root boards frdmkw36 wireless_examples bluetooth hrs bm iar hrs_bm eww 2 Selec...

Page 9: ...dleware wireless framework_5 4 2 DCDC Interface SDK_root middleware wireless framework_5 4 2 DCDC Source SDK_root middleware wireless framework_5 4 2 LowPower Interface SDK_root middleware wireless framework_5 4 2 LowPower Source SDK_root middleware wireless framework_5 4 2 XCVR Figure 9 Creating MKW35Z folders 5 Copy all files inside MKW36Z folders located at the above mentioned paths and paste i...

Page 10: ... of 6 in the additional include directories text box The results must look similar as shown below PROJ_DIR middleware wireless framework_5 4 2 LowPower Interface MKW35Z PROJ_DIR devices MKW35Z4 drivers PROJ_DIR middleware wireless framework_5 4 2 DCDC Interface MKW35Z PROJ_DIR middleware wireless framework_5 4 2 XCVR MKW35Z4 PROJ_DIR devices MKW35Z4 PROJ_DIR devices MKW35Z4 utilities Figure 11 Upd...

Page 11: ...elect all files click the right mouse button and select the Remove option Click right mouse button on the folder and select Add Add files Add the startup_MKW35Z4 s located at this path SDK_root devices MKW35Z4 iar startup_MKW35Z4 s Also add system_MKW35Z4 c and system_MKW35Z4 h into the startup folder Both files are located at next path SDK_root devices MKW35Z4 Figure 13 Replacing startup and syst...

Page 12: ...akeupReason function Figure 14 Updating PWRLib c file 10 Open clock_config c file in board folder Delete CLOCK_SetLpuart1Clock call to function in the BOARD_BootClockRUN function Figure 15 Updating clock_config c file 11 If it is necessary open the app_preinclude h file under the source directory in the workspace This file contains important information about the board such as the number of switch...

Page 13: ...onductor 13 Figure 16 Location of preinclude file 12 If it is necessary open the pin mux files pin_mux c and pin_mux h and gpio files gpio_pins c and gpio_pins h under the board directory in the workspace These files contain alternatives options and multiplexing information of the pins Examine and update to fit into own custom board ...

Page 14: ...onnectivity icf file located at SDK_root middleware wireless framework_5 4 4 Common devices MKW35Z4 iar Into the folder of the heart rate sensor project located at the following path SDK_root boards frdmkw36 wireless_examples bluetooth hrs bm iar 14 Open the project options window Alt F7 In Linker Config window click the icon next to linker path and select the linker configuration file MKW35Z512xx...

Page 15: ...igure 18 Updating the linker file 15 Click the OK button in the project options window to save the new configuration 16 Select the project in the workspace click the right mouse button and press clean 17 Rebuild the project At this point the project is already migrated and you can customize the application for your own purpose using MKW35 device ...

Page 16: ...migrate a MKW36 example code to MKW35 MCU in MCUXpresso IDE The Heart Rate Sensor project is used as base because it has easy to understand example and involves the Bluetooth LE connectivity software stack included in SDK 5 1 Changes Required in Project Properties 1 Find the Quickstart Panel in the lower left hand corner Figure 19 Quickstart Panel perspective in MCUXpresso IDE 2 Then click on Impo...

Page 17: ...esso IDE Migration Guide from MKW36Z512xxx4 to MKW35Z512xxx4 User s Guide Rev 1 06 2019 NXP Semiconductor 17 Figure 20 Importing an SDK example 3 Click on the frdmkw36 board and then click on Next Figure 21 Select FRDM KW36 board ...

Page 18: ...xample projects Use the arrow button to expand the list and locate the hrs project wireless_examples bluetooth hrs then select the bm version of the project and click Finish Figure 22 Opening heart rate sensor project 5 Go to Project Properties Expand C C Build MCU settings and select MKW35Z512xxx4 MCU lick Apply and Close button to save the configuration Figure 23 Selecting MKW35 MCU ...

Page 19: ...rs_project_root framework LowPower Source MCUXpresso_hrs_project_root framework XCVR 7 Select the heart rate sensor project in the workspace and press F5 to refresh the modified folders Figure 24 Updating project folders in the workspace 8 Open the Project Properties window in MCUXpresso IDE Go to C C Build Settings and select MCU C Compliler Includes folder in Tool Settings window Edit all paths ...

Page 20: ...9 20 NXP Semiconductor Figure 25 Updating include paths 9 Select MCU Assembler General folder in Tool Settings Edit the paths related to MKW36 MCU The results must look similar as shown below framework LowPower Interface MKW35Z framework LowPower Source MKW35Z framework DCDC Interface MKW35Z framework XCVR MKW35Z4 ...

Page 21: ...6 2019 NXP Semiconductor 21 Figure 26 Updating assembler paths 10 Open MCU C Compiler Preprocessor window edit the CPU_MKW36Z512VHT4 and CPU_MKW36Z512VHT4_cm0plus macros by CPU_MKW35Z512VHT4_cm0plus and CPU_MKW35Z512VHT4_cm0plus respectively Delete FRDM_KW36 and FREEDOM macros Then click Apply and Close button ...

Page 22: ...n the workspace 12 Unzip the MKW35Z SDK package and search for fsl_device_registers MKW35Z4 MKW35Z4_features system_MKW35Z4 h and system_MKW35Z4 c files into this folder at the following paths SDK_folder_root devices MKW35Z4 fsl_device_registers h SDK_folder_root devices MKW35Z4 MKW35Z4 h SDK_folder_root devices MKW35Z4 MKW35Z4_features h SDK_folder_root devices MKW35Z4 system_MKW35Z4 h SDK_folder...

Page 23: ...tup folder in the workspace by the startup_MKW35Z4 S This file is located as the same as in the last step in the MKW35Z SDK at following path SDK_folder_root devices MKW35Z4 gcc startup_MKW35Z4 S Figure 29 Updating the startup file 14 Some files need to be updated Go to PWRLib c file in workspace framework LowPower Source MKW35Z Replace LPUART0_LPUART1_IRQn by LPUART0_IRQn in the PWRLib_StopUpdate...

Page 24: ...Lpuart1Clock call to function in the BOARD_BootClockRUN function Figure 31 Updating clock_config c file 16 If it is necessary open the app_preinclude h file under the source directory in the workspace This file contains important information about the board such as the number of switches and LED s timers power consumption settings etc Examine and update this file to fit into own custom board Figur...

Page 25: ...the board directory in the workspace These files contain alternatives options and multiplexing information of the pins Examine and update to fit into own custom board Figure 33 Location of pin mux and gpio files 18 Replace the MKW36Z512xxx4_PD_connectivity ld file by MKW35Z512xxx4_connectivity ld located at SDK_root middleware wireless framework_5 4 4 Common devices MKW35Z4 gcc Into the source fol...

Page 26: ... according with MKW35 device Press Apply and Close button Figure 35 Establishing the linker path 20 Build the project At this point the project is already migrated and you are ready to play with the demo using MKW35 6 Build and Run Bluetooth LE Connectivity Stack Examples All the examples referenced in BLE Demo Applications User s Guide BLEDAUG are compatible with MKW35 device following modificati...

Page 27: ......

Page 28: ...ustomer s applications and products and NXP accepts no liability for any vulnerability that is discovered Customers should implement appropriate design and operating safeguards to minimize the risks associated with their applications and products NXP the NXP logo NXP SECURE CONNECTIONS FOR A SMARTER WORLD COOLFLUX EMBRACE GREENCHIP HITAG I2C BUS ICODE JCOP LIFE VIBES MIFARE MIFARE CLASSIC MIFARE D...

Reviews: