mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Fix timing issues found in "Flash - clock and cache test"
ARMCC seemed to be inlining time_cpu_cycles() but with a different number of clock cycles in the loop, GCC worked fine.pull/4666/head
							parent
							
								
									a39ac60305
								
							
						
					
					
						commit
						92e4a1faf7
					
				| 
						 | 
					@ -53,7 +53,7 @@ static void erase_range(flash_t *flash, uint32_t addr, uint32_t size)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int time_cpu_cycles(uint32_t cycles)
 | 
					__attribute__((noinline)) static int time_cpu_cycles(uint32_t cycles)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    Timer timer;
 | 
					    Timer timer;
 | 
				
			||||||
    timer.start();
 | 
					    timer.start();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue