2015-12-03 09:49 AM
Hello there,
Arm gnu eclipse ( http://gnuarmeclipse.github.io ) is a plugin for eclipse similar to openSTM32. It has its advantages, for example that user can use way more debuggers than only ST-LINK. I was wondering either ST would consider making an importer for mxCUBE for Arm Gnu EClipse plugin the same way they did for openSTM32.For example I have a huge problem now. I am using mxCube to import code for openSTM32 project in eclipse. I am using JLINK, so I have to use the module from Arm Gnu Eclipse plugin, as openSTM32 doesnt support it. And now I cannot view peripherals while dubbuging even though both plugins support it. I cant use Arm Gnu Eclipse one, because the project is created by openSTM32. I cant use the second one, as I am using Arm Gnu Eclipse debugger... I dont know whats a way out out of this. I would have to either get rid of JLINK and get st-link, but jlink is a lot better. Or I would have to manually copy generated code to Arm Gnu Eclipse project...So would it be possible maybe for ST to make an importer for Arm Gnu Eclipse? Not a bad idea?2015-12-04 08:12 AM
Hello Bremen,
Since openocd supports natively jlink so this is possible using System WorkbenchThis is kind of tricky but possible :)For guidance I will use STM32L476G-EVAL: 1- since you cannot select JLINK from SW inteface, you need to use a cutomized script I will base on default board configuration file ''stm32l476g_eval.cfg'' located in ''C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_latest\resources\openocd\scripts\st_board'' copy this file to your workpspace and modify it as following and copy ''stm32l4.cfg'' located in ''C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_latest\resources\openocd\scripts\target'' to your workspace (beside the modified ''stm32l476g_eval.cfg'') and modifyadapter_khz xxx
>>adapter_khz 240
then from System Workbench > Debug Configurations, select the modified ''stm32l476g_eval.cfg'' as local script Then you launch your debug session.If you have this error''Error: Cannot find jlink Interface! Please check connection and permissions''
you need to change the usb driver used with jlink (useWinUSB
) to do this use and replace the driver Best Regards,Tarek2015-12-04 09:22 AM
Thank you for the explanation. I will try this Monday morning. Please only tell me, because I have two different boards with STM32F407 and on one I have to use SWD instead of JTAG, because I dont have enough pins available. Do 2 need 2 different config files?
2015-12-06 11:05 PM
I tried this config and I am stuck.
First of all, I am using STM32F407VTG6. So I copied thestm32f4discovery.cfg file to my workspace and modiefied lines:# This is an STM32F4 discovery board with a single STM32F407VGT6 chip.
# http://www.st.com/internet/evalboard/product/2524jsp source [find interface/jlink.cfg] source [find target/jlink.cfg] # use hardware reset, connect under reset reset_config srst_only srst_nogate I also copied filestm32f4x.cfg to my workspace and first didnt change the speed to 240 khz, but after it failed I changed it but it didnt help. I changed the script in debug configuration in eclipse and tried to debug, I got error message:Error in final launch sequence
Failed to execute MI command: -target-select remote localhost:3333 Error message from debugger back end: localhost:3333: System próbowa³ sprzêgn¹æ dysk z katalogiem na dysku sprzêgniêtym. localhost:3333: System próbowa³ sprzêgn¹æ dysk z katalogiem na dysku sprzêgniêtym. The error message is polish would stand for something like ''System tried to connect drive with folder on a disk that is connected''. I went to zig zag application but there my jlink is on visible in the devies list so I cant change any drivers :(. Any ideas?2015-12-07 04:50 AM
I think it is because you have many active gdb instance(s)
so you need to close them from debug perspective (Window > Open Perspective > Other >Debug
), then from debug view terminate and remove active sessions.Regards,Tarekb2015-12-07 05:43 AM
I double checked, that did not help. I dont think Eclipse is connecting with jlink at any point when running this command. Also, why isnt jlink seen by zigzag?
2015-12-07 06:37 AM
Sorry, but what do you mean by zigzag ?
2015-12-07 09:10 AM
My bad... Zadig, sorry.
2015-12-08 02:17 AM
You need to list all devices from Zadig (Menu) > Options > List All Devices
You JLink should be listed in the frontal combo-box.2015-12-08 05:24 AM
Ok, thank you. This worked, but the problem is not related to this as it still occurs.
I am using this local script in debug config for stm32f407vtg:# This is an STM32F4 discovery board with a single STM32F407VGT6 chip.
# http://www.st.com/internet/evalboard/product/2524jsp
source [find interface/jlink.cfg]
source [find target/jlink.cfg]
# use hardware reset, connect under reset
reset_config srst_only srst_nogate
Is it correct?