diff --git a/FreeRTOS/Demo/CORTEX_M3_MPS2_QEMU_GCC/bindings/make_header.sh b/FreeRTOS/Demo/CORTEX_M3_MPS2_QEMU_GCC/bindings/make_header.sh index a96abd92..66b03755 100644 --- a/FreeRTOS/Demo/CORTEX_M3_MPS2_QEMU_GCC/bindings/make_header.sh +++ b/FreeRTOS/Demo/CORTEX_M3_MPS2_QEMU_GCC/bindings/make_header.sh @@ -1,17 +1,20 @@ #!/bin/sh set -e -rm -f bindings.i bindings.rs _bindings.rs _header.rs +rm -f bindings.i bindings.rs _bindings.rs _header.rs _config.rs arm-none-eabi-gcc -E bindgen.h \ -I ../../../Source/include -I ../../../Source/portable/GCC/ARM_CM3 -I .. > bindings.i + bindgen bindings.i --ignore-functions --no-layout-tests \ - --allowlist-type "TaskStatus_t|List_t|QueueHandle_t|Queue_t|TCB_t" \ + --allowlist-type "TaskStatus_t|List_t|QueueRegistryItem_t|QueueHandle_t|Queue_t|TCB_t" \ -- --target=armv7a-none-eabi > _bindings.rs +bindgen ../FreeRTOSConfig.h --ignore-functions --no-layout-tests > _config.rs + while IFS= read -r line; do echo pub type $line = "::std::os::raw::c_uint;" | sed -f transform.sed done <<< "$(grep -oE "\*mut [A-Z:_a-z0-9]*|\*const [A-Z:a-z_]*char" _bindings.rs | sort | uniq)" > _header.rs -cat header.rs _header.rs _bindings.rs | sed -f transform.sed > bindings.rs +cat header.rs _header.rs _config.rs _bindings.rs | sed -f transform.sed > bindings.rs -rm -f bindings.i _bindings.rs _header.rs \ No newline at end of file +rm -f bindings.i _bindings.rs _header.rs _config.rs \ No newline at end of file