I am a electronic developer. Now i have a problem. I am using uvision 5 and ST link for SW development, debugging and programming.
the program can be successfully compiled, and to Flash in target programming. But the program does not run at all, either after programming or power off and on.
But the program can be run in debugging session without any problems, all desired functionalities are realized. I have no idea what the problem is.
Could you please help me?
thank you very much in advance
by the way I am using STM32F765, and STlink, The problem is still there. the program is running well with debugger in debug session, but it does not run at all after power off and on. Ich have checked the heap size, even with big size, it does not help. and i have checked the boot0, and it is connected to ground. the address of target is set: IROM1 start: 0x8000000 size: 0x100000, IRAM1: 0x20020000, 0x60000. which correspond to the setting in Linker and Ultilities in the option for target. I seems the program does not even reach main(), could some one please kindly help?
Is the resetvector set correctly?
thank you very much again for your advice, maybe i can add more information here. I have used the uvision5 to generate the project than i used the STM32CubeMX to configure the pins, timers and so on, I dont know if this could bring some conflict somehow, however the project can be compiled and downloaded without any error, and runs well with debugger. But I have tried my old project, which is made firstly by configuring the pins in CubeMX and then generating projects. in this way, it runs well when power off and on without debugger. the setting of the vector is same in this two circumstances.
Start the "no working" software, then "attach" with the debugger to check where it is stuck.
Or start debugging w/o downloading (means the same way as if it would w/o debugger).
the problem is when I start debugging, it shows Erase done, Programming done, Verify OK, Application running..., Flash Load finished, it seems the software is downloaded, I have set no Download to Flash in options for target, but does not help. or when I start the software with power off on, then attach the debugger, then start debug session, it shows the same process.
Then you need to solve this problem first => Ask Keil and/or STM.
Thank you for your reply again. I have solved the problem. there is a file call user_stdio.c, which I dont know when I have brought to the project. inside, there is function stdout_putchar(), which has conflict with the same function in retarget.c. I have removed the user_stdio.c, then the program runs well in target. But I still dont understand why the issue can not be found in compiling and debugging.
One of these likely uses semi hosting and thus will only work with the debugger.
View all questions in Cortex-M / M-Profile forum