Skip to content

Commit

Permalink
Fix compile issue by switching *to_us_since_boot* data type
Browse files Browse the repository at this point in the history
  • Loading branch information
protik09 committed Apr 8, 2024
1 parent 950ecfe commit e87f485
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ cmake_minimum_required(VERSION 3.6)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)


# initalize pico_sdk from installed location
# (note this can come from environment, CMake cache etc)
set(PICO_SDK_PATH $ENV{PICO_SDK_PATH})
# set(PICO_SDK_PATH "/mnt/c/Users/proti/Desktop/Personal_Code/Embedded_Projects/pico/pico-sdk")

# Pull in Raspberry Pi Pico SDK (must be before project)
include(pico_sdk_import.cmake)
include_directories(${PROJECT_SOURCE_DIR}/src/)

project(Coremark-RP2040 C CXX ASM)

# Initialise the Raspberry Pi Pico SDK
Expand Down
4 changes: 2 additions & 2 deletions src/core_portme.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ volatile ee_s32 seed5_volatile = 0;
CORETIMETYPE barebones_clock()
{
#ifndef NDEBUG
return (CORETIMETYPE)get_absolute_time();
return (CORETIMETYPE)to_us_since_boot(get_absolute_time());
#else
CORETIMETYPE t = get_absolute_time()._private_us_since_boot;
CORETIMETYPE t = to_us_since_boot(get_absolute_time());
return t;
#endif
}
Expand Down

0 comments on commit e87f485

Please sign in to comment.