bootloader k60 sd

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

bootloader k60 sd

2,495 Views
isabelbenitez
Contributor II

Hello. I have written a program for a MK60DN512VLQ10. It works ok. Now I must do a bootloader (and better if the update is from a SD card). I have read lot of post in the forum, examples, etc. But I don´t know where to start. I mean, I have my program and now what? I have the example from AN2295 and what? What I must do in my program to be able to run the bootloader from the project? How can I put together the bootloader and my program, because I understand that both of them must "live" in the microcontroller. If somebody can help me ...

Labels (1)
0 Kudos
Reply
12 Replies

1,706 Views
mjbcswitzerland
Specialist V

Hi

Guide: http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF

Ready-build loaders: http://www.utasker.com/SW_Demos.html#K70

If your job is to re-invent the wheel and build a new SD card loader:

- Add a FAT file system - www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx / FatFs - Generic FAT File System Module

- Interface it to either SPI or SDHC of Kinetis

- mount the card and check for new software (possibly with authentication)

- copy new software to internal flash

- start application software

In any case, your application must be linked to start at the address that the boot loader locates it to. Either its interrupt vectors must run from SRAM or also the vectors should be located in Flash at a boundary supported by the NVIC.

Regards

Mark

0 Kudos
Reply

1,706 Views
isabelbenitez
Contributor II

Thank you very much, but I would prefer something made by me and free. My company must pay for the uTasker, I think, and that is not the best solution for us nowadays.

0 Kudos
Reply

1,706 Views
mjbcswitzerland
Specialist V

Yes, commercial use of the boot loaders (serial, SD-card and USB-MSD) does cost $242.50 with 3 months support.

If your work is commerical (personal and hobby use is free) and it costs your employer less to pay you to develop, test, document and support it then the financial rewards to your company are high and so it is the best strategy - it will also avoid risks of using something that has been proven in many industrial applications ;-)

Regards

Mark

P.S. When using a K60 (presumably with Ethernet) it is worth considering Ethernet techniques to perform software uploads since these are often more practical than SD card ones (or both possibilities in parallel), including software updates via the Internet.

0 Kudos
Reply

1,706 Views
matthewkendall
Contributor V

Help me out here. I'm interested in using your bootloader in a commercial product with the K60, but I can't find that pricing anywhere on your web site. In fact, I can't find any way to buy a license for the bootloader per se; I only see ways to license uTasker, which seems to be complete RTOS, starting at USD485, and it's not even clear to me that that would get me the bootloader source code.

0 Kudos
Reply

1,706 Views
mjbcswitzerland
Specialist V

Matthew

The serial boot loader licensing is explained on the Kinetis landing-page: http://www.utasker.com/kinetis.html

Specifically:

"The µTasker serial boot loader (SD card, USB-MSD, UART, Ethernet - enable just one or mix them as you desire!) can be used with any application, so even if your Kinetis applications have been developed with other solutions the serial boot loader can be used - licensing only the serial loader part of the projects is possible, including support, and is discounted by 50%."


If you look on the payment page you will see a 50% discount button (below the project and full license buttons) which can be used for boot loader licensing.

On the main web page the features in the project are listed: Welcome to the homepage of the µTasker operating system with integrated TCP/IP stack, USB and target...

These include the boot loader and serial boot loader as integral part of the project.

To be clear, the project includes three build projects:
- "Bare-minimum" boot loader requiring about 1k of Flash space (but works together with the application and requires intermediate storage, and can optionally work with encrypted files - about 2k Flash space required)
- "Serial boot loader" a standalone boot loader (SD card, USB-MSD, UART, Ethernet web server)

- "uTasker V1.4" application (complete application project containing a configurable framework for customising to a final specific application)

There is a single package containing all which can be downloaded freely at KINETIS Project Code and allows K and KL processors/board targets to be build with various tools (GCC standalone, CodeWarrior, IAR, Keil, Atollic, Rowley Crossworks and VisualStudio simulator). The serial loader licensing is simply "limiting" product incorporation and support to the Serial Boot loader part of the project; the complete SW is always supplied.

Regards

Mark

0 Kudos
Reply

1,706 Views
matthewkendall
Contributor V

So I have been trying to get the serial boot loader going, and it turns out I can't even get it to build.

I downloaded uTaskerKinetis_V1.4.4.zip from here: http://www.utasker.com/forum/index.php?topic=1721.msg6645#msg6645 and unzipped it to local folder (shortish path, no spaces, full permissions, Windows 7 64-bit).

In CodeWarrior 10.5: File | Import | Existing Project into Workspace | Selected the unzipped folder. It successfully imported the "uTasker V1_4" project. Right-clicked on project in Project Explorer, selected "uTaskerSerialLoader FLASH" target. Clicked the "Build" toolbar button.

The compile steps all succeeded but the link step failed with a whole bunch of "No such file or directory" errors. Surprisingly, it is not complaining about missing libraries. Rather, it is complaining about missing .c files. Wait, what? Why is the linker looking for .c files?

Poking about reveals that the file "uTaskerKinetis_V1.4.4\Applications\uTaskerSerialBoot\KinetisCodeWarrior\uTaskerSerialBoot_FLASH\uTaskerSerialBoot.args" doesn't look right. This file is automatically generated and contains the arguments fed to the linker. It lists all the .o files, a bunch of flags, the libraries, a couple more flags, and then, all on one line tacked on the end, all the source .c files.

If I delete this .args file and rebuild it gets regenerated the same. Build clean has the same effect. If I manually delete the line containing the .c files from the .args file and then invoke the linker myself it builds the .elf just fine.

So it looks like there is something screwed up with the automatic generation of the .args file, but I have no idea what it is. I can't find anything that looks wrong in the project settings, and in any case I haven't changed any of them. Any help appreciated.

Here are the errors produced by a build after a clean:

*** Build of configuration uTaskerSerialLoader_FLASH for project uTaskerV1_4 ****

C:\Progs\Freescale\CW MCU v10.4\gnu\bin\mingw32-make -j16 all

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/utFAT/mass_storage.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Driver.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/GlobalTimer.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/SSC_drv.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Tty_drv.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/USB_drv.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Watchdog.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/can_drv.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/eth_drv.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/iic_drv.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/low_power.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uFile.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uMalloc.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uNetwork.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uTasker.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/Ethernet.c'

'Executing target #1 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/utFAT/mass_storage.c'

'Executing target #2 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Driver.c'

'Executing target #3 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/GlobalTimer.c'

'Executing target #4 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/SSC_drv.c'

'Executing target #5 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Tty_drv.c'

'Executing target #6 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/USB_drv.c'

'Executing target #7 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Watchdog.c'

'Executing target #8 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/can_drv.c'

'Executing target #9 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/eth_drv.c'

'Executing target #10 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/iic_drv.c'

'Executing target #11 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/low_power.c'

'Executing target #12 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uFile.c'

'Executing target #13 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uMalloc.c'

'Executing target #14 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uNetwork.c'

'Executing target #15 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uTasker.c'

'Executing target #16 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/Ethernet.c'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/utFAT/mass_storage.c" @"uTasker/utFAT/mass_storage.args" -MMD -MP -MF"uTasker/utFAT/mass_storage.d" -o"uTasker/utFAT/mass_storage.o"

'Invoking: ARM Ltd Windows GCC C Compiler'

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Driver.c" @"uTasker/Driver.args" -MMD -MP -MF"uTasker/Driver.d" -o"uTasker/Driver.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/GlobalTimer.c" @"uTasker/GlobalTimer.args" -MMD -MP -MF"uTasker/GlobalTimer.d" -o"uTasker/GlobalTimer.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/SSC_drv.c" @"uTasker/SSC_drv.args" -MMD -MP -MF"uTasker/SSC_drv.d" -o"uTasker/SSC_drv.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Tty_drv.c" @"uTasker/Tty_drv.args" -MMD -MP -MF"uTasker/Tty_drv.d" -o"uTasker/Tty_drv.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/USB_drv.c" @"uTasker/USB_drv.args" -MMD -MP -MF"uTasker/USB_drv.d" -o"uTasker/USB_drv.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Watchdog.c" @"uTasker/Watchdog.args" -MMD -MP -MF"uTasker/Watchdog.d" -o"uTasker/Watchdog.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/can_drv.c" @"uTasker/can_drv.args" -MMD -MP -MF"uTasker/can_drv.d" -o"uTasker/can_drv.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/eth_drv.c" @"uTasker/eth_drv.args" -MMD -MP -MF"uTasker/eth_drv.d" -o"uTasker/eth_drv.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/iic_drv.c" @"uTasker/iic_drv.args" -MMD -MP -MF"uTasker/iic_drv.d" -o"uTasker/iic_drv.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/low_power.c" @"uTasker/low_power.args" -MMD -MP -MF"uTasker/low_power.d" -o"uTasker/low_power.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uFile.c" @"uTasker/uFile.args" -MMD -MP -MF"uTasker/uFile.d" -o"uTasker/uFile.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uMalloc.c" @"uTasker/uMalloc.args" -MMD -MP -MF"uTasker/uMalloc.d" -o"uTasker/uMalloc.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uNetwork.c" @"uTasker/uNetwork.args" -MMD -MP -MF"uTasker/uNetwork.d" -o"uTasker/uNetwork.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uTasker.c" @"uTasker/uTasker.args" -MMD -MP -MF"uTasker/uTasker.d" -o"uTasker/uTasker.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/Ethernet.c" @"stack/Ethernet.args" -MMD -MP -MF"stack/Ethernet.d" -o"stack/Ethernet.o"

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/utFAT/mass_storage.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Driver.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/GlobalTimer.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/SSC_drv.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Tty_drv.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/USB_drv.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/Watchdog.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/can_drv.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/eth_drv.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/iic_drv.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/low_power.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uFile.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uMalloc.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uNetwork.c'

' '

' '

' '

' '

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/Ethernet.c'

' '

' '

' '

' '

' '

' '

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/uTasker/uTasker.c'

' '

' '

' '

' '

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/arp.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/http.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/icmp.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/ip.c'

' '

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/ip_utils.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/tcp.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/webutils.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Hardware/Kinetis/kinetis.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/Loader.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/SDLoader.c'

' '

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/usb_loader.c'

'Building file: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/webInterface.c'

'Executing target #17 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/arp.c'

'Executing target #18 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/http.c'

'Executing target #19 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/icmp.c'

'Executing target #20 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/ip.c'

'Executing target #21 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/ip_utils.c'

'Executing target #22 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/tcp.c'

'Executing target #23 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/webutils.c'

'Executing target #24 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Hardware/Kinetis/kinetis.c'

'Executing target #25 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/Loader.c'

'Executing target #26 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/SDLoader.c'

'Executing target #27 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/usb_loader.c'

'Executing target #28 C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/webInterface.c'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

'Invoking: ARM Ltd Windows GCC C Compiler'

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/arp.c" @"stack/arp.args" -MMD -MP -MF"stack/arp.d" -o"stack/arp.o"

'Invoking: ARM Ltd Windows GCC C Compiler'

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/http.c" @"stack/http.args" -MMD -MP -MF"stack/http.d" -o"stack/http.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/icmp.c" @"stack/icmp.args" -MMD -MP -MF"stack/icmp.d" -o"stack/icmp.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/ip.c" @"stack/ip.args" -MMD -MP -MF"stack/ip.d" -o"stack/ip.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/ip_utils.c" @"stack/ip_utils.args" -MMD -MP -MF"stack/ip_utils.d" -o"stack/ip_utils.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/tcp.c" @"stack/tcp.args" -MMD -MP -MF"stack/tcp.d" -o"stack/tcp.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/webutils.c" @"stack/webutils.args" -MMD -MP -MF"stack/webutils.d" -o"stack/webutils.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Hardware/Kinetis/kinetis.c" @"Hardware/Kinetis/kinetis.args" -MMD -MP -MF"Hardware/Kinetis/kinetis.d" -o"Hardware/Kinetis/kinetis.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/Loader.c" @"Applications/uTaskerSerialBoot/Loader.args" -MMD -MP -MF"Applications/uTaskerSerialBoot/Loader.d" -o"Applications/uTaskerSerialBoot/Loader.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/SDLoader.c" @"Applications/uTaskerSerialBoot/SDLoader.args" -MMD -MP -MF"Applications/uTaskerSerialBoot/SDLoader.d" -o"Applications/uTaskerSerialBoot/SDLoader.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/usb_loader.c" @"Applications/uTaskerSerialBoot/usb_loader.args" -MMD -MP -MF"Applications/uTaskerSerialBoot/usb_loader.d" -o"Applications/uTaskerSerialBoot/usb_loader.o"

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/webInterface.c" @"Applications/uTaskerSerialBoot/webInterface.args" -MMD -MP -MF"Applications/uTaskerSerialBoot/webInterface.d" -o"Applications/uTaskerSerialBoot/webInterface.o"

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/arp.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/http.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/icmp.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/ip.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/ip_utils.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/tcp.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/stack/webutils.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/Loader.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/SDLoader.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/usb_loader.c'

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Hardware/Kinetis/kinetis.c'

' '

' '

' '

' '

' '

'Finished building: C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerSerialBoot/webInterface.c'

' '

' '

' '

' '

' '

' '

' '

'Building target: uTaskerSerialBoot.elf'

'Executing target #29 uTaskerSerialBoot.elf'

'Invoking: ARM Ltd Windows GCC C Linker'

"C:/Progs/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc"    @"uTaskerSerialBoot.args" -o"uTaskerSerialBoot.elf"

arm-none-eabi-gcc: error: Hardware/Kinetis/kinetis.c: No such file or directory

arm-none-eabi-gcc: error: stack/ip_utils.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/Driver.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/GlobalTimer.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/SSC_drv.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/Tty_drv.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/USB_drv.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/Watchdog.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/can_drv.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/eth_drv.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/iic_drv.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/low_power.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/uFile.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/uMalloc.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/uNetwork.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/uTasker.c: No such file or directory

arm-none-eabi-gcc: error: uTasker/utFAT/mass_storage.c: No such file or directory

arm-none-eabi-gcc: error: Applications/uTaskerSerialBoot/Loader.c: No such file or directory

arm-none-eabi-gcc: error: Applications/uTaskerSerialBoot/SDLoader.c: No such file or directory

arm-none-eabi-gcc: error: Applications/uTaskerSerialBoot/usb_loader.c: No such file or directory

mingw32-make: *** [uTaskerSerialBoot.elf] Error 1

And here is the uTaskerSerialBoot.args file. Note the final line.

"./Applications/uTaskerSerialBoot/webInterface.o"

"./Applications/uTaskerSerialBoot/usb_loader.o"

"./Applications/uTaskerSerialBoot/SDLoader.o"

"./Applications/uTaskerSerialBoot/Loader.o"

"./Hardware/Kinetis/kinetis.o"

"./stack/webutils.o"

"./stack/tcp.o"

"./stack/ip_utils.o"

"./stack/ip.o"

"./stack/icmp.o"

"./stack/http.o"

"./stack/arp.o"

"./stack/Ethernet.o"

"./uTasker/uTasker.o"

"./uTasker/uNetwork.o"

"./uTasker/uMalloc.o"

"./uTasker/uFile.o"

"./uTasker/low_power.o"

"./uTasker/iic_drv.o"

"./uTasker/eth_drv.o"

"./uTasker/can_drv.o"

"./uTasker/Watchdog.o"

"./uTasker/USB_drv.o"

"./uTasker/Tty_drv.o"

"./uTasker/SSC_drv.o"

"./uTasker/GlobalTimer.o"

"./uTasker/Driver.o"

"./uTasker/utFAT/mass_storage.o"

-mcpu=cortex-m4

-mthumb

-mfloat-abi=soft

-g3

-gdwarf-2

-gstrict-dwarf

-T"C:/Users/mdkendall.ELEMENTS/Documents/uTaskerKinetis_V1.4.4/Applications/uTaskerV1.4/KinetisCodeWarrior/Linker_Files/K_256_32.ld"

-nostartfiles

-L"C:/Progs/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/lib/armv6-m"

-L"C:/Progs/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/lib/armv7e-m/fpu"

-L"C:/Progs/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/lib/armv7e-m"

-Wl,-Map,uTaskerSerialBoot.map

-n

-specs=ewl_c_noio.specs Hardware/Kinetis/kinetis.c stack/ip_utils.c uTasker/Driver.c uTasker/GlobalTimer.c uTasker/SSC_drv.c uTasker/Tty_drv.c uTasker/USB_drv.c uTasker/Watchdog.c uTasker/can_drv.c uTasker/eth_drv.c uTasker/iic_drv.c uTasker/low_power.c uTasker/uFile.c uTasker/uMalloc.c uTasker/uNetwork.c uTasker/uTasker.c uTasker/utFAT/mass_storage.c Applications/uTaskerSerialBoot/Loader.c Applications/uTaskerSerialBoot/SDLoader.c Applications/uTaskerSerialBoot/usb_loader.c

0 Kudos
Reply

1,706 Views
mjbcswitzerland
Specialist V

Matthew

The C files are indeed building fine and I haven't heard of this linking problem before.

1) Not that you need it, but, there is an import video here:uTasker for Kinetis using CodeWarrior - YouTube (in case you want to double check).

2) Your CW directory says V10.4 - are you sure you are using CW10.5 and not CW10.4?
I jumped from CW10.2 to CW10.5 and had to make a few modification to get it importing without any warnings, although it still ran with the warnings (it was a recommendation about a macro for pointing to the projects location). I have heard bad things about CW10.4 but nothing from experience.
As soon as the new KDS environment is released I will move to it since CW will presumably slowly die out for Kinetis use. Probably I'll not move to CW10.6 (the latest version) due to this.

3) To be double sure I just downloaded the package and imported it into a fresh workspace (CW10.5), chose the serial loader and built. This worked correctly - attached is a .txt file with the console output so that you can see whether you see any differences that explain anything (I see that the GCC version is the same between your CW version and the one that I use).

4) I also attached the args file that is generated here.
What I see is that the final line is indeed very different. While yours has a long list of C files mine has just the "-specs=ewl_c_noio.specs" so this is certainly the big clue. I am hoping that a Freescale expert will be able to jump in here and tell us what has gone wrong since, as you wrote, the generation of this file is somewhat out of our control and I don't see why it should not operate correctly for you. Although there are always things that can go wrong I haven't heard of this before.

Assuming that you can get past this problem please note the following:

- since you are interested in running the loader of the K60 select the HW in config.h. There are 2 standard K60 boards [#define TWR_K60N512 and TWR_K60F120M] whereby the K60N512 can also be used with the TWR-K60D100M (they are compatible, but K60N512 and K60F120 are not!). Choose the loader types in the same file (USB, UART or SD-card, or mixtures of them). There is a new Ethernet Web Server one for the Ethernet parst but it is not configured for these targets at the moment - see below for more details.
- The Cortex-m4 is selected but it is advisable to enter a more accurate linker script in the liner settings - I see that ${uTaskerV1_4}/Linker_Files/K_256_32.ld is set so simply change thie to ${uTaskerV1_4}/Linker_Files/K_512_128.ld to match the processor exactly. Note that all linker script files are located in the uTaskerV1.4 target directory rather than having to have sets for each project.
These are the only setting that need to be adjusted and otherwise (restricted by memory size and peripheral availablilty) the projects can be built for any part (KL02 to K70) by changing just 3 settings.

Note that the Ethernet Web Server has been added to the serial loader project recently (previously it was reserved for full license holders but there are a lot of boot loader users now and it seemed to make sense to put all into one pot). It hasn't been configured for immediate use on all boards yet though but if this is of interest (I recommend mixing the web server loader with a local loader - like a USB or SD card one - for flexibility [local and remote]) it is quite easy to configure and I can send a set up if required.

Furthermore HID mode has been added - see HID boot loader (referencing AN4764) but I want to wait to be sure that freescale has nothing against me releasing this (together with full Ethernet Web Server loader support) since it only works when I set the Freescale VID/PID (otherwise the Freescale PC tool crashes).
From the list of code sizes (at the link) it is seen that mixing the web server loader with a local one requires still a small footprint for something like a K60.

Don't forget that you can also build the project with GCC from the Visual Studio project - just enter where it can find the local GCC version in the post-build step's bat file [or execut ethe bat file directly form a DOS shell]. This works also with the free VS Express version (select the target with GCC post build step rather than pure simulation). The simulator also allows the project to be run (in more or less real-time) and is useful for checking that the configurations are as expected before loading to the board. It can also be used to test the loader functionality, developing and debugging of project code before moving for final tests on the target. As mentioned in the other thread I used the simulator to develop the HID bootload extension and it was possible to fully simulate the operation of the USB HID class operation (from a recording of the original in action), develop and debug the new code before verifying on the targets. The actual development and debug time was around 3 hours, whereby it worked frist time with the Freescale tool on the HW although it then took some more time to verify a few configurations on different boards. Its power is therefore not to be underestimated!

Regards

Mark

0 Kudos
Reply

1,706 Views
matthewkendall
Contributor V

You are correct, that was a typo, I am using CW 10.4 not 10.5. I have not moved to 10.5 because I heard bad things about it ("all my keyboard shortcuts have stopped working", etc.) and in any case I am not a big fan of changing toolchains mid-project.

The build problem seems to be associated with a directive in the .cproject file named "Link Order". Specifically, for the uTaskerSerialLoader_FLASH target the option is on line 375 of .cproject:

<option id="org.eclipse.cdt.cross.arm.gnu.c.link.option.linkorder.1687113248" name="Link Order" superClass="org.eclipse.cdt.cross.arm.gnu.c.link.option.linkorder" valueType="stringList">

  <listOptionValue builtIn="false" value="Hardware/Kinetis/kinetis.c"/>

  <listOptionValue builtIn="false" value="stack/ip_utils.c"/>

  <listOptionValue builtIn="false" value="uTasker/Driver.c"/>

  <listOptionValue builtIn="false" value="uTasker/GlobalTimer.c"/>

  <listOptionValue builtIn="false" value="uTasker/SSC_drv.c"/>

  <listOptionValue builtIn="false" value="uTasker/Tty_drv.c"/>

  <listOptionValue builtIn="false" value="uTasker/USB_drv.c"/>

  <listOptionValue builtIn="false" value="uTasker/Watchdog.c"/>

  <listOptionValue builtIn="false" value="uTasker/can_drv.c"/>

  <listOptionValue builtIn="false" value="uTasker/eth_drv.c"/>

  <listOptionValue builtIn="false" value="uTasker/iic_drv.c"/>

  <listOptionValue builtIn="false" value="uTasker/low_power.c"/>

  <listOptionValue builtIn="false" value="uTasker/uFile.c"/>

  <listOptionValue builtIn="false" value="uTasker/uMalloc.c"/>

  <listOptionValue builtIn="false" value="uTasker/uNetwork.c"/>

  <listOptionValue builtIn="false" value="uTasker/uTasker.c"/>

  <listOptionValue builtIn="false" value="uTasker/utFAT/mass_storage.c"/>

  <listOptionValue builtIn="false" value="Applications/uTaskerSerialBoot/Loader.c"/>

  <listOptionValue builtIn="false" value="Applications/uTaskerSerialBoot/SDLoader.c"/>

  <listOptionValue builtIn="false" value="Applications/uTaskerSerialBoot/usb_loader.c"/>

</option>

I am guessing this is a new option that the older eclipse does not understand. If I simply remove this whole block, it builds (almost) correctly.

The one remaining error is that the "generate.bat" post-build step assumes that arm-none-eabi-objcopy can be found on the path. It typically can't. Editing generate.bat to use an explicit path fixes that. There might be a more elegant way to do it using the build variables (e.g. ${ARM_GNU_TOOLS_HOME}/bin ) but it wasn't immediately obvious how to get this to work inside a batch file.

0 Kudos
Reply

1,706 Views
mjbcswitzerland
Specialist V

Matthew

Thanks for this feedback - the explanation is plausible so a workaround is known when needed ;-)

In the bat files you can place the following at the beginning:

SET PATH=%PATH%;C:/Freescale/CW MCU v10.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin

Alternatively simply add the full path to each command line.

The problem is that the CW macros and variables can't be used in the bat file (as far as I can work out). Before moving to CW10.5 I was still using the Metroworks compiler so I actually put a copy of arm-none-eabi-objcopy in the directory that the bat file is in to ensure that it could be found. It is correct that CW doesn't install a path/environment variable. However other than forcing users to add the path to their Environmental Variables I think that having to set it once in the bat is not so bad (especially as the path to the bins is visible in the console just before the error message). In fact the only reason for having the bat file as post build step in the serial loader is because CW doesn't have an option to generate binary and SREC outputs, at least not that I can find. Old CW versions (pre-eclipse) had options to do this and I could have sworn that the first CW10 versions that I used - CW10.0 for example - at least has an SREC output option, so I think that they must have been forgotten in newer releases or somehow got lost or hidden.

Regards

Mark

0 Kudos
Reply

1,705 Views
matthewkendall
Contributor V
The problem is that the CW macros and variables can't be used in the bat file (as far as I can work out).

It turns out you can pass the variables on the command line like this:

uTasker Settings clip.png

and then use them in the batch file like this:

set toolpath=%1

%toolpath%\arm-none-eabi-objcopy --output-target=binary uTaskerSerialBoot.elf uTaskerSerialBoot.bin

%toolpath%\arm-none-eabi-objcopy --output-target=srec   uTaskerSerialBoot.elf uTaskerSerialBoot.srec

0 Kudos
Reply

1,705 Views
mjbcswitzerland
Specialist V

Nice solution!!

Mark

0 Kudos
Reply

1,705 Views
matthewkendall
Contributor V

OK, thanks, that's much clearer now.

0 Kudos
Reply