aboutsummaryrefslogtreecommitdiff
path: root/lib/pbdrv/ext/freertos
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pbdrv/ext/freertos')
-rw-r--r--lib/pbdrv/ext/freertos/include.cmake9
-rw-r--r--lib/pbdrv/ext/freertos/pb-mem.c6
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/pbdrv/ext/freertos/include.cmake b/lib/pbdrv/ext/freertos/include.cmake
index d01afe7..e7ab7fd 100644
--- a/lib/pbdrv/ext/freertos/include.cmake
+++ b/lib/pbdrv/ext/freertos/include.cmake
@@ -1,10 +1,9 @@
-target_sources(pbdrv-mod PRIVATE
- "${CMAKE_CURRENT_LIST_DIR}/pb-mem.c"
- "${CMAKE_CURRENT_LIST_DIR}/pb-mod.c"
- )
-target_link_libraries(pbdrv-mod
+target_sources(pbdrv PRIVATE "${CMAKE_CURRENT_LIST_DIR}/pb-mem.c")
+target_link_libraries(pbdrv
freertos_kernel
freertos_kernel_include
freertos_config
)
+target_sources(pbdrv-mod PRIVATE "${CMAKE_CURRENT_LIST_DIR}/pb-mod.c")
+
diff --git a/lib/pbdrv/ext/freertos/pb-mem.c b/lib/pbdrv/ext/freertos/pb-mem.c
index 96c48d1..b18d79f 100644
--- a/lib/pbdrv/ext/freertos/pb-mem.c
+++ b/lib/pbdrv/ext/freertos/pb-mem.c
@@ -3,11 +3,11 @@
#include "../../pb-mem.h"
#include "../../pb-types.h"
-__weak inline void * pb_malloc(size_t sz) {
+inline void * pb_malloc(size_t sz) {
return pvPortMalloc(sz);
}
-__weak inline void pb_free(void * ptr) {
+inline void pb_free(void * ptr) {
vPortFree(ptr);
}
@@ -21,7 +21,7 @@ __weak void * pb_memcpy(void * dest, const void * src, size_t sz) {
return dest;
}
-int pb_memcmp(const void * a, const void * b, size_t sz) {
+__weak int pb_memcmp(const void * a, const void * b, size_t sz) {
for (size_t offset = 0; offset < sz; offset++) {
int diff = *((char*) a + offset) - *((char*) b + offset);
if (diff != 0) return diff;