cancel
Showing results for 
Search instead for 
Did you mean: 

mxCube import to Arm Gnu Eclipse

Posted on December 03, 2015 at 18:49

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?
20 REPLIES 20
TarekB-ST
Associate III
Posted on December 04, 2015 at 17:12

Hello Bremen,

Since openocd supports natively jlink so this is possible using System Workbench

This 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

    0690X000006040yQAA.png

     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 modify 

adapter_khz xxx

  >>  

adapter_khz 240

     then from System Workbench > Debug Configurations, select the modified ''stm32l476g_eval.cfg'' as local script

     0690X00000604tAQAQ.png

 

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 (use 

WinUSB

)

     to do this use 

http://zadig.akeo.ie/

 and replace the driver

     0690X00000604tEQAQ.png

Best Regards,

Tarek

Posted on December 04, 2015 at 18:22

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?

Posted on December 07, 2015 at 08:05

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?

TarekB-ST
Associate III
Posted on December 07, 2015 at 13:50

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,

Tarekb
Posted on December 07, 2015 at 14:43

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?

TarekB-ST
Associate III
Posted on December 07, 2015 at 15:37

Sorry, but what do you mean by zigzag ?

Posted on December 07, 2015 at 18:10

My bad... Zadig, sorry.

TarekB-ST
Associate III
Posted on December 08, 2015 at 11:17

You need to list all devices from Zadig (Menu) > Options > List All Devices

You JLink should be listed in the frontal combo-box.
Posted on December 08, 2015 at 14:24

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?