hi am trying to profile my code however when i enable "show time" and the "Performance Analyzer " i remarked that the keil didn't run the main.c since there is no time displayed neither on the left of the sources console nor on performance analyser console so i wonder is there some conditions related to the source file since my friend who has an other code managed to get the execution time of her main.c
by the way my code define some struct to calculate the energy, ETX ,position ..of nodes in a wireless Sensors Networks thank you
Do you have a ULINK or ULINKPro, and is it connected? The Pro will need a high quality USB cable, I've seen connection issues without one.
well I don't have a ULINKPro, I just got carried away and tried to follow instructions before going back to the tutorial and do my research. I can't do a hardware debugging so i will limit myself with the simulator. however am wondering if the results displayed by the performance analyser,using the simulator, are accurate or at least a bit close to those performed by the Cortex m-0 (am talking about my friend since i didn't get any result)
The results should be reasonable - the main difference would probably be unexpected pipe stalls depending on number of cycles required to fetch new code or read/write to RAM. Keil will not know the exact behavior of the data paths of your specific chip.
thank you Mr Per Westermark i was worried since my PC' processor has a CISC architecture and as you know the Cortex m-0 is a RISC one So i was afraid that the profiling was done by my PC'processor (as in code blocks) and not by simulating the behavior of the Cortex m-0 so let's return to my original problem why the keil doesn't execute the main.c it only displays the execution time of my cm0dsasm.s :
Stack_Size EQU 0x00000400 ; 256KB of STACK AREA STACK, NOINIT, READWRITE, ALIGN=4 Stack_Mem SPACE Stack_Size __initial_sp Heap_Size EQU 0x00000400 ; 1MB of HEAP AREA HEAP, NOINIT, READWRITE, ALIGN=4 __heap_base Heap_Mem SPACE Heap_Size __heap_limit ; Vector Table Mapped to Address 0 at Reset PRESERVE8 THUMB AREA RESET, DATA, READONLY EXPORT __Vectors __Vectors DCD 0x0000FFFC DCD Reset_Handler DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 ; External Interrupts DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 DCD 0 AREA |.text|, CODE, READONLY ;Reset Handler Reset_Handler PROC GLOBAL Reset_Handler ENTRY IMPORT __main LDR R0, =__main BX R0 ;Branch to __main ENDP ALIGN 4 ; Align to a word boundary ; User Initial Stack & Heap IF :DEF:__MICROLIB EXPORT __initial_sp EXPORT __heap_base EXPORT __heap_limit ELSE IMPORT __use_two_region_memory EXPORT __user_initial_stackheap __user_initial_stackheap LDR R0, = Heap_Mem LDR R1, =(Stack_Mem + Stack_Size) LDR R2, = (Heap_Mem + Heap_Size) LDR R3, = Stack_Mem BX LR ALIGN ENDIF END
however my friend use the same assembly file and the keil execute her c code ,which is different than mine (i define some struct but she doesn't) ,so i was wondering if the prob is within my c codes or something else . thanks for your collaboration