-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MbedTLS tests fails to cross compile for arm cortex m33 #4530
Comments
Fix a pointer mismatch when int32_t is not int, for example on Cortex-M where in32_t is long int. Fix Mbed-TLS#4530 Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Fix a pointer mismatch when int32_t is not int, for example on Cortex-M where in32_t is long int. Fix Mbed-TLS#4530 Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Fix a pointer mismatch when int32_t is not int, for example on Cortex-M where in32_t is long int. Fix Mbed-TLS#4530 Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
I've made a PR for a fix, which should get you further: after this, I expect a link failure. How to resolve the link failure depends on the platform you're building for. The test suites need several standard library functions, they don't run on bare metal. |
@maulik-arm Please confirm that #4532 fixes this issue. |
Hi @gilles-peskine-arm , @ronald-cron-arm ,sorry for delayed reply. Yes, I confirm the patch does fixes the compiler warning. Thank you |
@maulik-arm thanks for the confirmation. Good to go then. |
Description
Bug
OS
Host : Linux
mbed TLS build:
Version: 2.26.0
OS version: 18.04
Configuration: please attach config.h file where possible
Added ns_mbedtls_config.h file which is passed for default configuration.
ns_mbedtls_config.h.gz
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): arm-none-eabi-gcc (GNU Arm Embedded Toolchain 9-2020-q2-update) 9.3.1 20200408 (release)
Additional environment information:
Cross-compiling for arm mps2 an521
Expected behavior
While trying to cross-compile mbedtls for embedded mps2 an521 target on host Linux Ubuntu 18.04 machine, all test suites should compile at least.
Actual behavior
Compile error as mentioned below:
[ 44%] Building C object app/mbedtls226/tests/CMakeFiles/test_suite_ssl.dir/test_suite_ssl.o
arm-none-eabi-gcc -D_POSIX_C_SOURCE=200809L -I/mbedtls226/tests/include -I/mbedtls226/tests/../library -I/mbedtls226/include -mcpu=cortex-m33+nodsp -Wall -Wextra -Wwrite-strings -Wformat=2 -Wno-format-nonliteral -Wvla -Wlogical-op -Wshadow -Wformat-overflow=2 -Wformat-truncation=2 -Wno-unused-function -O2 --specs=nano.specs -Wall -Wno-format -Wno-return-type -Wno-unused-but-set-variable -c -fdata-sections -ffunction-sections -fno-builtin -fshort-enums -funsigned-char -mthumb -nostdlib -std=c99 -msoft-float -o CMakeFiles/test_suite_ssl.dir/test_suite_ssl.o -c /home/maupat01/workspace/ns-tls/3931/tf-m/build/app/mbedtls226/tests/test_suite_ssl.c
suites/host_test.function: In function 'convert_params':
suites/host_test.function:299:43: warning: passing argument 2 of 'get_expression' from incompatible pointer type [-Wincompatible-pointer-types]
299 | if ( get_expression ( exp_id, int_params_store ) == 0 )
| ^~~~~~~~~~~~~~~~
| |
| int *
suites/main_test.function:80:47: note: expected 'int32_t *' {aka 'long int *'} but argument is of type 'int *'
80 | int get_expression( int32_t exp_id, int32_t * out_value )
The text was updated successfully, but these errors were encountered: