export CC="/usr/bin/arm-none-eabi-gcc"
export CXX="/usr/bin/arm-none-eabi-g++"
export AS="/usr/bin/arm-none-eabi-as"
export LD="/usr/bin/arm-none-eabi-ld"
export AR="/usr/bin/arm-none-eabi-ar"
export NM="/usr/bin/arm-none-eabi-nm"
export STRIP="/usr/bin/arm-none-eabi-strip"
export RANLIB="/usr/bin/arm-none-eabi-ranlib"
export CFLAGS="--specs=nosys.specs -O2 -mcpu=cortex-m0plus -mthumb -ffreestanding -flto -fno-builtin -nostdlib -Wstrict-prototypes "
export CXXFLAGS="--specs=nosys.specs -O2 -mcpu=cortex-m0plus -mthumb -ffreestanding -flto -fno-builtin -nostdlib -Wstrict-prototypes"
export LDFLAGS="-flto -ffreestanding -nostdlib"
#---------------------------------------------------------
export CC="/usr/bin/arm-none-eabi-gcc"
export CXX="/usr/bin/arm-none-eabi-g++"
export AS="/usr/bin/arm-none-eabi-as"
export LD="/usr/bin/arm-none-eabi-ld"
export AR="/usr/bin/arm-none-eabi-ar"
export NM="/usr/bin/arm-none-eabi-nm"
export STRIP="/usr/bin/arm-none-eabi-strip"
export RANLIB="/usr/bin/arm-none-eabi-ranlib"
export CFLAGS="--specs=rdimon.specs -lgcc -lc -lm -lrdimon -mcpu=cortex-m0plus -mthumb -O2"
export CXXFLAGS="--specs=rdimon.specs -lgcc -lc -lm -lrdimon -mcpu=cortex-m0plus -mthumb -O2"
#---------------------------------------------------------
export CC="/usr/bin/arm-none-eabi-gcc"
export CXX="/usr/bin/arm-none-eabi-g++"
export AS="/usr/bin/arm-none-eabi-as"
export LD="/usr/bin/arm-none-eabi-ld"
export AR="/usr/bin/arm-none-eabi-ar"
export NM="/usr/bin/arm-none-eabi-nm"
export STRIP="/usr/bin/arm-none-eabi-strip"
export RANLIB="/usr/bin/arm-none-eabi-ranlib"
export CFLAGS="--specs=nosys.specs -lgcc -lc -lm -lrdimon -mcpu=cortex-m0plus -mthumb -O2"
export CXXFLAGS="--specs=nosys.specs -lgcc -lc -lm -lrdimon -mcpu=cortex-m0plus -mthumb -O2"
export LDFLAGS=""
# -nostartfiles -fno-builtin -nostdinc -Wstrict-prototypes
git clone [email protected]:Mbed-TLS/mbedtls.git
# Running the configuration script
python3 scripts/config.py -w include/mbedtls/mbedtls_config.h crypto_baremetal
# To make all static
make -j4 LIBS="-all-static"
make install PREFIX=$HOME/cross_compile/mbedtls_target
cmake -Bbuild -H. \
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY\
-DCMAKE_BUILD_TYPE=none \
-DCMAKE_INSTALL_PREFIX=$HOME/TFG/lock/lib/encryptions \
-DCMAKE_TOOLCHAIN_FILE=$HOME/TFG/lock/toolchain-arm-none-eabi.cmake \
-G "Unix Makefiles"
cmake -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1 \
-DCMAKE_BUILD_TYPE=Release -DUSE_SHARED_MBEDTLS_LIBRARY=OFF \
-DUSE_STATIC_MBEDTLS_LIBRARY=ON -DENABLE_ZLIB_SUPPORT=OFF \
-DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_TOOLCHAIN_FILE=../toolchain-arm-none-eabi.cmake ../mbedtls-3.2.1
Cloning Mbed-TLS 2.28
git clone [email protected]:Mbed-TLS/mbedtls.git -b mbedtls-2.28
wget https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh