STLink / discovery on Demo project

Discussions and support about ChibiStudio, the free development environment for ARM.
kb1gtt
Posts: 26
Joined: Sat Jul 09, 2016 11:29 am
Been thanked: 1 time

STLink / discovery on Demo project

Postby kb1gtt » Wed Oct 28, 2020 8:09 pm

I'm trying to compile and get the below demo project to work on the below Olimex STM32_407 board.
https://www.olimex.com/Products/ARM/ST/ ... 2-E407.pdf

I've cloned from GH Chibios, and found this demo-project.
C:\ChibiStudio\chibios203\demos\STM32\RT-STM32-LWIP-FATFS-USB

I extracted some compressed files, then commented out some stuff relative to FAT and the MMC. It compiles now without errors. I can put this compiled version in the Olimex board via STVP or DfuSe. However I expect a LED to blink which does not blink, as well the HTTP should respond to some IP traffic, but it appears to be non-responsive. My next incremental step is an attempt to get SWD debugging operational. So I can attempt to better understand why it has failed to blink the LED.

I have a STM32F4 discovery. I have programmed this discovery with the RT-STM32F407-DISCOVERY demo project. I then moved the SCLK and SWDIO wires via a jumper to the Olimex board. I have programmed the Olimex board using ST's STVP program. With STVP I can erase, read or program the Olimex board via SWD interface. I'm now trying to get ChibiOS to do the same, with hopes that I'll get break point capabilities.

In RT-STM32-LWIP-FATFS-USB I have selected the .elf file and pull down "Create OpenOCD Debug Configuration (pre-select elf file into a project)", then the console says Done as shown in the below picture. However I do not get the .launch files and I do not get the debug folder. How do I get the .launch files? Or more important, how do I get the SWD debugger operational?
Capture.PNG


Other misc information, this is Win10 64bit with ChibiStudio_Windows_2020-04.7z and I have launched Eclipse via Chibi Studio GCC 9.0 shortcut.

User avatar
Giovanni
Site Admin
Posts: 13118
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 767 times
Been thanked: 651 times
Contact:

Re: STLink / discovery on Demo project

Postby Giovanni » Wed Oct 28, 2020 8:15 pm

Hi,

Is there a ./tools/fmpp directory in your Chibistudio?

After generating the debug configuration try refreshing the project, it should have created a ./debug directory, the .launch is inside.

Giovanni

kb1gtt
Posts: 26
Joined: Sat Jul 09, 2016 11:29 am
Been thanked: 1 time

Re: STLink / discovery on Demo project

Postby kb1gtt » Wed Oct 28, 2020 10:31 pm

F5 for refresh was the magic. It now has debug folder and SWD is operating as expected. Now I need to figure out why it's not making it to the main loop. Seems it goes to a handler as noted in the attached picture.
Attachments
Untitled.png
Untitled.png (7.22 KiB) Viewed 496 times

User avatar
Giovanni
Site Admin
Posts: 13118
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 767 times
Been thanked: 651 times
Contact:

Re: STLink / discovery on Demo project

Postby Giovanni » Thu Oct 29, 2020 8:03 am

Hi,

Apparently it is crashing before reaching the main function, you may try to place a break point in the early init code in board.c.

Giovanni

User avatar
russian
Posts: 323
Joined: Mon Oct 29, 2012 3:17 am
Location: Jersey City, USA
Has thanked: 14 times
Been thanked: 9 times

Re: STLink / discovery on Demo project

Postby russian » Sat Oct 31, 2020 3:01 am

Since you have debugger you can now step-over from start and see how far this makes prior to the crash?
http://rusefi.com/ - electronic fuel injection


Return to “ChibiStudio”

Who is online

Users browsing this forum: No registered users and 1 guest