2013-07-24 01:03 AM
I am Using STM32F3 discovery .I have load program successfully on to STM32F3 but when I am trying to Debug it with GDB it having problem that i have mentioned Below.
manish@manish-Inspiron-1501:~/my-wow-adc$ arm-none-eabi-gdb obj/STM32F3_Test.elf GNU gdb (Sourcery CodeBench Lite 2013.05-23) 7.4.50.20120716-cvs Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type ''show copying'' and ''show warranty'' for details. This GDB was configured as ''--host=i686-pc-linux-gnu --target=arm-none-eabi''. For bug reporting instructions, please see: <https://sourcery.mentor.com/GNUToolchain/>... Reading symbols from /home/manish/my-wow-adc/obj/STM32F4_Test.elf...done. (gdb) target remote localhost:4242 Remote debugging using localhost:4242 0x08007974 in Reset_Handler () (gdb) load Loading section .isr_vector, size 0x188 lma 0x8000000 Loading section .text, size 0x9790 lma 0x8000188 Loading section .ARM, size 0x8 lma 0x8009918 Loading section .init_array, size 0x4 lma 0x8009920 Loading section .fini_array, size 0x4 lma 0x8009924 Loading section .data, size 0x5b4 lma 0x8009928 Start address 0x8007974, load size 40668 Transfer rate: 6 KB/sec, 5083 bytes/write. (gdb) monitor reset (gdb) b main Breakpoint 1 at 0x8007522: file src/main.c, line 39. (gdb) c Continuing. Note: automatically using hardware breakpoints for read-only addresses. after that programs halts so I am not getting why it is so.I have check all condition.but I am not getting whyNote: automatically using hardware breakpoints for read-only addresses.
line coming and why it halts.Plz guide me .I am also posting background process of st-util
send: OK recv: p19 send: 00000001 recv: qTStatus query: TStatus; send: recv: qTStatus query: TStatus; send: recv: qTStatus query: TStatus; send: recv: qTStatus query: TStatus; send: recv: qRcmd,7265736574 query: Rcmd,7265736574; KARL - should read back as 0x03, not 60 02 00 00 init watchpoints Rcmd: reset send: OK recv: m8007974,4 send: 002100f0 recv: m8007522,2 send: 4ff0 recv: m8007522,2 send: 4ff0 recv: m8007522,2 send: 4ff0 recv: qTStatus query: TStatus; send: recv: qTStatus query: TStatus; send: recv: Z1,8007522,2 setting hw break 0 at 08007520 (2) reg 88007521 send: OK recv: vCont? send: recv: Hc0 send: recv: c2013-07-24 01:44 AM
What is in main.c line 39? Where do you see program is halted?
2013-07-24 01:52 AM
But I feel that it may not problem of any source file.beacause I have check with LED blink code also but same problem so.
main.c /*! header files */ #include ''stm32f4xx.h'' #include ''FreeRTOS.h'' #include ''timers.h'' #include <math.h> #include <stdio.h> #include <stdlib.h> typedef void * xTimerHandle; /*! Timer Expirecounter */ long lExpireCounters = 0 ; /*! Handle to xtimerAPIs */ xTimerHandle xTimer; /*! * callback function * count the number of times the * associated timer expires, and stop the timer once the timer has expired * 10 times. */ void vTimerCallback( xTimerHandle pxTimer ) { const long MaxExpiryCount = 10 ; /*! Maximum Expiry ount */ /*! Increment the number of times that Timer has expired. */ lExpireCounters += 1; /*! If the timer has expired 10 times then stop it from running.*/ if( lExpireCounters == MaxExpiryCount ) { xTimerStop( pxTimer, 0 ); /*! Timer Stop if Condition satisfied */ } } int main( void ) {long x=1;
// line no 39
/*! Create timer */ xTimer = xTimerCreate( ''Timer'' , /*! Name for timer */ (100) , /*! The timer period in ticks.(1 ticks = 1ms) */ pdTRUE , /*! The timers will auto-reload themselves when they expire. */ (void *) x , /*! timer a unique id */ vTimerCallback /*! callback fuction ,called when Timer get expires */ ); if( xTimer == NULL ) { printf(''Timer not created''); /*! The timer was not created. */ } else { /*! Start the timer. */ if( xTimerStart ( xTimer, 0 ) != pdPASS ) { /* The timer could not be set into the Active state.*/ } else { printf(''Timer start sucessfully\n''); } } /*! Task scheduling started */ vTaskStartScheduler(); while (1); }2013-07-24 02:35 AM
Hello Manish,
Are you using F3 or F4? I see in the code:#include ''stm32f4xx.h''
Another question: do you have same issue if FreeRTOS isn't used?
-Mayla-
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2013-07-24 02:57 AM
actually I had tested same code with f4 its worked fine but when i tried same with f3 it having problem.I have tried without freeRTOS till same issue.
2013-07-24 04:21 AM
actually I had tested same code with f4 its worked fine but when i tried same with f3 it having problem. <---
Now more of a question is why you thought that f4 code will work fine on f3 without even changing a header file?
2013-07-24 04:28 AM
Yes, and if you have system_stm32f4xx.c, and call SystemInit() it's never going to leave, and consequently not get to main()
Review carefully how you have ported the project to the different processor and board.2013-07-30 12:29 AM
Thanks a lot Now everything work fine.Its only because of your replies to my post.Thanks again.