Hi roymessinger,
Thank you for your new post, next time if you have new question, just post it out, instead of sending me in the message, thank you! We will help you in your post.
1. In the KBOOT folder of NXP there are few loaders (flashloader, flashloader_loader and freedom_loader). I did not understand what is the difference between them. I read the KBOOT Release notes and still didn't understand what does flashloader do and what does flashloader_loader do. It was written the flashloader_loader loads the flashloader image file (is that true?), but I want to load my own user app, so what do I use? Which loader project should I use out of the 3 loader project in the KBOOT folder in such case?
Answer: flashloader and flashloader_loader is just one times bootloader, after you update the application code, the bootloader will be disappear. Because when you want to update the application code, this bootloader will copy the flashloader to RAM, then receive the application code and write it to the flash.
Freedom_loader will always in the flash after you upload your application code. the freedom_loader will in the flash address0x00, the application code is defined from 0xa000, you need to relocate your app code to 0xa000 when you generated it.
So, I suggest you to use freedom_loader.
You just need to download the freedom_loader to your freedom board, then generate an app code, and relocate it to 0xa000 by moidfing the link file. then use the blhost or the KinetisFlashTool to download the app with freedom_loader.
2. Even though I now work on the FRDM K64 board, I'm waiting for my own board, and as such, I want to use the more general bootloader (not flashloader, by the way), so in this case, I guess I should not user the Freedom_Loader, right?
Answer: yes, you are so clever! Choose freedom_loader, please refer to item1.
3. In the FRDM board I connected an RS485 to UART module to J199, so I use J199 as another UART (UART4). That is why I want a more general bootloader. How do I change the UART number in the loader project you pointed out in Q1 to UART4?
Answer: If you want to change the uart port in the freedom_flashloader, two points need to take care:
(1) change the uart port to uart4.
(2) change uart pin to the uart4 according pin, include the mux.
You can search the whole flashloader project, then change the uart configuration to uart4.
4. I already have a ready user application, so I intend to burn the ELF of the loader project to the board (using Jlink Segger I own) and then, thru UART4 and using the KinetisFlashTool or BLHost load the bin (or elf?) user application to the correct place in the flash (0xa000 or 0x000?). Is that following process true?
Answer: I suggest you test your user application code without the flash loader at first, if the function is correct, then relocate the app to address 0xa000, and test with your moidfied uart4 bootloader.
5. I currently tried all this with the flashloader_loader project. Since I have 2 COM's opened (UART0 of the openSDA and UART4 of the J199) I tried connecting with the KinetisFlashTool to UART4 (which is COM6 in my case), I did not succeed. I could connect to UART4, but as I've explained, I do not want to work with the openSDA, but with a different UART (since I have a custom board).
Answer: The default freedom flashloader is using uart0, PTA14 and PTA15, you can try the original bootloader, when it works, then change the uart to your uart4.
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------