Forum : ARM
Original Post
Post Information | Post |
---|---|
August 6, 2007 - 9:12am
|
Hi, |
Forum : ARM
Post Information | Post |
---|---|
August 6, 2007 - 9:12am
|
Hi, |
Hi Franco,
It seems that your board is running the startup code before function main(). Try pressing "OK" ("YES"?) buttom some times until you reach main. If im not wrong if you press "CANCEL" ("NO"?) button RIDE opens a "Dissasembly code" window pointing you to the line of assembly code you are going to run (from the startup code).
Hope it helps you
Jorge.
I tried to press a lot of time the YES button without any solution!.
I give you some other details:
. I am using the 91x_init.s file present in the RIDE project example of the ST standard library
. Some times it works, other time it doesn't work
Where is the problem?
Franco.
I dont know if i understand you: you press the button a lot of time or a lot of times :-S.
What do you mean with sometimes it works?
Hi Franco,
can you end us a sample project that does not work in your case ? my email address is .
Best regards,
Lionel
hi Franco,
I looked at your project, and I made one modification that seems to correct your problem: I commented out the line
To all users of the STRx library from ST: please NEVER use the DEBUG preprocessor definition, it does not work with GCC, and is useless with that compiler. It is used for other compilers.
Most of the case, you will see in 71x_conf.h, 73x_conf.h, 75x_conf.h or 91x_conf.h, the following lines :
I think this is self-explanatory, and if you use this code snippet, the code will be more portable between compilers (leaving #define DEBUG uncommented will have no effect for GCC).
If you can't see this code snippet, please try to use it instead of corresponding lines below:
Best regards
Lionel
Hi Lionel,
with your suggest the little project I sent to you works fine and i am able to debug, but with a more complex project containing all the ST standard library modules and the USB library moules compiled and linked in the project i am not able to start the debug; I always receive the message box of the topic.
Any other suggestion or idea to solve the problem?
Best regards.
Franco Melandri
Hi Franco,
I think that you will generally experience problems when debugging an USB application. I have these kind of problems too, and debugging is difficult because the USB needs to be synchronized with the PC, and the usb driver on the PC is not paused when you place a breakpoint in your code ! synchro is lost, and very often, infinite or very long loops are created (because your device waits for a signal that will never come or that is already given by the PC, too early for the device).
I am not a specialist in USB, but I know that you will have to take care when debugging an USB app. Most of the time, it works when the app starts, and the USB perihperal is not initialized yet. Then, well... I am open to any suggestions, but for now I don't use debug, rather real-time reporting (leds blinking or serial port report).
Good luck ;)
Lionel
Ok, I Know that is difficult to debug an USB application, but first of all i need to start up the application... for me, now, is not possible to launch it because the application never reach the main entry point and go always "out of code".
Why?
Where is the problem, is a linker or a compilation problem ?
Franco
Do you use a custom startup script? If yes, can you send me the source code? I just downloaded the USB firmware development kit from ST website, created a RIDE app for STR9 and everything work fine. I can debug (at least the program starts and debug points to the first instruction of main()). I used the standard startup script and libraries that we provide internally with RIDE.
Lionel
Hi,
for the moment i have solved the problem. I have changed the REVA with another one (new) and all works fine.
Interesting!!
Franco.