Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
search inside all forums
Workflow problem trying to get NXP Freescale KL03Z up and running using Windows 7
. Aug 14, 2019 at 06:56 PM (18:56 hours)
Staff: Zahar R.

  • I have a NXP board type FRDM-KL03Z with bootloader Version 1.11 and PEMicro FRDM-KL03Z Mass Storage/Debug App ver 1.18 installed in the board's auxiliary processor.

    Using the ARM GCC toolchain and MCUXpresso SDK 2.3.1, I have successfully built NXP's example "hello_world.elf" file.

    I downloaded and installed the USB driver "Windows PEDrivers_install.exe" from http://www.pemicro.com/opensda/index.cfm
    Windows 7 Device Manager is showing this under Ports as "OpenSDA - CDC Serial Port (COM4)"

    I converted the .elf file to .srec file
    (Didn't know how to do this in Windows so I temporarily transferred to a Linux computer and used the following command:
    arm-none-eabi-objcopy -O srec hello_world.elf hello_world.srec
    Not sure if this conversion step is necessary.)

    I then copied "hello_world.srec" to the FRDM-KL03Z board on my Windows 7 pc.

    In Windows, I set up a terminal session on PuTTY with serial port COM4, 9600 baud, 8 data bits, 1 stop bit (no Parity, no flow control) specified.

    When I pressed the reset button on the the FRDM-KL03Z board, I expected to see "hello world" on the PuTTY screen. But there was no response.

    Where have I gone wrong?




    Comments

  • Hello, 

    Can you please email me a full hello world project to zahar "at" pemicro "dot" com.

    It is important to keep in mind that Virtual Serial Port on OpenSDA only works in conjunction with onboard UART module. Therefore, you have to make sure that printf statement write redirects the data to KL03 UART peripheral, which would in turn send it down to USB-COM virtual serial port.

    When you run this debug project under MCUXpresso via OpenSDA debug interface and step into printf routine, do you see the data being written to UART peripheral registers?

    Best Regards,
    Zahar
    P&E

  • Hi Zahar

    Thanks for your reply. I have sent the project to you in .zip format. Please remember that my MCUXpresso SDK 2.3.1 was built for the ARM-GCC toolchain.

    "When you run this debug project under MCUXpresso via OpenSDA debug interface and step into printf routine, do you see the data being written to UART peripheral registers"
    As a beginner, I'm not sure how to do this yet! Bear in mind that I'm using the ARM GCC toolchain with MinGW and Cmake; I'm not using the MCUXpresso IDE.

    UPDATE:
    I have solved my original problem by transferring the file in .srec format from the p.c. to the board and then ***disconnecting/reconnecting the board's USB link.***

    I can now see "hello world." on the PuTTY terminal. Great!

    I would still like to keep this thread open to learn how to set up the debug interface. Is there a PE Micro "How to set up debug for KL03Z" webpage or manual?

  • Hello, 

    Below is a link to blog post on our website to required Debug Configuration settings that need to be configured in order for the debug session to be launched on MCUXpresso.

    http://www.pemicro.com/blog/index.cfm?post_id=130

    These would be similar under any Eclipse based IDE where PEmicro plugin is installed.

    Just to make sure I understand your setup correctly, are you working with an Eclipse IDE where PEmicro plugin is installed?

    Best Regards,
    Zahar
    P&E

  • Thank you for the link, Zahar. I will run through it.

    Just to clarify, I am a beginner and haven't used an offline debugger yet. (In the past, I simply wrote programs in ARM's online mbed compiler and transferred the BIN file to whatever target board I was using).

    For the KL03Z, I want to find a desktop IDE that has a debugging facility that can be used with OpenSDA and the ARM GCC toolchain. Can you recommend one?

    I have installed MCUXpresso IDE 10.3.1 but it doesn't have the ARM GCC toolchain option when you start a new projects (only MinGW option)


    By the way, I downloaded and copied the Firmware App MSD-DEBUG-FRDM-KL03Z_Pemicro_v118.SDA across to BOOTLOADER. After resetting, the board shows up as volume FRDM-KL03Z in Windows Explorer. Do I have to do anything else to prepare the board or is it ready to accept .srec files?

Add comment


   Want to comment? Please login or create a new PEmicro account.







© 2019 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement