Skip to content

Commit

Permalink
Fix bspconfig.h defines
Browse files Browse the repository at this point in the history
  • Loading branch information
kimushu committed Aug 21, 2019
1 parent 4e5fe01 commit fe6b435
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 15 additions & 0 deletions platform/zynq/data/tinythreads.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,21 @@ proc generate {os_handle} {
puts $fd "#define TTHREAD_STRICT_CHECK [bool2int [common::get_property CONFIG.strict_check $os_handle]]"
puts $fd "#define TTHREAD_ENABLE_VFP_SWITCH [bool2int [common::get_property CONFIG.enable_vfp_switch $os_handle]]"
puts $fd "#define TTHREAD_TICKS_PER_SEC ([common::get_property CONFIG.ticks_per_second $os_handle])"
puts $fd ""
if { [common::get_property CONFIG.enable_clock $os_handle] == "true" } {
puts $fd "#define _POSIX_TIMERS /* For clock_gettime,clock_getres in <time.h> */"
puts $fd "#define _POSIX_MONOTONIC_CLOCK /* For CLOCK_MONOTONIC in <time.h> */"
}
puts $fd ""
puts $fd "#ifndef __ASSEMBLER__"
puts $fd "#ifdef __cplusplus"
puts $fd "extern \"C\" {"
puts $fd "#endif"
puts $fd "extern void *tth_get_xscugic_instance(void);"
puts $fd "#ifdef __cplusplus"
puts $fd "} /* extern \"C\" */"
puts $fd "#endif"
puts $fd "#endif /* __ASSEMBLER__ */"
close $fd

}
Expand Down
1 change: 0 additions & 1 deletion platform/zynq/src/priv/tth_arch_armv7a.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <stdint.h>
#if defined(__PS7_CORTEXA9__)
# include <bspconfig.h>
# define _POSIX_MONOTONIC_CLOCK
#else
# error "Unknown platform for ARMv7-A ports."
#endif
Expand Down

0 comments on commit fe6b435

Please sign in to comment.