Forum Replies Created
-
AuthorPosts
-
November 10, 2022 at 12:18 in reply to: How to use supplied .ioc file when importing CubeMx project? #33425GastParticipant
I do have a complete “STM32CubeMx project” containing all the source files and in addition an ioc file that was edited according to the target type, the ports, the clocks, etc.
When I try to import the project into Visualgdb, CubeMX is beeing opened requiring to produce a new ioc file which is very difficult to make it the same as the ioc file already existing, since one has to go through a lot of settings options..
Why is it not possible to use the fully prepared ioc file from the project folder to be imported?
Attachments:
You must be logged in to view attached files.GastParticipantI am trying to use DAC2Plate with VisualGDB. The example codes are written in Python2.7 and don’t work with Bulleseye.
Is it possible to uses VisualGDB with Buster?
August 16, 2021 at 11:11 in reply to: How to change the hardware register xml file in Arduino project? #31148GastParticipantThat’s easy.
Thank you.
GastParticipantFor me, that solved the ID-problem with cloned Blue Pills labelled as stm32f103CBT6.
You might need administrative permission to replace that file.
Furthermore, after an update of openOCD the changed file will be replaced.
Therefore, I keep the changed cfg file in a different folder.
GastParticipantYou must edit the stm32f1x.cfg file to add the line
set CPUTAPID 0
before the first if.
Look for the file in the Debug settings, Debugged device ….
GastParticipantSorry, the nightmare had not ended…
After restarting Visualstudio the intellisense errors popped up again. I tried to remember how I fixed it previously, but I had no success anymore.
The solution then was to painfully reorder the function definitions so that each of them was located on top of a corresponding call, i.e. putting the functions behind the definitions in the “correct” sequential calling order.
Now it seems to work even after restarting Visualstudio….
Can anyone tell me why intellisense under certain (unknown to me) circumstances does not recognize function calls when the function is declared behind the call? Arduino does not require that.
GastParticipantSolved:
The nightmare has ended after several days of trials (and hopefully persistent):
I changed Intellisense Settings to “Clang-format (advanced)” and the functions etc. were recognized correctly.
GastParticipantNo, it works only for the small blink sketch.
For my large project reloading the sln file does not help. On all functions errors ( “The selected location does not refer to a C/C++ entity”).
Many more errors like undeclared identifiers, though the program will run correctly.
GastParticipantUpdate:
I found out by chance that after creating the VisualGDB project from an Arduino .ino file the error always shows up.
However, when I open the vcxproj file again it is ok.
This is quite confusing since I was used to start the project usually from the Arduino file instead from the vcxproj file that drives me into Visualmicro which I have also installed. Visualmicro has to be disabled to run the project in VisualGDB by loading the vcxproj file.
GastParticipantProblem came back. Example:
This shows the error ” Clang Intellisense “use of undeclared identifier”” when calling test().
void setup() { pinMode(LED_BUILTIN, OUTPUT); } void loop() {test(); digitalWrite(LED_BUILTIN, HIGH); delay(1000); digitalWrite(LED_BUILTIN, LOW); delay(1000); } void test() { int x = 9; }
When the function test() is moved above loop() the error is not shown.
Do functions need to be put in front of loop()?
GastParticipantAfter restarting this was fixed.
GastParticipantSolved. I added a relocatable Arduino location and deleted all the other directories.
Afterwards the empty fields were populated by some magic and the error was gone.
GastParticipantStrange experience:
After a lot of fiddling around with VsStudio and also Vmicro, no sketch could be run anymore with VsGDB.
Even new sketches generated by the “New Arduino VsGDB” wizard worked. When running there were different kinds of errors like “could not connect to GDB server or “Could not read memory” or similar.
However, by clicking here and there I found that by right clicking on the “Generic STM32…” tab, “Remove from Project” a message appeared that header files were removed.
Afterwards the sketch could be debugged as normal.
Is there any suggestion what goes wrong when creating the new project?
- This reply was modified 4 years, 1 month ago by Gast.
Attachments:
You must be logged in to view attached files.GastParticipantI managed to debug a project created with help of the wizard and was able to watch the port registers after some work to find the definitions!
No wizard to insert the definitions automatically?
Is there a way to watch the output from a print statement? (SWO?)
-
AuthorPosts