FRDM-KL25z uTasker SerialBootloader application program
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I try to use uTasker serial bootloder for load my application on frdmkl25z, i follow so many post about the argument but i dont't understend what is the problem.
i dont't use porocessor exper to write my application.
I done the follows steps:
1) I flash the utasker Serial bootloader on my frdmkl25z with succesfull
2) I build my application with the follows linker file settings:
3)I add in the file system_MKL25Z4.c locate in the directory Startup_Code of the project, in the SystemInit function, the follow code istruction to shift the interrupt array in the memory RAM space
4) I update my application file in SREC format by serial port. The uploading of the file was succesfull but when i try to send the GO command, the frdmkl25z will reset and display my the boot loader menu again
I hope someone can help me !

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Matteo
Are you sure that the SREC loader works with 0x8080 as application location? 0x8080 is typical for loaders supporting USB, serial and SD card (or combinations) but if you have bult for just UART loading it may be somethin like 0x2800 instead.
On the startup screen (menu) you should see the valid application range. Also make sure that your application is not larger than the defined application size.
Regards
Mark
Kinetis: µTasker Kinetis support
KL25: µTasker Kinetis FRDM-KL25Z support / µTasker Kinetis TWR-KL25Z48M support
For the complete "out-of-the-box" Kinetis experience and faster time to market
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mark, thank for answer,
my start address was 0X8080 because i changed it to test my compiled uTasker SerialBootloader with an example application that i find to test Serialboot Loader.
Now i changed the start as defoult and the serial bootloader show me the follow address interval:
now obviously i changed also the start address of my application but is not change anything.
i'm quite secure that the application don't go on the end addres 0xc7ff because in the srec file of the application i can see that the last application address is 0xB21C0 as you can see also in the follow image
Do you think is correct how i move the interrupt vector to the RAM space as i show in the last post ?
There something wrong in the linker file ?
I wrote my application with kinetis design studio
Regards
Mat

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mat
If you post the SREC that you are loading I can load it to my FRDM board and tell you why the application is not starting/running.
If possible, also post the map file belonging to the SREC since I may then be able to tell you in which function a change may be required.
Regards
Mark
Kinetis: µTasker Kinetis support
KL25: µTasker Kinetis FRDM-KL25Z support / µTasker Kinetis TWR-KL25Z48M support
For the complete "out-of-the-box" Kinetis experience and faster time to market
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Matteo
The first thing that I see in the SREC is that your code is linked to start at 0x2800, whic is correct. Therefore I set up the uTasker FRDM-KL25Z serial loader for SREC loading at this address. I also removed the define INTERMEDIATE_PROG_BUFFER and set the serial speed to SERIAL_BAUD_19200 [the virtual COM in OpenSDA doesn't respect XON/XOFF operation so I removed this and set a slow speed to ensure that there are no overruns when programming to Flash].
Then I loaded you code:
uTasker Serial Loader
=======================
[0x00002800/0x0000c7ff]
bc = blank check
dc = delete code
ld = start load
go = start application
> bc
Checking Flash... EMPTY!
> ld
Please start S-REC download: ................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................
..................................................................................................................................................................................................................................................
Terminated - restarting...
Finally I cheked what it was doing, whereby it starts up correctly.
1. However the code fails in the routine Clock_Init()
2. I can also see that the VTOR is set to 0xfffff000 which is incorrect - if an interrupt were to fire it would cause failure.
With these two pieces of information you can probably correct your application.
Note also that there is no restriction to debugging your application together with teh serial loader - just connect the debugger (without loading) and debug code as normal.
Note also that you can also use KBOOT (instead of SREC loading) loading by simple setting the define KBOOT_LOADER. Sine KBOOT has a handshake in its protocol it doesn't have the OpenSDA XON/XOFF restriction.
Regards
Mark
Kinetis: µTasker Kinetis support
KL25: µTasker Kinetis FRDM-KL25Z support / µTasker Kinetis TWR-KL25Z48M support
For the complete "out-of-the-box" Kinetis experience and faster time to market
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi Mark,
i load my code without using sda but by a usb/uart converter connected to the uart0.
there is something the is not clear for my. In my application i write a code to copy my interrupt vector at begin of the ram space for thie reason i put in the VTOR the address 0xfffff000. I did this in the startup code with follow instructions.
is this necessary when i work with boot loader or not ?
When i load my application without boot loader, starting from address 0x00000 the Clock_Int() function don't give me any problems
regards
Mat

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Matteo
1. SCB->VTOR = (uint32_t)(0x1ffff000<<7); is incorrect.
SCB->VTOR = (uint32_t)(0x1ffff000); is what you need. The <<7 is false.
2. It may be that there is an interrupt firing during the clock initialisation because I couldn't (easily) see where it was failing (I could see that interrupt had been enabled at that point). Since it was failing with a reset as result it was likely a core error due to failing interrupts.
Correct 1. first and maybe 2 is then not an issue.
If 2 still fails, remember that the serial loader has already configured the clock to run at 48MHz and so you may be able to simply skip the clock initialisation altogether. Otherwise you may neen to change it to be able to handle it already being initialised, rather than the code assuming that the clock is in its reset state.
If you load via a "real" usb/UART converter you can use the faster baud rate with the intermediate buffer (controlled by XON/XOFF).
Regards
Mark
Kinetis: µTasker Kinetis support
KL25: µTasker Kinetis FRDM-KL25Z support / µTasker Kinetis TWR-KL25Z48M support
For the complete "out-of-the-box" Kinetis experience and faster time to market
