Author Topic: Config to the KL03  (Read 127 times)

Offline Javier

  • Newbie
  • *
  • Posts: 16
    • View Profile
Config to the KL03
« on: October 05, 2019, 08:52:42 AM »
Hello,

Is possible to flash a KL03 mcu with mcuexpresso + lpc-link v2?

Best regards


EDITED: I get this error when compile
Code: [Select]
Building target: uTaskerSerialLoader.elf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="uTaskerSerialLoader.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -mcpu=cortex-m0plus -mthumb -T uTaskerV1_4_uTaskerSerialLoader_FLASH.ld -L "/home/javier/git/uTasker-Kinetis/Applications/uTaskerV1.4/GNU_Kinetis" -o "uTaskerSerialLoader.elf"  ./uTasker/utFAT/mass_storage.o  ./uTasker/uGLCDLIB/GLCD.o ./uTasker/uGLCDLIB/LCD.o  ./uTasker/MODBUS/MODBUS.o  ./uTasker/Driver.o ./uTasker/GlobalTimer.o ./uTasker/SSC_drv.o ./uTasker/Tty_drv.o ./uTasker/USB_drv.o ./uTasker/Watchdog.o ./uTasker/can_drv.o ./uTasker/eth_drv.o ./uTasker/iic_drv.o ./uTasker/low_power.o ./uTasker/time_keeper.o ./uTasker/uFile.o ./uTasker/uMalloc.o ./uTasker/uNetwork.o ./uTasker/uTasker.o  ./stack/Ethernet.o ./stack/NetBIOS.o ./stack/arp.o ./stack/dhcp.o ./stack/dns.o ./stack/ftp.o ./stack/ftp_client.o ./stack/http.o ./stack/icmp.o ./stack/igmp.o ./stack/ip.o ./stack/ip_utils.o ./stack/mqtt.o ./stack/pop3.o ./stack/ppp.o ./stack/smtp.o ./stack/snmp.o ./stack/tcp.o ./stack/telnet.o ./stack/tftp.o ./stack/udp.o ./stack/webutils.o ./stack/zero_config.o  ./Applications/uTaskerSerialBoot/disk_loader.o ./Applications/uTaskerSerialBoot/serial_loader.o ./Applications/uTaskerSerialBoot/usb_application.o ./Applications/uTaskerSerialBoot/usb_device_loader.o ./Applications/uTaskerSerialBoot/usb_host_loader.o ./Applications/uTaskerSerialBoot/webInterface.o   
/usr/local/mcuxpressoide-11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: cannot open linker script file uTaskerV1_4_uTaskerSerialLoader_FLASH.ld: No existe el archivo o el directorio
collect2: error: ld returned 1 exit status
make: *** [makefile:37: uTaskerSerialLoader.elf] Error 1
"make -r -j4 all" terminated with exit code 2. Build might be incomplete.

cannot open linker script file uTaskerV1_4_uTaskerSerialLoader_FLASH.ld: Not exist
« Last Edit: October 05, 2019, 10:22:34 AM by Javier »

Offline Javier

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Config to the KL03
« Reply #1 on: October 05, 2019, 10:23:02 AM »
Code: [Select]
Building target: uTaskerSerialLoader.elf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="uTaskerSerialLoader.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -mcpu=cortex-m0plus -mthumb -T uTaskerV1_4_uTaskerSerialLoader_FLASH.ld -L "/home/javier/git/uTasker-Kinetis/Applications/uTaskerV1.4/MCUXpresso" -o "uTaskerSerialLoader.elf"  ./uTasker/utFAT/mass_storage.o  ./uTasker/uGLCDLIB/GLCD.o ./uTasker/uGLCDLIB/LCD.o  ./uTasker/MODBUS/MODBUS.o  ./uTasker/Driver.o ./uTasker/GlobalTimer.o ./uTasker/SSC_drv.o ./uTasker/Tty_drv.o ./uTasker/USB_drv.o ./uTasker/Watchdog.o ./uTasker/can_drv.o ./uTasker/eth_drv.o ./uTasker/iic_drv.o ./uTasker/low_power.o ./uTasker/time_keeper.o ./uTasker/uFile.o ./uTasker/uMalloc.o ./uTasker/uNetwork.o ./uTasker/uTasker.o  ./stack/Ethernet.o ./stack/NetBIOS.o ./stack/arp.o ./stack/dhcp.o ./stack/dns.o ./stack/ftp.o ./stack/ftp_client.o ./stack/http.o ./stack/icmp.o ./stack/igmp.o ./stack/ip.o ./stack/ip_utils.o ./stack/mqtt.o ./stack/pop3.o ./stack/ppp.o ./stack/smtp.o ./stack/snmp.o ./stack/tcp.o ./stack/telnet.o ./stack/tftp.o ./stack/udp.o ./stack/webutils.o ./stack/zero_config.o  ./Applications/uTaskerSerialBoot/disk_loader.o ./Applications/uTaskerSerialBoot/serial_loader.o ./Applications/uTaskerSerialBoot/usb_application.o ./Applications/uTaskerSerialBoot/usb_device_loader.o ./Applications/uTaskerSerialBoot/usb_host_loader.o ./Applications/uTaskerSerialBoot/webInterface.o   
Memory region         Used Size  Region Size  %age Used
/usr/local/mcuxpressoide-11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol ResetISR; defaulting to 0000000000000000
          RamLoc:        2068 B        16 KB     12.62%
Finished building target: uTaskerSerialLoader.elf
 
make --no-print-directory post-build
Convert the generated elf file to BIN, SREC and HEX formats
"/home/javier/git/uTasker-Kinetis/Applications/uTaskerSerialBoot/MCUXpresso/uTaskerSerialLoader_FLASH/generate.bat"
 

Now appears that complie but with a error/warning:

/usr/local/mcuxpressoide-11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol ResetISR; defaulting to 0000000000000000


And, which is the Default Flash Driver in the GUI Flash Tool?
In Connect Script I have kinetisconnect.scp
In File to Program   /home/javier/git/uTasker-Kinetis/uTaskerSerialLoader_FLASH/uTaskerSerialLoader.elf
« Last Edit: October 05, 2019, 10:29:35 AM by Javier »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2990
    • View Profile
    • uTasker
Re: Config to the KL03
« Reply #2 on: October 05, 2019, 11:22:22 AM »
Hi

Search for where the entry symbol "ResetISR" is set (somewhere in the linker script or debugger settings) and change it to "main". Then the debugger will know the entry point, where it usually sets a break point when connecting.

Regards

Mark

Offline Javier

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Config to the KL03
« Reply #3 on: October 05, 2019, 11:49:20 AM »
/usr/local/mcuxpressoide-11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.linux_11.0.1.201907311258/tools/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol main; defaulting to 0000000000000000

Thanks Mark, but now not found main. I have used low and uppercase.

Regards

Offline Javier

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Config to the KL03
« Reply #4 on: October 05, 2019, 04:28:45 PM »
Sorry Mark,

Before I have changed the directory GNU_Kinetis to McuExpresso in Managed Linker Script.

The mcu that I use is MKL03Z32VFK4

I reinstalled everything again and now the the Linker script is KL_32_2.ld now the console output is so:

Code: [Select]
Building target: uTaskerSerialLoader.elf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="uTaskerSerialLoader.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -mcpu=cortex-m0plus -mthumb -T KL_32_2.ld -L "/home/sky/git/uTasker-Kinetis/Applications/uTaskerV1.4/GNU_Kinetis" -o "uTaskerSerialLoader.elf"  ./uTasker/utFAT/mass_storage.o  ./uTasker/uGLCDLIB/GLCD.o ./uTasker/uGLCDLIB/LCD.o  ./uTasker/MODBUS/MODBUS.o  ./uTasker/Driver.o ./uTasker/GlobalTimer.o ./uTasker/SSC_drv.o ./uTasker/Tty_drv.o ./uTasker/USB_drv.o ./uTasker/Watchdog.o ./uTasker/can_drv.o ./uTasker/eth_drv.o ./uTasker/iic_drv.o ./uTasker/low_power.o ./uTasker/time_keeper.o ./uTasker/uFile.o ./uTasker/uMalloc.o ./uTasker/uNetwork.o ./uTasker/uTasker.o  ./stack/Ethernet.o ./stack/NetBIOS.o ./stack/arp.o ./stack/dhcp.o ./stack/dns.o ./stack/ftp.o ./stack/ftp_client.o ./stack/http.o ./stack/icmp.o ./stack/igmp.o ./stack/ip.o ./stack/ip_utils.o ./stack/mqtt.o ./stack/pop3.o ./stack/ppp.o ./stack/smtp.o ./stack/snmp.o ./stack/tcp.o ./stack/telnet.o ./stack/tftp.o ./stack/udp.o ./stack/webutils.o ./stack/zero_config.o  ./Applications/uTaskerSerialBoot/disk_loader.o ./Applications/uTaskerSerialBoot/serial_loader.o ./Applications/uTaskerSerialBoot/usb_application.o ./Applications/uTaskerSerialBoot/usb_device_loader.o ./Applications/uTaskerSerialBoot/usb_host_loader.o ./Applications/uTaskerSerialBoot/webInterface.o   
Memory region         Used Size  Region Size  %age Used
           FLASH:          0 GB        32 KB      0.00%
            SRAM:          0 GB         2 KB      0.00%
Finished building target: uTaskerSerialLoader.elf
 
make --no-print-directory post-build
Convert the generated elf file to BIN, SREC and HEX formats
"/home/sky/git/uTasker-Kinetis/Applications/uTaskerSerialBoot/MCUXpresso/uTaskerSerialLoader_FLASH/generate.bat"
 

16:24:56 Build Finished. 0 errors, 0 warnings. (took 3s.868ms)
« Last Edit: October 05, 2019, 04:31:16 PM by Javier »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2990
    • View Profile
    • uTasker
Re: Config to the KL03
« Reply #5 on: October 06, 2019, 03:04:18 PM »
Javier

I am pleased to hear that you managed to build the KL03 target using the supplied linker script.

Regards

Mark

Offline Javier

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Config to the KL03
« Reply #6 on: October 07, 2019, 11:25:52 PM »
Thanks Mark,

But now where store my code? Should I create a folder for my project into the Applications folder?

And How do I flash the KL03 using LPC Link v2 + McuExpresso?

Regards

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2990
    • View Profile
    • uTasker
Re: Config to the KL03
« Reply #7 on: October 08, 2019, 10:50:39 PM »
Javier

Please use this video as reference - it is essentially the same for MCUXpresso.

https://www.youtube.com/watch?v=_7Rxdr0NKWE

I haven't worked with the LPC Link v2 and MCUXpresso but you could ask questions about this in the MCUXpresso forums: https://community.nxp.com/community/mcuxpresso

Regards

Mark


Offline Javier

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Config to the KL03
« Reply #8 on: October 09, 2019, 12:27:20 AM »
Hi,

I have flashed the KL03 in a Kinetis SDK project with a McuExpresso and LPC Link v2. It's pretty easy with the GUI Flash Tool.


Offline Javier

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Config to the KL03
« Reply #9 on: October 09, 2019, 12:31:08 AM »
But with uTasker project the GUI Flash Tool ask me for the Default Flash Driver.

Since that tool accepts .axf and .bin, I converted the .elf to .bin




Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2990
    • View Profile
    • uTasker
Re: Config to the KL03
« Reply #10 on: October 09, 2019, 07:49:59 PM »
Javier

Did it work like that?

The IDE should work the same, no matter what the SW project it is building and loading; the difference must be somewhere in a (debug) setting so if you do a comparison of all such settings you may find something that can be changed to achieve identical behavior.

Regards

Mark