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
otg & lwip debugging
Moderators: RoccoMarco, lbednarz, tfAteba
- 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
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
You could download ChibiStudio, the toolchain includes everything is required for ChibiOS on ARM, including compilers and debuggers.
Giovanni
Re: otg & lwip debugging
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
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
Re: otg & lwip debugging
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
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
- 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
Are you using the OpenOCD launch configurations in ChibiStudio? those should just work.
Giovanni
Giovanni