Unable to source level debug code in libmbed using IDE 2.3.3.

オープン
#997 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
c

調査の方向性

まず issue #993 と mbed-os-to-arduino の copy_core_files ルーチンを読み、次に参照されている STM32 HAL のソースパスと、生成された libmbed.a のデバッグ設定を調べます。OV5640 スケッチを使って IDE 2.3.3 のデバッグフローを再現します。デバッガーが呼び出しから HAL 関数内へステップ実行でき、そのソースを特定できるか、または想定される制限が文書化されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

In my case, I am trying to debug some OV5640 camera code I am trying to make work on the GIGA and thought it would be
easier if I could debug the code using the Arduino IDE debugger.

Took me a while to figure out how to build the debug version of the libmbed.a. More details about this are in the issue I created
#993

A lot more details about this is in the forum thread:
https://forum.arduino.cc/t/building-debug-libmbed-a/1315845/28

My WIP (more like Play in progress) sketch which includes the camera code is up at:
https://github.com/KurtE/Arduino_GIGA-stuff/tree/main/sketches/GigaCameraDisplay_GFX_OV5640
Warning it uses some of the libraries I have in same github project and others.

I am able to start up the debugger and set breakpoints and the like, and get to the line that tries to call into the HAL layer as seen:
Image

However I can not step into this function, as I am guessing it can not find any source file for it.
That is, the sources I believe in the mbed-os project is contained in the file:
/home/kurte/github/mbed-os/targets/TARGET_STM/TARGET_STM32F7/STM32Cube_FW/STM32F7xx_HAL_Driver/stm32f7xx_hal_dcmi.c
Or when generating the debug version of the libmbed.a a similar path in /tmp

I noticed at the end of the mbed-os-to-arduino run there were some copies that were done, I believe from this:

copy_core_files () {
	echo -n "Copying generic MbedOS headers to core... "

	rsync -zar --exclude="targets/" --exclude="*TEST*/" --include="*/" --include="*.h"    --exclude="*" \
	mbed-os/ "$ARDUINOCOREMBED"/

	rsync -zar --exclude="targets/" --exclude="*TEST*/" --include="*/" --include="mstd_*" --exclude="*" \
	mbed-os/ "$ARDUINOCOREMBED"/

	echo " done."
}

Which makes sense, as the only .c file located under the cores/arduino/mbed directory is: mstd_mutex.cpp

Question is: how should it work?
Should I try to copy the .c files into where the header file is?
/home/kurte/Arduino/hardware/arduino-git/mbed/cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_dcmi.h
Or is it simply not expected to work?

Thanks

Kurt

主要言語
C
スター
411
フォーク
229
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

arduino/ArduinoCore-mbed のほかの issue

arduino/ArduinoCore-mbed の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。