Page 8 of 12
Re: ST-Link V2 on Linux/OSX/Windows
Posted: Sun Feb 17, 2013 3:55 pm
by DeusExMachina
debugging freeses in asm code
Code: Select all
void _port_thread_start(void) {
chSysUnlock();
asm volatile ("mov r0, r5 \n\t"
"blx r4 \n\t"
"bl chThdExit");
}
Tectu, could you share your old st-util code for me?
Re: ST-Link V2 on Linux/OSX/Windows
Posted: Sun Feb 17, 2013 5:39 pm
by Tectu
Sorry, I just took a look and I don't have the code / binary / repo anymore. Also, I couldn't find it in my backups since I did rebuild my backup server a month ago and I didn't move stuff

Just try the repo state from let's say July. You can directly download a zip file from github.com.
I remember that there were some gdb version issues. The newest GDB versions didn't work properly. But I'm not sure if this is still the case. Also, I am 100% sure that an error like yours didn't occur.
~ Tectu
Re: ST-Link V2 on Linux/OSX/Windows
Posted: Sun Feb 17, 2013 5:56 pm
by DeusExMachina
thank you, I'll try to rollback using git
Re: ST-Link V2 on Linux/OSX/Windows
Posted: Sun Feb 17, 2013 6:09 pm
by Tectu
You could also try to explain to me why you want to use texane instead of OpenOCD? STLink are both, v1 and v2 supported. Also, mabl integrated ChibiOS/RT debugging support into OpenOCD (git version!).
~ Tectu
Re: ST-Link V2 on Linux/OSX/Windows
Posted: Mon Feb 18, 2013 1:42 am
by DeusExMachina
really

it's time to move, I think...
Re: ST-Link V2 on Linux/OSX/Windows
Posted: Mon Feb 18, 2013 7:15 am
by Tectu
There you go

Well, the only thing I can tell you is, that you won't regret it afterwards. OpenOCD works very stable here and again, there's ChibiOS debugging support built-in.
~ Tectu
Re: ST-Link V2 on Linux/OSX/Windows
Posted: Mon Feb 18, 2013 4:45 pm
by DeusExMachina
I download last openocd, but I can't get it working... It connects target and adapter, but I cant flash MCU, and many examples from internet don't work... For example "monitor" commands is deprecated... When I use load i get error "cant load in exec mode". Halt commands (monitor halt, soft-halt) don't work

I need a good instructions to set up openocd

The last one...
Re: ST-Link V2 on Linux/OSX/Windows
Posted: Mon Feb 18, 2013 5:06 pm
by Tectu
Just to get this right... You can start openocd and connect to the target successfully, right? So, you do open arm-none-eabi-gdb afterwards, right? Then you connect to the openocd server?
Also
this.
~ Tectu
Re: ST-Link V2 on Linux/OSX/Windows
Posted: Mon Feb 18, 2013 5:46 pm
by DeusExMachina
Tectu wrote:Just to get this right... You can start openocd and connect to the target successfully, right? So, you do open arm-none-eabi-gdb afterwards, right? Then you connect to the openocd server?
yes, openocd starts (but successfully connect to MCU only on the second run, first run fails). arm-none-eabi-gdb connects to 4444 port and they become to speak

I load symbols, but image doesn’t load, because of "cant load in exec mode" error.
Tectu wrote:Also
this.
~ Tectu
Excellent article, I’ll try it ASAP

Re: ST-Link V2 on Linux/OSX/Windows
Posted: Mon Feb 18, 2013 5:50 pm
by Tectu
Try to follow the guide, you should go with 3333 instead of 4444 default port. 4444 is telnet.
Feel free to extend the guide to your needs. I never really came to finish the actual debugging part.
~ Tectu