uTasker V1.4.4 for Kinetis K / KL

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

uTasker V1.4.4 for Kinetis K / KL

3,506 Views
mjbcswitzerland
Specialist V

Hi All

I am pleased to be able to inform of a new uTasker project release which supports (I think) all Freescale Freedom and Tower boards for Kinetis K and KL parts - using CW10.x, IAR, Keil, Rowley Crossworks, Atollic or stand-alone GCC.

- The project includes a boot loader that can operate on each board (on UART, SD card, USB-MSD and new Ethernet Web server - any one or any combination of each, depending on what interface the boards physically have)

- The main project also runs on all boards (limited only by the peripherals available on each part - some drivers may not be available for KL parts at the moment) and can be built with any of the mentioned tool chains.

- 3-axis accelerometers (MMA8451Q and MMA7660F) and 6-axis sensor (accelerometer/magnetometer FXOS8700CQ) interfaces included

- All boards and the processor peripherals are simulated, allowing the applications to be run, tested, debugged (most parts essentially in real-time) using VisualStudio

- New protocol support in the TCP/IP stack:
     SNMPV1 and SNMPV2c with multiple manager support and user MIB capability

     Multicast and IGMP V1/V2 support on multiple networks and interfaces [Documentation: http://www.utasker.com/docs/uTasker/uTasker_IGMP.pdf]
     Multiple network operation (a single board can be assigned multiple IP addresses and operate on multiple networks)

Release note and project at http://www.utasker.com/forum/index.php?topic=1721.0

See the new Freedom FRDM-K64F in action here:New Freedom FRDM-K64F board

Regards

Mark

9 Replies

2,289 Views
mjbcswitzerland
Specialist V

Hi All

There is now a Quick Start video for the Kinetis KL/K devices/boards for CodeWarrior at

http://youtu.be/uBbiw36Caq4

Regards

Mark

0 Kudos
Reply

2,289 Views
pradyumnakammar
Contributor III

Hi Mark,

i have been trying to use uTaskerKinetisV1.4.7 with code warrior10.2  for frdm-KL25 but failing miserably


as u have instructed in the video uTasker for Kinetis using CodeWarrior - YouTubei have made changes in config.h file i.e.

1. under #if defined _KINETIS removed comments for #define KINETIS_KL20

2. under #elif defined KINETIS_KL20 removed comments for #define FRDM_KL25Z

and the rest as you instructed in the video.

clicking on build i'm having problems

DescriptionResourcePathLocationType
Applications/uTaskerV1.4/application.c: No such file or directoryuTaskerV1_4C/C++ Problem
Applications/uTaskerV1.4/debug.c: No such file or directoryuTaskerV1_4C/C++ Problem
Applications/uTaskerV1.4/KeyScan.c: No such file or directoryuTaskerV1_4C/C++ Problem
Applications/uTaskerV1.4/modbus_app.c: No such file or directoryuTaskerV1_4C/C++ Problem
Applications/uTaskerV1.4/NetworkIndicator.c: No such file or directoryuTaskerV1_4C/C++ Problem
Applications/uTaskerV1.4/Simulator/StdAfx.cpp: No such file or directoryuTaskerV1_4C/C++ Problem
Applications/uTaskerV1.4/snmp_mib_handlers.c: No such file or directoryuTaskerV1_4C/C++ Problem
Applications/uTaskerV1.4/usb_application.c: No such file or directoryuTaskerV1_4C/C++ Problem
Applications/uTaskerV1.4/webInterface.c: No such file or directoryuTaskerV1_4C/C++ Problem
Hardware/Kinetis/kinetis.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/arp.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/dhcp.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/dns.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/Ethernet.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/ftp_client.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/ftp.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/http.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/icmp.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/igmp.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/ip_utils.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/ip.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/NetBIOS.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/pop3.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/ppp.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/smtp.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/snmp.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/tcp.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/telnet.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/tftp.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/udp.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/webutils.c: No such file or directoryuTaskerV1_4C/C++ Problem
stack/zero_config.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/can_drv.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/Driver.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/eth_drv.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/GlobalTimer.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/iic_drv.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/low_power.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/MODBUS/MODBUS.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/SSC_drv.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/Tty_drv.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/uFile.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/uGLCDLIB/GLCD.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/uGLCDLIB/LCD.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/uMalloc.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/uNetwork.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/USB_drv.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/uTasker.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/utFAT/mass_storage.c: No such file or directoryuTaskerV1_4C/C++ Problem
uTasker/Watchdog.c: No such file or directoryuTaskerV1_4C/C++ Problem
mingw32-make: *** [uTaskerV1_4.elf] Error 1uTaskerV1_4C/C++ Problem

I've tried and checked included paths in project properties

I'm new to code warrior how to solve this issue.

i also tried with Keil uVision 5 getting an error in kinetis_asm.s build error attached

Pls help

Thank you

Pradyumna

0 Kudos
Reply

2,289 Views
mjbcswitzerland
Specialist V

Hi Pradyumna

1. CW10.2:

The last release was configured for CW10.5 and I just checked that there are no problems with importing and setting to the FRDM-KL25Z board. However when I try importing to CW10.2 I don't even get as far as you because it loses tool chain setting and says "No base extension cfg exists for org.eclipse.cdt.cross.arm.gnu.sourcery.windows.elf.debug.1993034600.611177042".

Therefore it looks lilke ther are CW compatibility issues between CW versions and possibly it has some difficulties moving to older versions.

Since CW10.2 is a rather old version (from 2011) and the latest is CW10.6 I would recommend updating it. Also, you may prefer to try KDS (Kinetis Design Studio) because CW will tend to die out for Kinetis users with time.

2. Keil

Keil is a bit of a nuicance since it doesn't support inline assmebler (in C-code) for the Cortex devices (no idea why not because all other compilers do...). There is no need for assembler code in any other IDE projects but it 'is' needed for Keil due to this reason. There is a small amount of assembler code that works on Cortex-M4 but not on Cortex-M0+ (that is, it won't compile) in Kinetis_asm.s. The updated assember file was missing in the uTaskerV1.4.7 release (especially for Keil) and so it fails at two assembler lines.

To correct this you can either comment out the two lines (put ; in front of them since they are in fact only needed by the boot loader and not by the application).

The correction is to replace the offending code by:

EXPORT start_application

start_application

IF :DEF:KINETIS_KL
ldr r1, [r0,#0]                                                ; get the stack pointer value from the program's reset vector 
mov sp, r1                                                     ; copy the value to the stack pointer
ldr r0, [r0,#4]                                                ; get the program counter value from the program's reset vector
blx r0                                                         ; jump to the start address
ELIF :DEF:KINETIS_KE
ldr r1, [r0,#0]                                                ; get the stack pointer value from the program's reset vector
mov sp, r1                                                     ; copy the value to the stack pointer
ldr r0, [r0,#4]                                                ; get the program counter value from the program's reset vector
blx r0                                                         ; jump to the start address
ELSE
ldr sp, [r0,#0]                                                ; load the stack pointer value from the program's reset vector
ldr pc, [r0,#4]                                                ; load the program counter value from the program's reset vector to cause operation to continue from there
ENDIF 
ALIGN

This will select the assembler code for the KL/KE or K devices accordingly. Beware that the spaces at the start of the lines are necessary otherwise the Keil assembler will throw a wobbly. Unfortunately I didn't work out whether Keil assemble files can accept included C-headers with the conditional defines so you will need to manually add the define KINETIS_KL to the asm setup as a define (pre-processor define) when using such a device.

Good luck

Regards

Mark

p.s. For Keil,

Rename (in kinetis.c)

__attribute__((section("F_INIT"))) const KINETIS_FLASH_CONFIGURATION flash_config

to

__attribute__((section("F_INIT"))) const KINETIS_FLASH_CONFIGURATION __flash_config

to match the linker script's keep setting.

0 Kudos
Reply

2,289 Views
pradyumnakammar
Contributor III

Hi Mark,

I downloaded KDS and imported the utasker project. Can you give me directions to configure KDS for frdm-KL25 ?


im having problems with settimg up linker files, build directory, flasing target .



Thanks in advance.

0 Kudos
Reply

2,289 Views
mjbcswitzerland
Specialist V

Hi Pradyumna

KDS is virtually identical to CW, therefore the same method is used for selecting the processor. Use the linker script file KL_128_16.ld (in \Applications\uTaskerV1.4\KinetisCodeWarrior\Linker_Files - CW and KDS can share linker script files).

Read the readme.txt file in the project root since the project contains both CW and KDS project settings and only one of these can be used at any time. Since the Eclipse project files need to be at the same location but are not compatible between CW and KDS one has to manually move the desired set of files to the project root (full details in the readme.txt). In case you have opened a CW project in KDS it is best to quit KDS and start again since they will corrupt each other.

You won't need to set up a build directory since KDS will automatically create one at a fixed location in the project root directory. This behaviour is fixed and can't be controlled in any way (as it can in CW).

Regards

Mark

0 Kudos
Reply

2,289 Views
pradyumnakammar
Contributor III

thank you so much it works !!

currently using for hid mouse. I will try reading usb. What else can i do with this application

0 Kudos
Reply

2,289 Views
mjbcswitzerland
Specialist V

Pradyumna

Read through config.h and app_hw_kinetis.h in the uTaskerV1.4 application.

In config.h you can enable or disable major function (eg. I2C, CAN, Ethernet - and choose TCP/IP services- , USB - and choose classes - SD card/FAT, LCD, SPI Flash file system extension, etc.)

In app_hw_kinetis.h you can enable or disable more HW specific things (eg. processor speed, which timers you want to support, whether the SD card is using SDHC or SPI, and which pins, type and size of SPI Flash and which pins, whether you want ADC, DAC, RTC, pin mapping for peripherals with multiple connections, interrupt and DMA priorities, etc.)

Of course, if the chip used doesn't have a certain peripheral enabling it will not actually do anything (eg. yours doesn't have Ethernet).

There are some special project files like ADC_timers.h where certain timer demonstrations are configured (eg. PIT, PWM, LPTMR in monostable or periodic interrupt modes, or ADC DMA operation triggered by HW timers).

Therefore you have great flexibility for configuring many features in a single application - they are all designed to work together (as far as possible) and can be used on a large variety of Kinetis processors/boards so you can simply set the processor and board defines to use the same application configuration on multiple targets (no "porting" between devices is necessary).

The idea is that you configure a project framework this way so that you start with a working system performing a variety of functions/services and then adapt or add you own apllication to it to shape it into a final solution.

Don't forget that the project also includes boot loader projects so you can also use these (serial, SD card, USB-MSD, USB-HID [incl. KBOOT USB-HID mode], Ethernet Web Server, etc.) out-of-the-box together with the application on essentially any KE, KL or K part.

Finally don't forget to use the VisualStudio target to simulate your processor and board (in real-time) since this allows simple checking of configuratiosn right up to testing and debugging the complete application, including peripheral interrupt and DMA operation!

Regards

Mark

P.S. There are documents detailing most of the individual modules: http://www.utasker.com/docs/documentation.html

0 Kudos
Reply

2,289 Views
pradyumnakammar
Contributor III

Hi Mark,

this is really something.Will be in touch thankyou so much!!

0 Kudos
Reply

2,289 Views
pradyumnakammar
Contributor III

Thank you so much for such detailed explanation i'll try this out

0 Kudos
Reply