Skip to content

Commit

Permalink
Fix freertos_kernel cmake property, Posix Port (#640)
Browse files Browse the repository at this point in the history
* Fix freertos_kernel cmake property, Posix Port

* Moves the `set_property()` call below the target definition in top level CMakeLists file
* Corrects billion value from `ULL` suffix (not C90 compliant) to `UL` suffix with cast to uint64_t

* Add blank line to CMakeLists.txt
  • Loading branch information
kstribrnAmzn authored Mar 7, 2023
1 parent 7b26ea6 commit 309a18a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@ elseif((FREERTOS_PORT STREQUAL "A_CUSTOM_PORT") AND (NOT TARGET freertos_kernel_
" freertos_kernel)")
endif()

########################################################################
# Requirements
set_property(TARGET freertos_kernel PROPERTY C_STANDARD 90)

########################################################################
# Overall Compile Options
# Note the compile option strategy is to error on everything and then
Expand Down Expand Up @@ -294,3 +290,7 @@ target_link_libraries(freertos_kernel
$<$<TARGET_EXISTS:freertos_config>:freertos_config>
freertos_kernel_port
)

########################################################################
# Requirements
set_property(TARGET freertos_kernel PROPERTY C_STANDARD 90)
2 changes: 1 addition & 1 deletion portable/ThirdParty/GCC/Posix/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ static uint64_t prvGetTimeNs( void )

clock_gettime( CLOCK_MONOTONIC, &t );

return ( uint64_t )t.tv_sec * 1000000000ULL + ( uint64_t )t.tv_nsec;
return ( uint64_t )t.tv_sec * ( uint64_t )1000000000UL + ( uint64_t )t.tv_nsec;
}

static uint64_t prvStartTimeNs;
Expand Down

0 comments on commit 309a18a

Please sign in to comment.