Hello, I need to develop an ieee802.15.4 application on KW21Z256.
I use the MCUXpressoIDE v11.1.1 for development with the following SDK:
SDK_2.2.3_MKW21Z256xxx4.zip
SDK_2.2.3_FRDM-KW41Z.zip
I was able to run the Driver example in KW21Z256 successfully by the following steps:
1. import the FRDM_KW41Z512 SDK Driver example for lpuart in MCUXpressoIDE.
2. change the MCU from KW41Z512 to KW21Z256 in the MCU Setting
3. change the MCU Memory Detail in the MCU Setting:
Program flash size from 0x80000 to 0x40000,
RAM start address from 0x1FFF8000 to 0x1FFFC000
RAM size from 0x20000 to 0x10000.
So far, I am able to debug the project and test the UART echo function on my custom board successfully.
Then I tried to import the ieee802.15.4 wireless example msn_end_device_bm for FRDM_KW41Z512. I had followed the same steps as above. Additionally, I modified memory limits in the linker file as following:
/*-Memory Limits-*/
__region_ROM_start__ = (0x00000000);
__region_ROM_end__ = (0x0003FFFF);
/* 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__ = (0x1FFFC000);
__region_RAM1_end__ = (0x1FFFFFFF);
__region_RAM2_start__ = (0x20000000);
__region_RAM2_end__ = (0x2000BFFF);
Now, I was able to build the project successfully and download the code into the same board (KW21Z256) using JLink. However, when I tried to debug the project, the program did not start at main(). It went to an unexpected and unknown location, even after I clicked "Restart" Button.
When I clicked "Suspend" Button, the Debug Window shown the following information:
frdmkw41z_wireless_examples_ieee_802_15_4_msn_end_device_bm JLink Debug [GDB SEGGER Interface Debugging]
frdmkw41z_wireless_examples_ieee_802_15_4_msn_end_device_bm.axf
Thread #1 57005 (Suspended : Signal : SIGTRAP:Trace/breakpoint trap)
__udivsi3() at 0x600
__aeabi_fsub() at 0x1610
0x100
arm-none-eabi-gdb (8.3.0.20190703)
Could you please advise how to run the ieee802.15.4 example correctly in my custom board (KW21Z256)?
Thank you very much!