Hey all!
I've bought a FRDM-KL05Z development board and I'm trying to setup the development environment in Keil uVision MDK-ARM v5.15 by trying to run the demo examples included in the FRDM-KL05Z Sample Code Package.
First I've loaded OpenSDA bootloader with PEMicro FRDM-KL05Z Mass Storage/Debug App v1.14 and I'm able to program sucessfully the board from Keil uVision.
However, when i try to debug a simple project like LED_Blink on uVision, I'm unable to run the code, it always halts in the HardFault_Handler at beginning and I can't figure out why.
Can somebody please help me figure out the problem and point me where I can get more information about the reason the program is halting?
Many thanks for your help and attention!
Best regards,
Solved! Go to Solution.
Ricardo
I just downloaded the package and opened the "LED_Blink" project.
It is set up for the KL25 and not the KL05 - if you change the device to suit it's memory map is then correct.
Regards
Mark
Kinetis: µTasker Kinetis support
KL05: µTasker FRDM-KL05Z support
For the complete "out-of-the-box" Kinetis experience and faster time to market
Hello Ricardo
There is not enough information shown to see what the problem is (eg. you haven't shown the register values).
If you don't make progress there is a complete solution at µTasker FRDM-KL05Z support including uVision5 support for your board (as well as [approx.] real-time KL05 and FRDM-KL05Z board simulation).
Regards
Mark
Kinetis: µTasker Kinetis support
KL05: µTasker FRDM-KL05Z support
For the complete "out-of-the-box" Kinetis experience and faster time to market
Which registers should I show you to help me figure out the problem?
Are these enough?
Thank you very much for your help mjbcswitzerland !
Hello Ricardo
All looks correct at that location.
Are you sure that it will crash at this point or does it do so later?
Regards
Mark
Kinetis: µTasker Kinetis support
KL05: µTasker FRDM-KL05Z support
For the complete "out-of-the-box" Kinetis experience and faster time to market
Hi mjbcswitzerland,
Here are all the steps of execution in sequence, from Reset state until the program halts:
Thank you very much for your help!
Ricardo
Your stack pointer is set up incorrectly.
It is at 0x1ffff420 but the KL05 (largest version with k RAM) has RAM between 0x1ffffc00 and 0x20000c00.
Regards
Mark
Kinetis: µTasker Kinetis support
KL05: µTasker FRDM-KL05Z support
For the complete "out-of-the-box" Kinetis experience and faster time to market
How can i solve it then?
Since these code examples were downloaded from Freescale's website - FRDM-KL05Z Sample Code Package - weren't they supposed to run out of the box?! :\
Ricardo
I just downloaded the package and opened the "LED_Blink" project.
It is set up for the KL25 and not the KL05 - if you change the device to suit it's memory map is then correct.
Regards
Mark
Kinetis: µTasker Kinetis support
KL05: µTasker FRDM-KL05Z support
For the complete "out-of-the-box" Kinetis experience and faster time to market
Worked perfectly! Thank you very much for your help and attention mjbcswitzerland ! :smileywink: