Make examples friendlier for non GCC compilers and fixed slave_mem_i2c.c to compile on boards without I2C pins (#336)
This commit is contained in:
@@ -79,7 +79,9 @@ int main() {
|
||||
printf("Hit rate so far: %.1f%%\n", hit * 100.f / access);
|
||||
|
||||
printf("Calculate 25th fibonacci number: %d\n", recursive_fibonacci(25));
|
||||
printf("New hit rate after printf and fibonacci: %.1f%%\n", xip_ctrl_hw->ctr_hit * 100.f / xip_ctrl_hw->ctr_acc);
|
||||
uint32_t ctr_hit = xip_ctrl_hw->ctr_hit;
|
||||
uint32_t ctr_acc = xip_ctrl_hw->ctr_acc;
|
||||
printf("New hit rate after printf and fibonacci: %.1f%%\n", ctr_hit * 100.f / ctr_acc);
|
||||
|
||||
check_hit_miss_invalidate();
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//
|
||||
// To the CMakeLists.txt app for this file. Just to be sure, we can check the
|
||||
// define:
|
||||
#if !PICO_NO_FLASH
|
||||
#if !PICO_NO_FLASH && !PICO_COPY_TO_RAM
|
||||
#error "This example must be built to run from SRAM!"
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user