otg & lwip debugging

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
alb
Posts: 12
Joined: Fri May 23, 2014 2:28 am

otg & lwip debugging

Post by alb »

This is not so much a Chibios problem. I have an proto application with USART and OTG running and have been using prints to the shell for my debugging. Now I am trying to add ethernet. When I add the stuff for the lwip to the makefile, mcuconfig.h, and halconfig.h the OTG regs are either not getting programmed or are getting reset. So, I finally need to use a debugger. My hardware is a STM32F4-Discovery and STM32F4DIS-BB. I have been using yagarto and st-link. How do I use a debugger in this environment?

Thanks, ALB
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: otg & lwip debugging

Post by Giovanni »

It looks like an HW problem, consider this while debugging.

You could download ChibiStudio, the toolchain includes everything is required for ChibiOS on ARM, including compilers and debuggers.

Giovanni
alb
Posts: 12
Joined: Fri May 23, 2014 2:28 am

Re: otg & lwip debugging

Post by alb »

Oh, that is probably something that makes life easier:)

If I start with the working code and enable the MAC subsystem the problem presents itself. So in the halconfig.h:

/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
#define HAL_USE_MAC TRUE
#endif

Any hints?

ALB
alb
Posts: 12
Joined: Fri May 23, 2014 2:28 am

Re: otg & lwip debugging

Post by alb »

I have so far been unable to get the debugger to work with ChibiStudio, STM32F4-Discovery, ST-Link environment. Seems to be an openocd - stlink problem. It complains about the interface speed. I tried to set it at 1000k as a post suggested, but that did not help.

STM32 ST-LINK Utility.exe v3.3.0
STLinkUSBDriver.dll v3.3.1.0
ST-LINK_CLI.exe v1.9.0

Tried getting it to connect from a command prompt window with no success.

ALB
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: otg & lwip debugging

Post by Giovanni »

Are you using the OpenOCD launch configurations in ChibiStudio? those should just work.

Giovanni
Post Reply