When i run the debug mode hte Call stack + locals doesn't display the "main" file and the debug arrows(green and yellow) are in the "startup_stm32f407xx.s" file and they should be in "main.cpp".
What could be the problem?
https://www.keil.com/support/man/docs/uv4/uv4_dg_debug.htm
Run to main()Executes the instructions until main() is reached and stops execution. When disabled, the application stops at the first instruction. Commands defined in Initialization File are executed regardless of this option.
Run to main() was always enabled.
But i noticed something in the Build Output window:
Note: source file '.\main.cpp' - object file renamed from '.\Objects\main.o' to '.\Objects\main_1.o'.
Does this have to do anything with it?
It might be an indication that you somehow managed to put two sources named "main" into your project. Which is rather unlikely to be what you wanted.
I've noticed that this happens when my main file is of type .cpp, and these are my files in my project, i only see one source file "main.cpp":
and this is where it gets stuck:
This is a semihosting issue. Your program is not reaching main(). Please see also here: https://developer.arm.com/documentation/ka002219/latest.
Regarding the object file renaming, please see here: https://developer.arm.com/documentation/ka004041/latest, under STATUS, how you might be able to resolve this. But the object file renaming does not relate to the semihosting issue.
I used this article: https://developer.arm.com/documentation/ka002219/latest. but don't understand this part:
When i add a "User Code Template" file from the 3 provided into my application folder i get an error...i don't really know what to do here.
In the screenshot, you can see I enabled the Compiler retargeting files in the RTE and tried adding this stdout_USART.c but it's generating errors.
https://drive.google.com/file/d/1WhVqBloi2OLfuVltPtPlw5doHfsMoVUc/view?usp=sharing
This is my project, maybe it would be easier for you when you check the code.
In the article it says "If selecting the variant "User ...". But I understand, you want to use ITM, so select "ITM" for STDOUT as well. Then no user template is required.
As i understood, if i go for one variant i have to use the same one for all, meaning i take "ITM" for STDOUT, STDIN and STDERR?
And yes, this worked, thanks a lot.
Best Regards, Alden