Author Topic: Can't compile uTaskerV1.4 on Keil uVsion 5  (Read 2258 times)

Offline BangkokUni

  • Newbie
  • *
  • Posts: 2
    • View Profile
Can't compile uTaskerV1.4 on Keil uVsion 5
« on: May 15, 2024, 12:10:34 PM »
I am just starting to use utasker for my class as supplementary tool for students. Hopefully this tool will help students to gain some more understanding about Arm programming. So, I am trying to get familiar with utasker which seems not to be an easy job. Anyway, currently I try to use Keil uVision 5 to build uTaskerV1.4 which is downloaded from https://github.com/uTasker/uTasker-Kinetis. I've followed the instruction in "Kinetis Compiler/IDE Information" page (https://www.utasker.com/kinetis/compilers.html#KEIL) and also from youtube "uTasker SHORT Getting Started - From GIT to KDS build" (https://www.youtube.com/watch?v=K8ScSgpgQ6M&t=311s). Then, when I build the project there will be an error message about ".\Objects\uTaskerV1_4_BM.axf: Error: L6218E: Undefined symbol wfi (referred from kinetis.o)." The following message is output when I build the project in Keil uVision 5:

-----------------------------
Rebuild started: Project: uTaskerV1.4
*** Using Compiler 'V6.18', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
Rebuild target 'uTaskerV1.4-BM'
compiling eth_drv.c...
compiling can_drv.c...
compiling SSC_drv.c...
compiling GlobalTimer.c...
compiling iic_drv.c...
compiling low_power.c...
compiling uFile.c...
compiling uNetwork.c...
compiling USB_drv.c...
compiling Tty_drv.c...
compiling uMalloc.c...
compiling Watchdog.c...
compiling dhcp.c...
compiling arp.c...
compiling uTasker.c...
compiling dns.c...
../../../uTasker/Driver.c(948): warning: implicit conversion from 'unsigned long' to 'float' changes value from 4294967295 to 4294967296 [-Wimplicit-const-int-float-conversion]
        if (floatToConvert >= (unsigned long)0xffffffff) {
                           ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
compiling Driver.c...
compiling Ethernet.c...
compiling ftp.c...
compiling icmp.c...
compiling http.c...
compiling ip_utils.c...
compiling ip.c...
compiling time_keeper.c...
compiling NetBIOS.c...
compiling pop3.c...
compiling snmp.c...
compiling ppp.c...
compiling smtp.c...
compiling tcp.c...
compiling telnet.c...
compiling tftp.c...
compiling udp.c...
compiling webutils.c...
compiling zero_config.c...
compiling igmp.c...
compiling ftp_client.c...
compiling application.c...
compiling KeyScan.c...
compiling debug.c...
compiling usb_application.c...
compiling modbus_app.c...
compiling snmp_mib_handlers.c...
compiling webInterface.c...
compiling NetworkIndicator.c...
compiling FreeMaster.c...
compiling nRF24201.c...
compiling MODBUS.c...
assembling kinetis_asm.s...
compiling GLCD.c...
compiling LCD.c...
compiling mass_storage.c...
compiling kinetis.c...
linking...
.\Objects\uTaskerV1_4_BM.axf: Error: L6218E: Undefined symbol wfi (referred from kinetis.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 1 error messages.
".\Objects\uTaskerV1_4_BM.axf" - 1 Error(s), 1 Warning(s).
Target not created.
Build Time Elapsed:  00:00:04
-----------------------------

I use Arm compiler version 6, and already modify parameter in "Asm" Tab and "Linker" Tab in "Option for Target" of uVision's project accordingly (I use FRDM-K64F Board). It seems like the linker can't found "__wfi()" in "kinetis.co". I am not sure whether this error is from unsupport feature of ARMv7 or not (I guess). Can u suggest about how to solve this problem ?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Re: Can't compile uTaskerV1.4 on Keil uVsion 5
« Reply #1 on: May 15, 2024, 02:25:02 PM »
Hi

I believe that newer versions of the KEIL compiler have become more GCC compatible and they removed the instrinsic __wifi().

In kinetis.c change

#define __sleep_mode()        __wfi()

to

#define __sleep_mode()        __asm__("wfi")

If this also doesn't work disabled SUPPORT_LOW_POWER in config.h as the instruction is only needed when using the processor's wait mode (to save power when the core has nothing to do).

I see that you are building the target "uTaskerV1.4-BM". This target works together with the uTasker boot loader so it may be easier for you to start with the "uTaskerV1.4" target [you can select the target to be built in the IDE] instead otherwise you will need to build and install the loader before you can test some operation.

Regards

Mark

Offline BangkokUni

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Can't compile uTaskerV1.4 on Keil uVsion 5
« Reply #2 on: May 15, 2024, 02:31:59 PM »
Hi, Mark

Thanks a lot for your suggestion. The project is able to compiled successfully now (with target"uTaskerV1.4" as you recommend). So, I will try to flash FRDM-K64 board and see how it will go.