Skip to content

Commit 8c8006d

Browse files
authored
Fix build backwards-incompatibilities with LIB_XXX defines, and add fix pico_time in host mode (#1232)
* restore original setters of LIB_PICO_ as some external code depends on it * add __get_current_exception to host
1 parent 18b97fc commit 8c8006d

File tree

16 files changed

+19
-17
lines changed

16 files changed

+19
-17
lines changed

src/common/pico_base/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ if (NOT TARGET pico_base_headers)
1010

1111
list(APPEND PICO_SDK_POST_LIST_FILES ${CMAKE_CURRENT_LIST_DIR}/generate_config_header.cmake)
1212
pico_promote_common_scope_vars()
13-
endif()
14-
13+
endif()

src/host/pico_platform/include/pico/platform.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ static inline void __compiler_memory_barrier(void) {
143143

144144
uint get_core_num();
145145

146+
static inline uint __get_current_exception(void) {
147+
return 0;
148+
}
146149
#ifdef __cplusplus
147150
}
148151
#endif

src/host/pico_stdio/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
if (NOT TARGET pico_stdio)
2-
pico_add_library(pico_stdio NOFLAG)
2+
pico_add_library(pico_stdio)
33

44
target_include_directories(pico_stdio_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include)
55

src/rp2_common/pico_cyw43_arch/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
if (PICO_CYW43_SUPPORTED) # set by BOARD=pico-w
22
if (TARGET cyw43_driver_picow)
3-
pico_add_library(pico_cyw43_arch NOFLAG)
3+
pico_add_library(pico_cyw43_arch)
44
target_sources(pico_cyw43_arch INTERFACE
55
${CMAKE_CURRENT_LIST_DIR}/cyw43_arch.c
66
${CMAKE_CURRENT_LIST_DIR}/cyw43_arch_poll.c

src/rp2_common/pico_divider/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ if (NOT TARGET pico_divider)
33
pico_add_impl_library(pico_divider)
44

55
# no custom implementation; falls thru to compiler
6-
add_library(pico_divider_compiler INTERFACE)
6+
pico_add_library(pico_divider_compiler)
77

88
# add alias "default" which is just hardware.
99
add_library(pico_divider_default INTERFACE)
@@ -25,7 +25,7 @@ if (NOT TARGET pico_divider)
2525
hardware_regs
2626
)
2727

28-
add_library(pico_divider_hardware INTERFACE)
28+
pico_add_library(pico_divider_hardware)
2929

3030
target_link_libraries(pico_divider_hardware INTERFACE pico_divider_hardware_explicit)
3131

src/rp2_common/pico_fix/rp2040_usb_device_enumeration/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pico_add_library(pico_fix_rp2040_usb_device_enumeration NOFLAG)
1+
pico_add_library(pico_fix_rp2040_usb_device_enumeration)
22

33
target_sources(pico_fix_rp2040_usb_device_enumeration INTERFACE
44
${CMAKE_CURRENT_LIST_DIR}/rp2040_usb_device_enumeration.c

src/rp2_common/pico_float/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
if (NOT TARGET pico_float)
22
# library to be depended on - we make this depend on particular implementations using per target generator expressions
3-
pico_add_library(pico_float NOFLAG)
3+
pico_add_library(pico_float)
44

55
# no custom implementation; falls thru to compiler
66
pico_add_library(pico_float_compiler)

src/rp2_common/pico_int64_ops/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
if (NOT TARGET pico_int64_ops)
22

33
#shims for ROM functions for -lgcc functions (listed below)
4-
pico_add_library(pico_int64_ops NOFLAG)
4+
pico_add_library(pico_int64_ops)
55

66
# no custom implementation; falls thru to compiler
77
pico_add_library(pico_int64_ops_compiler)

src/rp2_common/pico_malloc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
if (NOT TARGET pico_malloc)
22
#shims for ROM functions for -lgcc functions (listed below)
3-
pico_add_library(pico_malloc NOFLAG)
3+
pico_add_library(pico_malloc)
44

55
target_sources(pico_malloc INTERFACE
66
${CMAKE_CURRENT_LIST_DIR}/pico_malloc.c

src/rp2_common/pico_mem_ops/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ if (NOT TARGET pico_mem_ops)
33
pico_add_library(pico_mem_ops)
44

55
# no custom implementation; falls thru to compiler
6-
add_library(pico_mem_ops_compiler INTERFACE)
6+
pico_add_library(pico_mem_ops_compiler)
77

88
# add alias "default" which is just pico.
99
add_library(pico_mem_ops_default INTERFACE)

0 commit comments

Comments
 (0)