I've been trying to the bootloader user guides to get a bootloader working on the FRDM-K22F board which I soon want working on evaluation board which will incorporate the MK22FN128 micro. I've looked at all of the documents on the KBOOT: Kinetis Bootloader page. Currently I'm following the Kinetis Bootloader Demo Application User's Guide (Doc. KBTLDRDEMOUG.pdf)
I've done everything up to 4 "The host utility application". I'm plugged into SDA USB port and I see the MBED (E:) and I see the COM33: mbed Serial Port (COM33). I try to run the command "blhost.exe -p COM33 -- get-property 1" and it fails with "Error UartPeripheral() cannot open PC UART port(COM33), speed(57600 Hz)"
When I plug it into the other USB port it registers as a mass storage device "FSL Loader (E:). This FSL Loader comes from me directly flashing the micro using the freedom bootloader project in the Bootloader SDK. I imported and built the project located at "C:\Freescale\NXP_Kinetis_Bootloader_2_0_0\targets\MK522F51212\kds. Then I used the multilink to program the Release version of this project on to the micro. I want to be able to use the bootloader in this chip to update over USB without the USB SDA interface.
Am I doing something wrong? Which USB connection am I supposed to do? What is this FSL Loader?
-Brendan
Solved! Go to Solution.
Hello Brenda Merna,
128Kb chip is able to use the flashloader, flash address 0x0000-0x9ffff is used for the flash bootloader, your application code is start from the address 0xa000, so you just need to make sure your application code size - 40K is smaller than 128KB, then yoru 128KB will be work.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Brendan Merna,
From your description, you need to use the USB bootloader to downloader your application code.
Now follow me to use the KBOOT2.0 to realize it in the FRDM-K22F board.
1. Open \NXP_Kinetis_Bootloader_2_0_0\targets\MK22F51212 freedom_bootloader project
You said, you are using the KDS project, the KDS project need to modify one point.
Add this below code in bootloader_config.h
#define BL_TARGET_FLASH 1
Just like this picture:
2. Build the release version
After build, check the console, hex size, it should below 0XA000.
print size can be enabled by the following way:
3. Download the build code to your FRDM-K22F board, with USB SDA, this is the bootloader code, you must download it with debugger at first.
Then you can use the USB MSC to download your application code now.
4. find another USB cable connect the USB port in the FRDM board, J16.
You can find the FSL Loader device, this is the USB MSC interface
5. Please refer to this post to prepare the app.sb file for your application code:
USB MSD Bootloader Implementation
I have attached my modified .bin, .bd and generated .sb file.
6. Copy the k22_image.sb to the FSL Loader disc.
wait the sending finished, then power off the board, power on it again, about 5 seconds, the on board LED will blinking.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I was able to get that project build by adding #define FREEDOM 1 and commenting out the FLASH_DRIVER_IS_FLASH_RESIDENT logic to make sure that equals 1.
I hope that doesn't completely break it. Is the 128Kb chip able bootloader compatible or is there not enough space?
-Brendan
Hello Brenda Merna,
128Kb chip is able to use the flashloader, flash address 0x0000-0x9ffff is used for the flash bootloader, your application code is start from the address 0xa000, so you just need to make sure your application code size - 40K is smaller than 128KB, then yoru 128KB will be work.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Kerry,
I was able to get this setup to work on the FRDM-K22F development board. Thank you!
I'm trying to also do this with a evaluation board that uses the smaller version of the chip the MK22F12810. I tried to transfer these steps, but the bootloader projects were named differently.I tried to build the flashloader project for this chip and it filed because some defines were undeclared. Also, I was unable to find a USB platform project for this chip.
Can you guide me through what I need to do different for this chip?
-Brendan