KDS V1.0 Pre-Beta Hands-On Traning Material at FTF Dallas 2014

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

KDS V1.0 Pre-Beta Hands-On Traning Material at FTF Dallas 2014

KDS V1.0 Pre-Beta Hands-On Traning Material at FTF Dallas 2014

Greetings,

attached is the material of the Kinetis Design Studio (KDS) hands-on training held at FTF 2014 in Dallas. It was using the V1.0 pre-beta version of the tools. There will be some changes for the final V1.0 beta coming out early in May, but is very close to the upcoming beta.

 

Erich

Original Attachment has been moved to: Lab_1.zip

Labels (1)
Attachments
Comments

Hey Erich,

Thanks for this great tutorial.

It almost works fine!

Somehow, I got 2 errors during compiling:

C:/Freescale/KSDK_1.0.0-Beta/platform/hal/sim/fsl_sim_features.h:279:6: error: #error "No valid CPU defined"

C:/Freescale/KSDK_1.0.0-Beta/platform/hal/uart/fsl_uart_features.h:505:6: error: #error "No valid CPU defined!"

So, I looked into the sources and figured out that my define of CPU_MK64FN1M0VLQ12 isn't available; but that seems strange since I've the same board as you have. I added another MK64 MCU to my defines to avoid the errors.

Thereby I was now able compiling the project and it works fine; but when I'm closing the IDE and open it again I'm not able to compile the project again. I'm always getting the same failure:

'Building target: ThirdTest.elf'

'Invoking: Cross ARM C++ Linker'

arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "C:/Users/Christian/workspace.kds/ThirdTest/Project_Settings/Linker_Files/ProcessorExpert.ld" -Xlinker --gc-sections -L"C:/Users/Christian/workspace.kds/ThirdTest/Project_Settings/Linker_Files" -Wl,-Map,"ThirdTest.map" -o "ThirdTest.elf"  ./Static_Code/System/PE_low_level_init.o  ./Sources/Events.o ./Sources/main.o  ./Generated_Code/Cpu.o ./Generated_Code/gpio1.o ./Generated_Code/hardware_init.o ./Generated_Code/pin_mux.o ./Generated_Code/pitTimer1.o ./Generated_Code/uartCom1.o  

c:/freescale/kds_1.0.1/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.0/../../../../arm-none-eabi/bin/ld.exe: cannot find entry symbol Reset_Handler

collect2.exe: error: ld returned 1 exit status

make: *** [ThirdTest.elf] Error 1

Any clue what happened?

Thx and greets!

- Christian

Hey,

I encounter another problem. I wanted to start debugging on my FRDM-K64F and I found also the video tutorial besides this description; but unfortunately both did not work.

In the case of the description which is shown in the pdf, my board wasn't found. I guess the bootloader could not be up-to-date. In the case of the video, I got the following error message: "Error while launching command: arm-none-eabi-gdb --version".

Any clue what happened?

Greets!

-Christian

PS: I've found a work-around for the issue described above. Instead of using a linked project mode I switched to a standalone project mode. :smileyhappy:

For the problem "Error while launching command: arm-none-eabi-gdb --version", please see the release notes (Kinetis Design Studio V1.0.1 Beta Release Notes, search for "--version"): it looks your environment variables are having an issue.

Erich

Yes, the SDK changed the CPU defines, so you have to add that additional CPU macro.

Erich

Thanks, it worked! :smileyhappy:

Great tutorial Erich!

I'm running through and encountered a couple issues but was able to get through them via the Release Notes (same No CPU defined as Chris above). Now I'm stuck on what seems the last step of compiling, getting the Reset_Handler error message below:

'Building target: project_1.elf'

'Invoking: Cross ARM C++ Linker'

arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "D:/Projects/Workspace/project_1/Project_Settings/Linker_Files/ProcessorExpert.ld" -Xlinker --gc-sections -L"D:/Projects/Workspace/project_1/Project_Settings/Linker_Files" -Wl,-Map,"project_1.map" -o "project_1.elf"  ./Static_Code/System/PE_low_level_init.o  ./Sources/Events.o ./Sources/main.o  ./Lab_1/my_main.o  ./Generated_Code/Cpu.o ./Generated_Code/gpio1.o ./Generated_Code/hardware_init.o ./Generated_Code/pin_mux.o ./Generated_Code/pitTimer1.o ./Generated_Code/uartCom1.o  

c:/freescale/kds_1.0.1/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.0/../../../../arm-none-eabi/bin/ld.exe: cannot find entry symbol Reset_Handler

collect2.exe: error: ld returned 1 exit status

make: *** [project_1.elf] Error 1

Any idea what the issue is?

Thanks!

Hi Scott,

hmm, strange, I had that issue a while back at FTF, but I have not seen it afterwards. I asked around, and it could be that somehow the vector table and linker file generation did not succeed properly. Could you attach a zip file of your project so I can have a look? After that, you can try this workaround: you need to enforce new linker file/vector table generation, for this go into the CPU properties, build tab, and there e.g. change the heap size or stack size, then regenerate and rebuild the code.
I have added this to the Release Notes, just in case.

I hope this helps!

Thanks for the fast response Erich!

That is strange. I've attached my zip file for your review, thanks for looking at it. Also, the workaround worked. Thank you!

project_1.zip - Google Drive

Hi Erich,

Now I'm getting the following error when debugging. I tried rebooting the board and recovering the device (Disconnection bug?) but still get the same error. Should I be using a different SDA other than DEBUG-APP_Pemicro_v108.SDA to initialize the board?

Exception condition detected on fd 0

Quit (expect signal SIGINT when the program is resumed)

Quit (expect signal SIGINT when the program is resumed)

error detected on stdin

Thanks,

Scott

Think I found the issue. Under Debug Configurations my port drop down is blank. Looking into my USB ports on my PC now.

Make sure you select the right device (Multilink or OpenSDA or Segger, depending what firmware you have loaded on your board or what cable you are using), then use the refresh button.

Hi Scott,

many thanks for providing the project. And I see now what the problem is: Processor Expert has not created all the needed links to the Kinetis SDK sources. The SDK folder does not contain any links to the files:

pastedImage_0.png

Instead, it should be like this:

pastedImage_1.png

Now the linker error message makes sense: because the SDK startup files are not compiled and linked, it cannot find the Reset_Handler symbol.

As workaround, to have the links re-generated, it is needed to kick off a new Processor Expert code generation. If you do not change any of the settings, Processor Expert does not think it has to do anything, and does not create the links. So it is needed to 'touch' one of the Processor Expert settings (in any of the components), like changing a property in the settings to a different value and then changing it back to the previous value.

Then this is marked with a '*' in the tab of the component inspector. This marks the component settings as modified, and it will cause the links be generated.

Erich

Thanks for digging into this Erich, I appreciate it.

I find that every time I start a new instance of KDS I get the Reset_Handler error above. The links to the files are there when I open the project before a build (though the MK64F12 folder is not) , but after I build the project they're removed. Performing the workaround fixes the issue.

The error detected on stdin is still haunting me, recovering the board doesn'e seem to do the trick. I missed your comment earlier but which refresh button are you referring to?

Thanks!

Scott

Hi Scott,

your project zip file does not include the launch configuration settings. I recommend that you enble sharing of the settings so it is stored in the project. See http://mcuoneclipse.com/2014/03/15/sharing-debug-configuration-with-eclipse/

Can you share screenshots of your debug settings (debug and startup tab)? And check with the examples in KDS Debug Configurations (OpenOCD, P&E, Segger)?

Erich

Hi Erich, here are the my debugger and startup settings. The only discrepancy I see, and a large one I'm guessing, is that the port drop down is still blank (I realize know which refresh button you were referring to (duh!)). The refresh button has never been populated for me, no matter which device I select. So I'm guessing is a pc issue on my side; the USB port does appear as "working properly" in device manager (windows7), but is not listed as a device (eg OpenSDA etc).

https://drive.google.com/file/d/0B76tXPhKKxHFTy11YTRRSkl5cGs/edit?usp=sharing

https://drive.google.com/file/d/0B76tXPhKKxHFZGUzUXlsWUp3OEk/edit?usp=sharing

Hi Scott,

ok, if that drop box is empty, this explains why you cannot debug. Can you select the device listed (after refresh) and debug again?$

Or what firmware do you have on the board?

Erich

Thanks Erich.

Selecting a different device or interface then hitting refresh still doesnt populate the port drop down list. Debugging selecting the device after hitting refresh still provides the same error and empty port list.

Firmware version 0203

<!-- Version: 0203 Build: May 30 2014 19:00:51 Git Commit SHA: ebe7dab202606d9dd80804b70ce95580d3077e23 Git local mods:Yes-->

Thanks,

Scott

0203 sounds like the mbed CMSIS-DAP?

If so, then you cannot connect with the P&E GDB server to it, you need the OpenOCD for CMSIS-DAP.

See http://mcuoneclipse.com/2014/03/15/sharing-debug-configuration-with-eclipse/ for the settings.

Erich

I followed the guide here to update my firmware Firmware FRDM K64F - Handbook | mbed, previous version was 0201 which exhibited the same behavior. I tried using the guide you provided above but it gives me:

Error in final launch sequence

Failed to execute MI command:

-target-select remote localhost:3333

Error message from debugger back end:

localhost:3333: The system tried to join a drive to a directory on a joined drive.

localhost:3333: The system tried to join a drive to a directory on a joined drive.

which firmware should i use for the PE GDB tutorial?

Thanks for all the help Erich, appreciate the assistance.

The tutorial assumes you have the P&E OpenSDAv2 firmware loaded. See Using FRDM-K64F with P&amp;E and Segger OpenSDAv2 Firmware which has as well the firmware file attached.

Erich

That did it!!!

Windows recognized the port and installed drivers (I was too late to do it manually, but it's working), and I'm able to debug.

THANK YOU Erich for your time and efforts, greatly appreciated!! :smileyhappy:

Best,

Scott

No ratings
Version history
Last update:
‎04-17-2014 01:00 PM
Updated by: