UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor jlporter
Visitor
13,402 Views
Registered: ‎06-10-2010

SDK java error when launching elf

Jump to solution

I am having a problem when attempting to run a compiled program on a microblaze system using SDK 12.1. I first program the FPGA from the SDK and set the "ELF File to Initialize in Block RAM" to bootloop. Then, when I try to run the elf by right clicking on it and selecting Run As->Launch on Hardware, an error message pops up that says "An internal error occured during: "Launching program.elf". java.lang.NullPointerException. In case it is useful, this is the message that appear in .metadata/.log when the error occurs.

 

 

!ENTRY org.eclipse.core.jobs 4 2 2010-07-19 15:17:17.310
!MESSAGE An internal error occurred during: "Launching navio.elf (1)".
!STACK 0
java.lang.NullPointerException
at com.xilinx.sdk.debug.core.XilinxAppLaunchConfigurationDelegate.launch(Unknown Source)
at com.xilinx.sdk.debug.ui.XilinxAppLaunchDelegateWrapper.launch(Unknown Source)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

 

!ENTRY org.eclipse.core.jobs 4 2 2010-07-19 15:17:17.310!MESSAGE An internal error occurred during: "Launching navio.elf (1)".!STACK 0java.lang.NullPointerException at com.xilinx.sdk.debug.core.XilinxAppLaunchConfigurationDelegate.launch(Unknown Source) at com.xilinx.sdk.debug.ui.XilinxAppLaunchDelegateWrapper.launch(Unknown Source) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

 

I am able to connect to the FPGA through XMD and download the elf that way, but it would be more convenient to use the GUI. Does anybody have any ideas why this error is occurring?

 

As a side note, is there a way I can download the program to BRAM directly when programming the FPGA? I am not able to select anything other than bootloop in the software configuration section of the program FPGA window. I'd like to just be able to select my elf from that menu and download it in one step.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
17,367 Views
Registered: ‎01-18-2008

Re: SDK java error when launching elf

Jump to solution

Sorry for not explaining clearly. Please check the following:

 

1. In your application's properties, click on Project References and make sure that the BSP project is referenced.

2. In your BSP project's properties, click on the Project References and make sure that the h/w platform is referenced.

 

In general, modifying folders is not a problem at all. However, if you change project names, I believe SDK is getting into trouble since the references aren't updated properly. We'll try to fix issues in this area in future releases. Thanks for your help in debugging though.

View solution in original post

0 Kudos
9 Replies
Xilinx Employee
Xilinx Employee
13,397 Views
Registered: ‎01-18-2008

Re: SDK java error when launching elf

Jump to solution

Is your project stored inside the workspace, or in a different folder? If it is stored outside of the workspace, then try creating a project inside the workspace and see if that helps.

 

The initialize bitstream with ELF should show all ELF's in the workspace. Maybe fixing the above would get things working. 

 

Here's the response I had in the earlier forum thread:

 

---

 I'd check the following:

 

1. make sure the application, hw platform and BSP are all in the same folder, preferably within the workspace.

2. make sure that the linker script is generated within the app folder.

3. make sure that the app project references the correct BSP and the BSP project references the correct h/w platform. (Right click -> Project Properties -> References)

 

Apart from that, I cannot think of anything that would cause this situation to occur. Maybe you could describe your project structure (location on disk) to us?

---

Visitor jlporter
Visitor
13,363 Views
Registered: ‎06-10-2010

Re: SDK java error when launching elf

Jump to solution

Thanks for the quick response. It looks like it was an issue with the project references as suggested by your third point. The BSP reference was not checked. Selecting the BSP in the project references has fixed the issue.

 

Another quick question, when I select the HW platform in the project references, the program FPGA menu will no longer open. Selecting that item in the menu just does nothing. Is this expected? Is the BSP the only thing that should be selected in Project References?

 

Thanks again for your help!

0 Kudos
Xilinx Employee
Xilinx Employee
13,358 Views
Registered: ‎01-18-2008

Re: SDK java error when launching elf

Jump to solution

Just curious - how did you end up with a project without the reference to the BSP? We clearly need to do more error checking here to make sure we don't just throw up an exception.

 

The Program FPGA dialog - it might again be an issue with the references. See if your app -> bsp -> hw reference chain is correct. Also, if a dialog doesn't open up, it is almost always an exception that should be documented in .metadata/.log file. Please provide that.

0 Kudos
Visitor jlporter
Visitor
13,355 Views
Registered: ‎06-10-2010

Re: SDK java error when launching elf

Jump to solution

I have no idea how the project ended up without the BSP reference. One other thing I didn't mention was that I had changed the name of the source directory previously. The old source directory (which no longer exists) was selected in the references. When unselected this directory and then reopened the references dialog, the old directory was no longer listed. There is no listing for the new source directory, only the HW platform and the BSP. So perhaps that was part of the problem as well.

 

Here is the corresponding entry from the .log file for the program FPGA dialog. I'm not sure how to check the "app -> bsp -> hw reference chain" but if you tell me where to look I can provide that as well.

 

 

!ENTRY org.eclipse.ui 4 0 2010-07-20 11:39:40.965
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
at com.xilinx.sdk.tools.internal.BramInitElfLocator.filterByProcessor(Unknown Source)
at com.xilinx.sdk.tools.internal.BramInitElfLocator.getAppProjectsForHwPlatform(Unknown Source)
at com.xilinx.sdk.tools.internal.BramInitElfLocator.getELFs(Unknown Source)
at com.xilinx.sdk.targetmanager.ui.configfpga.ProgramFPGAView.initializeElfProcMap(Unknown Source)
at com.xilinx.sdk.targetmanager.ui.configfpga.ProgramFPGAView.setupDefaults(Unknown Source)
at com.xilinx.sdk.targetmanager.ui.configfpga.ProgramFPGAView.createDialogArea(Unknown Source)
at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:147)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.jface.window.Window.open(Window.java:790)
at com.xilinx.sdk.targetmanager.ui.configfpga.ProgramFPGAHandler.execute(Unknown Source)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:770)
at org.eclipse.ui.menus.CommandContributionItem.access$10(CommandContributionItem.java:756)
at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:746)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

!ENTRY org.eclipse.ui 4 0 2010-07-20 11:39:40.965!MESSAGE Unhandled event loop exception!STACK 0java.lang.NullPointerException at com.xilinx.sdk.tools.internal.BramInitElfLocator.filterByProcessor(Unknown Source) at com.xilinx.sdk.tools.internal.BramInitElfLocator.getAppProjectsForHwPlatform(Unknown Source) at com.xilinx.sdk.tools.internal.BramInitElfLocator.getELFs(Unknown Source) at com.xilinx.sdk.targetmanager.ui.configfpga.ProgramFPGAView.initializeElfProcMap(Unknown Source) at com.xilinx.sdk.targetmanager.ui.configfpga.ProgramFPGAView.setupDefaults(Unknown Source) at com.xilinx.sdk.targetmanager.ui.configfpga.ProgramFPGAView.createDialogArea(Unknown Source) at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:147) at org.eclipse.jface.window.Window.create(Window.java:431) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089) at org.eclipse.jface.window.Window.open(Window.java:790) at com.xilinx.sdk.targetmanager.ui.configfpga.ProgramFPGAHandler.execute(Unknown Source) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:770) at org.eclipse.ui.menus.CommandContributionItem.access$10(CommandContributionItem.java:756) at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:746) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

 

0 Kudos
Xilinx Employee
Xilinx Employee
17,368 Views
Registered: ‎01-18-2008

Re: SDK java error when launching elf

Jump to solution

Sorry for not explaining clearly. Please check the following:

 

1. In your application's properties, click on Project References and make sure that the BSP project is referenced.

2. In your BSP project's properties, click on the Project References and make sure that the h/w platform is referenced.

 

In general, modifying folders is not a problem at all. However, if you change project names, I believe SDK is getting into trouble since the references aren't updated properly. We'll try to fix issues in this area in future releases. Thanks for your help in debugging though.

View solution in original post

0 Kudos
Visitor jlporter
Visitor
13,343 Views
Registered: ‎06-10-2010

Re: SDK java error when launching elf

Jump to solution

Thanks for the clear description. The references for both appear correct now.

0 Kudos
Xilinx Employee
Xilinx Employee
13,341 Views
Registered: ‎01-18-2008

Re: SDK java error when launching elf

Jump to solution

But did that fix your issue though?

0 Kudos
Visitor jlporter
Visitor
13,336 Views
Registered: ‎06-10-2010

Re: SDK java error when launching elf

Jump to solution

The original issue was fixed by selecting the BSP in the source project references. I only see the other issue (where I am unable to open the program FPGA dialog) when the HW platform is also selected in the project references. When I have the project references setup correctly, everything is working fine. I was only pointing out the second issue because it seemed strange and since there was no error message or anything, it was difficult to know that it was caused by the references being set incorrectly.

0 Kudos
Xilinx Employee
Xilinx Employee
13,332 Views
Registered: ‎01-18-2008

Re: SDK java error when launching elf

Jump to solution

Ok, thank you. We'll make some improvements in 12.3 to detect such conditions and issue appropriate warning/error messages.

0 Kudos