Skip to main content
dave2012
Associate III
July 11, 2019
Question

Why don't user debug scripts work with STM32CubeIDE ?

  • July 11, 2019
  • 5 replies
  • 2653 views

When I specify a user debug script in STM32CubeIDE debug configuration window I get the error "Provided file doesn't exist" even though it's there. Even if I specify the same text as the "Automated Generation" option I get this error.

0690X000009YeY2QAK.jpg

Is there a workaround ?

This topic has been closed for replies.

5 replies

Tesla DeLorean
Guru
July 11, 2019

Does it work if you "Browse" to it or have the file name/path in quotes like the OpenOCD Command?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
dave2012
dave2012Author
Associate III
July 11, 2019

Clive,

Thanks for the suggestions. Unfortunately neither worked. I even tried overwriting the auto-generated script with my debug script then making it read-only but it gets overwritten every time debug mode is entered.

This must be a bug. Any idea where I can report this or do you know if ST devs read these posts ?

Regards

Dave

Tesla DeLorean
Guru
July 11, 2019

@Markus GIRDLAND​ 

I'm not sure the forum is heavily patrolled by ST staff, nor if they have any discernible QA policy for code released, or checked into the repository.

I know various departments have bug trackers, but honestly it should be someone's full time job to put a public face on that, and log/track things if they aren't going to provide a means of submission, or a github like repository where people can flag the nonsense stuff, and get some of the caretaker types to hoover the thing and throw static analysis reports at the responsible parties.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Markus GIRDLAND
ST Employee
July 12, 2019

I try to heavily patrol the STM32CubeIDE tag at least :grinning_face_with_sweat:

Bug was easy to reproduce so I'll go ahead and write a ticket for it.

As to the bug tracker suggestion... they are working on something that will make it more transparent and visible to the outside but I'm not sure of the status of it, I just saw the plans for it in a meeting.

dave2012
dave2012Author
Associate III
July 11, 2019

Totally agree with that. A simple 'Report a bug' in STM32CubeIDE could go straight into a bug tracker database that would at give the devs some decent feedback. Surely bug reports are in everyone's interest?

dave2012
dave2012Author
Associate III
August 15, 2019

I've tried STM32CubeIDE v1.02 but the issue I reported about debug scripts not working is still ongoing. Any idea when it might be fixed ? Perhaps @Markus GIRDLAND could give a heads up?

Thanks

Dave

mattias norlander
ST Employee
August 15, 2019

It is strange. "Browse" button works for us, it i is only typing a path that does not work. I saw that Clive already suggested browsing and that you have tried this without success?

We will try to fix for next release.

dave2012
dave2012Author
Associate III
August 15, 2019

Mattias,

When I browse to a configuration file, even one generated by STM32CubeIDE, then close and re-open the debug configuration window I see get an error - see attached. There's also an exception popup and the corresponding entry in the erorr log is listed below. Hope that helps.

Thanks

Dave

!ENTRY org.eclipse.jface 4 2 2019-08-15 15:04:52.587

!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".

!STACK 0

java.lang.IllegalArgumentException

   at com.st.stm32cube.ide.mcu.debug.MCUDebugPlugin.fixFileURL(MCUDebugPlugin.java:187)

   at com.st.stm32cube.ide.mcu.debug.openocd.engine.interpreter.MCUOpenOCDScriptInterpreter.run(MCUOpenOCDScriptInterpreter.java:91)

   at com.st.stm32cube.ide.mcu.debug.openocd.OpenOCDDebugHardware.doOnOpenOcdScriptFileUpdate(OpenOCDDebugHardware.java:1525)

   at com.st.stm32cube.ide.mcu.debug.openocd.OpenOCDDebugHardware.doUpdateOcdScriptFilePath(OpenOCDDebugHardware.java:1502)

   at com.st.stm32cube.ide.mcu.debug.openocd.OpenOCDDebugHardware.doSetDefaultLocalOpenOcdScriptFile(OpenOCDDebugHardware.java:1667)

   at com.st.stm32cube.ide.mcu.debug.openocd.OpenOCDDebugHardware.doOnScriptingModeUpdate(OpenOCDDebugHardware.java:1607)

   at com.st.stm32cube.ide.mcu.debug.openocd.OpenOCDDebugHardware.doRunUiLogic(OpenOCDDebugHardware.java:1576)

   at com.st.stm32cube.ide.mcu.debug.openocd.OpenOCDDebugHardware.initializeFrom(OpenOCDDebugHardware.java:992)

   at com.st.stm32cube.ide.mcu.debug.launch.oss.ui.DebuggerTab.initializeFrom(DebuggerTab.java:382)

   at org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.initializeFrom(AbstractLaunchConfigurationTabGroup.java:93)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupWrapper.initializeFrom(LaunchConfigurationTabGroupWrapper.java:204)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.displayInstanceTabs(LaunchConfigurationTabGroupViewer.java:875)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.lambda$4(LaunchConfigurationTabGroupViewer.java:736)

   at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.inputChanged(LaunchConfigurationTabGroupViewer.java:751)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput0(LaunchConfigurationTabGroupViewer.java:683)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput(LaunchConfigurationTabGroupViewer.java:663)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.handleLaunchConfigurationSelectionChanged(LaunchConfigurationsDialog.java:1050)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$4.selectionChanged(LaunchConfigurationsDialog.java:617)

   at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:874)

   at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)

   at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)

   at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)

   at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:871)

   at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1719)

   at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1084)

   at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:376)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.doInitialTreeSelection(LaunchConfigurationsDialog.java:662)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.initializeContent(LaunchConfigurationsDialog.java:1186)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.createContents(LaunchConfigurationsDialog.java:473)

   at org.eclipse.jface.window.Window.create(Window.java:431)

   at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1099)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.create(LaunchConfigurationsDialog.java:378)

   at org.eclipse.jface.window.Window.open(Window.java:788)

   at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1239)

   at org.eclipse.debug.ui.DebugUITools.lambda$1(DebugUITools.java:631)

   at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)

   at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:637)

   at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:575)

   at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:85)

   at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.runWithEvent(OpenLaunchDialogAction.java:94)

   at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:240)

   at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:230)

   at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:568)

   at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:400)

   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)

   at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)

   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)

   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944)

   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547)

   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)

   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)

   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)

   at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)

   at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)

   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)

   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566)

   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)

   at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)

   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)

   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)

   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)

   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)

   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)

   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

   at java.lang.reflect.Method.invoke(Method.java:498)

   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:661)

   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)

   at org.eclipse.equinox.launcher.Main.run(Main.java:1476)

dave2012
dave2012Author
Associate III
October 31, 2019

User supplied OpenOCD scripts now work with v1.1.0 - thanks for fixing it

I've noticed a couple of things:

1. The OpenOCD event 'gdb-flash-write-end' never fires so there's no way of knowing when the FLASH has been programmed other than trying to infer it.

2. When a temporary breakpoint is set at the reset vector using the 'Set breakpoint at:' option, pressing the toolbar target reset button doesn't halt the CPU at the reset vector every time. It seems to only work half the time. A workaround is to manually place a breakpoint at the reset vector in the IDE but this consumes a user breakpoint which is a shame.

Dave