diff --git a/MBL/project/IAR/Project_MBL.ewd b/MBL/Project/IAR/Project_MBL.ewd similarity index 100% rename from MBL/project/IAR/Project_MBL.ewd rename to MBL/Project/IAR/Project_MBL.ewd diff --git a/MBL/project/IAR/Project_MBL.ewp b/MBL/Project/IAR/Project_MBL.ewp similarity index 100% rename from MBL/project/IAR/Project_MBL.ewp rename to MBL/Project/IAR/Project_MBL.ewp diff --git a/MBL/project/IAR/Project_MBL_NS.ewd b/MBL/Project/IAR/Project_MBL_NS.ewd similarity index 100% rename from MBL/project/IAR/Project_MBL_NS.ewd rename to MBL/Project/IAR/Project_MBL_NS.ewd diff --git a/MBL/project/IAR/Project_MBL_NS.ewp b/MBL/Project/IAR/Project_MBL_NS.ewp similarity index 100% rename from MBL/project/IAR/Project_MBL_NS.ewp rename to MBL/Project/IAR/Project_MBL_NS.ewp diff --git a/MBL/project/IAR/mbl_prebuild.bat b/MBL/Project/IAR/mbl_prebuild.bat similarity index 100% rename from MBL/project/IAR/mbl_prebuild.bat rename to MBL/Project/IAR/mbl_prebuild.bat diff --git a/MBL/project/mbl_afterbuild.bat b/MBL/Project/mbl_afterbuild.bat similarity index 97% rename from MBL/project/mbl_afterbuild.bat rename to MBL/Project/mbl_afterbuild.bat index 93606b1..62d8138 100644 --- a/MBL/project/mbl_afterbuild.bat +++ b/MBL/Project/mbl_afterbuild.bat @@ -10,8 +10,6 @@ set ROOT=%OUTPUT_PATH%\..\..\..\..\.. set SREC_CAT=%ROOT%\scripts\imgtool\srec_cat.exe set OUTPUT_IMAGE_PATH=%ROOT%\scripts\images - - if "%TOOLKIT%" == "KEIL" ( :: Generate txt for debug %TOOLKIT_PATH%\ARM\ARMCC\bin\fromelf.exe --text -c -d --output=%OUTPUT_PATH%\..\%OUTPUT_NAME%.txt %OUTPUT_PATH%\%OUTPUT_NAME%.axf @@ -36,5 +34,5 @@ IF EXIST %OUTPUT_IMAGE_PATH%\%OUTPUT_NAME%* del %OUTPUT_IMAGE_PATH%\%OUTPUT_NAME copy %OUTPUT_PATH%\..\%OUTPUT_NAME%.bin %OUTPUT_IMAGE_PATH%\ :: Generate Hex file %SREC_CAT% %OUTPUT_IMAGE_PATH%\%OUTPUT_NAME%.bin -Binary -offset 0x0C000000 -o %OUTPUT_IMAGE_PATH%\%OUTPUT_NAME%.hex -Intel - + ::exit diff --git a/MBL/Project/mbl_afterbuild.sh b/MBL/Project/mbl_afterbuild.sh new file mode 100755 index 0000000..462f712 --- /dev/null +++ b/MBL/Project/mbl_afterbuild.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +#set -x +#echo "Args: $@" + +OUTPUT_PATH=$1 +OUTPUT_NAME=$2 +TOOLKIT=$3 +TOOLKIT_PATH=$4 +OUTPUT_PATH=${OUTPUT_PATH%/} + +ROOT=$(realpath ${OUTPUT_PATH}/../../../../..) +SREC_CAT=/usr/bin/srec_cat +OUTPUT_IMAGE_PATH=${ROOT}/scripts/images + +if [ "${TOOLKIT}" == "KEIL" ]; then + # Generate txt for debug + ${TOOLKIT_PATH}/ARM/ARMCC/bin/fromelf.exe --text -c -d --output=${OUTPUT_PATH}/../${OUTPUT_NAME}.txt ${OUTPUT_PATH}/${OUTPUT_NAME}.axf + # Generate binary image + %TOOLKIT_PATH%/ARM/ARMCC/bin/fromelf.exe --bin --8x1 --bincombined --output=${OUTPUT_PATH}/../${OUTPUT_NAME}.bin ${OUTPUT_PATH}/${OUTPUT_NAME}.axf +elif [ "${TOOLKIT}" == "IAR" ]; then + # Generate ASM file + %TOOLKIT_PATH%/bin/ielfdumparm.exe ${OUTPUT_PATH}/${OUTPUT_NAME}.axf --output ${OUTPUT_PATH}/../${OUTPUT_NAME}.asm --code + # Generate binary image + %TOOLKIT_PATH%/bin/ielftool.exe ${OUTPUT_PATH}/${OUTPUT_NAME}.axf --bin ${OUTPUT_PATH}/../${OUTPUT_NAME}.bin +elif [ "${TOOLKIT}" == "GCC" ]; then + arm-none-eabi-objdump -xS ${OUTPUT_PATH}/${OUTPUT_NAME}.axf > ${OUTPUT_PATH}/../${OUTPUT_NAME}.txt + arm-none-eabi-objcopy -Obinary ${OUTPUT_PATH}/${OUTPUT_NAME}.axf ${OUTPUT_PATH}/../${OUTPUT_NAME}.bin +fi + +mkdir -p ${OUTPUT_IMAGE_PATH} +if [ -n "$(ls ${OUTPUT_IMAGE_PATH}/${OUTPUT_NAME}*)" ]; then + rm -rf ${OUTPUT_IMAGE_PATH}/${OUTPUT_NAME}* +fi + +# Copy to output image path +cp ${OUTPUT_PATH}/../${OUTPUT_NAME}.bin ${OUTPUT_IMAGE_PATH} +# Generate Hex file +${SREC_CAT} ${OUTPUT_IMAGE_PATH}/${OUTPUT_NAME}.bin -Binary -offset 0x0C000000 -o ${OUTPUT_IMAGE_PATH}/${OUTPUT_NAME}.hex -Intel + diff --git a/MBL/project/mbl_afterbuild_adv.bat b/MBL/Project/mbl_afterbuild_adv.bat similarity index 100% rename from MBL/project/mbl_afterbuild_adv.bat rename to MBL/Project/mbl_afterbuild_adv.bat diff --git a/MBL/project/mbl_afterbuild_tz.bat b/MBL/Project/mbl_afterbuild_tz.bat similarity index 100% rename from MBL/project/mbl_afterbuild_tz.bat rename to MBL/Project/mbl_afterbuild_tz.bat diff --git a/MBL/project/KEIL/Project_MBL.uvoptx b/MBL/project/KEIL/Project_MBL.uvoptx deleted file mode 100644 index 5768e1f..0000000 --- a/MBL/project/KEIL/Project_MBL.uvoptx +++ /dev/null @@ -1,648 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - Target_AN521 - 0x4 - ARM-ADS - - 12000000 - - 1 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\An521\Listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 0 - - 7 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 20 - - - - - - - - - - .\mbl.ini - BIN\DbgFMv8M.DLL - - - - 0 - DbgFMv8M - -I -S -L"cpu0" -O4102 -C0 -MC".\FVP\MPS2_Cortex-M\FVP_MPS2_Cortex-M33_MDK.exe" -MF".\ARMCM33_TZ_config.txt" -MA - - - 0 - UL2V8M - UL2V8M(-S0 -C0 -P0 -FC1000 -FD20000000 - - - 0 - DLGTARM - (6010=-1,-1,-1,-1,0)(6018=-1,-1,-1,-1,0)(6019=-1,-1,-1,-1,0)(6008=-1,-1,-1,-1,0)(6009=-1,-1,-1,-1,0)(6014=-1,-1,-1,-1,0)(6015=-1,-1,-1,-1,0)(6003=-1,-1,-1,-1,0)(6000=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - DLGUARM - (105=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0) - - - - - - 0 - 1 - uart_buf - - - 1 - 1 - &major - - - - - 1 - 0 - 0x38005F04 - 0 - - - - 0 - - - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - Target_GDM32 - 0x4 - ARM-ADS - - 12000000 - - 1 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\mbl\Listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 7 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 4 - - - - - - - - - - .\mbl.ini - Segger\JL2CM3.dll - - - - 0 - UL2V8M - UL2V8M(-S0 -C0 -P0 -FC1000 -FD20000000 - - - 0 - JL2CM3 - -U59406895 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BE12477) -L00(4) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO0 -FD20000000 -FC8000 -FN0 - - - 0 - DLGUARM - - - - 0 - DLGTARM - (6010=-1,-1,-1,-1,0)(6018=-1,-1,-1,-1,0)(6019=-1,-1,-1,-1,0)(6008=-1,-1,-1,-1,0)(6009=-1,-1,-1,-1,0)(6014=-1,-1,-1,-1,0)(6015=-1,-1,-1,-1,0)(6003=-1,-1,-1,-1,0)(6000=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - - - - 1 - 2 - 0x08001200 - 0 - - - - 0 - - - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - bootloader - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\..\source\mbl.c - mbl.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\..\source\mbl_image_validate.c - mbl_image_validate.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\..\source\mbl_status.c - mbl_status.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\..\source\mbl_target_config.c - mbl_target_config.c - 0 - 0 - - - 1 - 5 - 1 - 0 - 0 - 0 - ..\..\source\mbl_nsc_api.c - mbl_nsc_api.c - 0 - 0 - - - 1 - 6 - 4 - 0 - 0 - 0 - ..\..\..\ROM\project\MDK-ARM\rom_symbol_mbedtls - rom_symbol_mbedtls - 0 - 0 - - - 1 - 7 - 4 - 0 - 0 - 0 - ..\..\..\ROM-EXPORT\symbol\rom_symbol_mbedtls_20200709 - rom_symbol_mbedtls_20200709 - 0 - 0 - - - - - an521 - 0 - 0 - 0 - 0 - - 2 - 8 - 1 - 0 - 0 - 0 - ..\..\platform\msp2-an521\cmsis_core\mbl_system_an521.c - mbl_system_an521.c - 0 - 0 - - - 2 - 9 - 2 - 0 - 0 - 0 - ..\..\platform\msp2-an521\armclang\mbl_startup_an521.s - mbl_startup_an521.s - 0 - 0 - - - - - gdm32 - 0 - 0 - 0 - 0 - - 3 - 10 - 2 - 0 - 0 - 0 - ..\..\platform\gdm32\armclang\mbl_startup_gdm32.s - mbl_startup_gdm32.s - 0 - 0 - - - 3 - 11 - 1 - 0 - 0 - 0 - ..\..\platform\gdm32\cmsis_core\mbl_system_gdm32.c - mbl_system_gdm32.c - 0 - 0 - - - 3 - 12 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_fmc.c - gd32w51x_fmc.c - 0 - 0 - - - 3 - 13 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_gpio.c - gd32w51x_gpio.c - 0 - 0 - - - 3 - 14 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_icache.c - gd32w51x_icache.c - 0 - 0 - - - 3 - 15 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_misc.c - gd32w51x_misc.c - 0 - 0 - - - 3 - 16 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_rcu.c - gd32w51x_rcu.c - 0 - 0 - - - 3 - 17 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_usart.c - gd32w51x_usart.c - 0 - 0 - - - 3 - 18 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_tzpcu.c - gd32w51x_tzpcu.c - 0 - 0 - - - 3 - 19 - 1 - 0 - 0 - 0 - ..\..\platform\gdm32\gd32w51x_it.c - gd32w51x_it.c - 0 - 0 - - - - - ::CMSIS - 0 - 0 - 0 - 1 - - -
diff --git a/MBL/project/KEIL/Project_MBL.uvprojx b/MBL/project/KEIL/Project_MBL.uvprojx deleted file mode 100644 index f0d3525..0000000 --- a/MBL/project/KEIL/Project_MBL.uvprojx +++ /dev/null @@ -1,1156 +0,0 @@ - - - - 2.1 - -
### uVision Project, (C) Keil Software
- - - - Target_AN521 - 0x4 - ARM-ADS - 6090000::V6.9::.\ARMCLANG - 1 - - - ARMCM33_TZ - ARM - ARM.CMSIS.5.8.0 - http://www.keil.com/pack/ - IRAM(0x20000000,0x00020000) IRAM2(0x20200000,0x00020000) IROM(0x00000000,0x00200000) IROM2(0x00200000,0x00200000) CPUTYPE("Cortex-M33") TZ CLOCK(12000000) ESEL ELITTLE - - - UL2V8M(-S0 -C0 -P0 -FD20000000 -FC1000) - 0 - $$Device:ARMCM33_TZ$Device\ARM\ARMCM33\Include\ARMCM33_TZ.h - - - - - - - - - - $$Device:ARMCM33_TZ$Device\ARM\SVD\ARMCM33.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\An521\Objects\ - mbl - 1 - 0 - 1 - 1 - 1 - .\An521\Listings\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 1 - 0 - mbl_afterbuild.bat An521 - - 0 - 0 - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - - - - - SARMV8M.DLL - -MPU - TCM.DLL - -pCM33 - - - - 1 - 0 - 0 - 0 - 16 - - - - - 1 - 0 - 0 - 1 - 1 - 4098 - - 1 - BIN\UL2V8M.DLL - - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M33" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 0 - 1 - 1 - 8 - 1 - 1 - 0 - 1 - 4 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x0 - 0x200000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x200000 - - - 1 - 0x200000 - 0x200000 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x20200000 - 0x20000 - - - - - - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 3 - 0 - 0 - 0 - 0 - 0 - 3 - 3 - 1 - 1 - 0 - 0 - 0 - - - PLATFORM_MSP_AN521 - - ..\..\source;..\..\platform;..\..\..\ROM\source;..\..\..\ROM\platform;..\..\..\ROM\platform\cmsis;..\..\..\ROM\platform\msp2-an521\cmsis_core;..\..\..\ROM\platform\msp2-an521\retarget;..\..\..\config;..\..\..\ROM\mbedtls-2.17.0\include - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x00000000 - 0x20000000 - - ..\..\platform\msp2-an521\armclang\mbl_an521.sct - - - --predefine="-DPLATFORM_MSP_AN521" --import-cmse-lib-out=".\An521\Objects\mbl_CMSE_Lib.o" - - - - - - - - bootloader - - - mbl.c - 1 - ..\..\source\mbl.c - - - mbl_image_validate.c - 1 - ..\..\source\mbl_image_validate.c - - - mbl_status.c - 1 - ..\..\source\mbl_status.c - - - mbl_target_config.c - 1 - ..\..\source\mbl_target_config.c - - - mbl_nsc_api.c - 1 - ..\..\source\mbl_nsc_api.c - - - rom_symbol_mbedtls - 4 - ..\..\..\ROM\project\MDK-ARM\rom_symbol_mbedtls - - - rom_symbol_mbedtls_20200709 - 4 - ..\..\..\ROM-EXPORT\symbol\rom_symbol_mbedtls_20200709 - - - - - an521 - - - mbl_system_an521.c - 1 - ..\..\platform\msp2-an521\cmsis_core\mbl_system_an521.c - - - mbl_startup_an521.s - 2 - ..\..\platform\msp2-an521\armclang\mbl_startup_an521.s - - - - - gdm32 - - - 0 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - 1 - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 0 - 0 - 2 - 2 - 2 - 2 - 2 - - - - - - - - - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - - - - - - - - - - - - mbl_startup_gdm32.s - 2 - ..\..\platform\gdm32\armclang\mbl_startup_gdm32.s - - - mbl_system_gdm32.c - 1 - ..\..\platform\gdm32\cmsis_core\mbl_system_gdm32.c - - - gd32w51x_fmc.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_fmc.c - - - gd32w51x_gpio.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_gpio.c - - - gd32w51x_icache.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_icache.c - - - gd32w51x_misc.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_misc.c - - - gd32w51x_rcu.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_rcu.c - - - gd32w51x_usart.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_usart.c - - - gd32w51x_tzpcu.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_tzpcu.c - - - gd32w51x_it.c - 1 - ..\..\platform\gdm32\gd32w51x_it.c - - - - - ::CMSIS - - - - - Target_GDM32 - 0x4 - ARM-ADS - 6090000::V6.9::.\ARMCLANG - 1 - - - ARMCM33_DSP_FP_TZ - ARM - ARM.CMSIS.5.8.0 - http://www.keil.com/pack/ - IRAM(0x20000000,0x00020000) IRAM2(0x20200000,0x00020000) IROM(0x00000000,0x00200000) IROM2(0x00200000,0x00200000) CPUTYPE("Cortex-M33") FPU3(SFPU) DSP TZ CLOCK(12000000) ESEL ELITTLE - - - UL2V8M(-S0 -C0 -P0 -FD20000000 -FC1000) - 0 - $$Device:ARMCM33_DSP_FP_TZ$Device\ARM\ARMCM33\Include\ARMCM33_DSP_FP_TZ.h - - - - - - - - - - $$Device:ARMCM33_DSP_FP_TZ$Device\ARM\SVD\ARMCM33.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\mbl\Objects\ - mbl - 1 - 0 - 0 - 1 - 1 - .\mbl\Listings\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 1 - 0 - ..\mbl_afterbuild_tz.bat SIP "" JLINK $L @L KEIL $K - mbl_afterbuild_tz.bat QSPI 100f0e0d0c0b0a090807060504030201 DAPLINK $L @L KEIL $K - 0 - 0 - 0 - 0 - - 1 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - - - - - SARMV8M.DLL - -MPU - TCM.DLL - -pCM33 - - - - 1 - 0 - 0 - 0 - 16 - - - - - 1 - 0 - 0 - 0 - 1 - 4098 - - 1 - BIN\UL2V8M.DLL - - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M33" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 2 - 1 - 1 - 8 - 1 - 1 - 0 - 1 - 4 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 1 - 0x0 - 0x200000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x200000 - - - 1 - 0x200000 - 0x200000 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x20000 - - - 0 - 0x20200000 - 0x20000 - - - - - - 1 - 3 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 3 - 0 - 0 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - - - PLATFORM_GDM32, - - ..\..\source;..\..\platform;..\..\platform\gdm32;..\..\..\config;..\..\..\ROM-EXPORT\source;..\..\..\ROM-EXPORT\platform;..\..\..\ROM-EXPORT\mbedtls-2.17.0-rom\include;..\..\..\NSPE\Firmware\CMSIS\GD\GD32W51x\Include;..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Include - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x00000000 - 0x20000000 - - ..\..\platform\gdm32\armclang\mbl_gdm32.sct - - - --predefine="-DPLATFORM_GDM32" --import-cmse-lib-out=".\mbl\Objects\mbl_cmse_Lib.o" - - - - - - - - bootloader - - - mbl.c - 1 - ..\..\source\mbl.c - - - mbl_image_validate.c - 1 - ..\..\source\mbl_image_validate.c - - - mbl_status.c - 1 - ..\..\source\mbl_status.c - - - mbl_target_config.c - 1 - ..\..\source\mbl_target_config.c - - - mbl_nsc_api.c - 1 - ..\..\source\mbl_nsc_api.c - - - rom_symbol_mbedtls - 4 - ..\..\..\ROM\project\MDK-ARM\rom_symbol_mbedtls - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - 1 - - - - - - rom_symbol_mbedtls_20200709 - 4 - ..\..\..\ROM-EXPORT\symbol\rom_symbol_mbedtls_20200709 - - - - - an521 - - - 0 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - 1 - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 0 - 0 - 2 - 2 - 2 - 2 - 2 - - - - - - - - - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - - - - - - - - - - - - mbl_system_an521.c - 1 - ..\..\platform\msp2-an521\cmsis_core\mbl_system_an521.c - - - mbl_startup_an521.s - 2 - ..\..\platform\msp2-an521\armclang\mbl_startup_an521.s - - - - - gdm32 - - - mbl_startup_gdm32.s - 2 - ..\..\platform\gdm32\armclang\mbl_startup_gdm32.s - - - mbl_system_gdm32.c - 1 - ..\..\platform\gdm32\cmsis_core\mbl_system_gdm32.c - - - gd32w51x_fmc.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_fmc.c - - - gd32w51x_gpio.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_gpio.c - - - gd32w51x_icache.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_icache.c - - - gd32w51x_misc.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_misc.c - - - gd32w51x_rcu.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_rcu.c - - - gd32w51x_usart.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_usart.c - - - gd32w51x_tzpcu.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_tzpcu.c - - - gd32w51x_it.c - 1 - ..\..\platform\gdm32\gd32w51x_it.c - - - - - ::CMSIS - - - - - - - - - - - - - - - - - - - -
diff --git a/MBL/project/KEIL/Project_MBL_NS.uvoptx b/MBL/project/KEIL/Project_MBL_NS.uvoptx deleted file mode 100644 index 726e89d..0000000 --- a/MBL/project/KEIL/Project_MBL_NS.uvoptx +++ /dev/null @@ -1,453 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - Target_GDM32 - 0x4 - ARM-ADS - - 12000000 - - 1 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - .\mbl_ns\Listings\ - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 255 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 0 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 15 - - - - - - - - - - .\mbl_ns.ini - BIN\CMSIS_AGDI_V8M.DLL - - - - 0 - CMSIS_AGDI_V8M - -X"Any" -UAny -O206 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(0BE12477) -L00(0) -TO18 -TC10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC2000 -FN1 -FF0GD32W515_NS -FS08000000 -FL0200000 -FP0($$Device:GD32W515PIQ6$Flash\GD32W515_NS.FLM) - - - 0 - UL2V8M - UL2V8M(-S0 -C0 -P0 -FN2 -FC1000 -FD20000000 -FF0GD32W515_NS -FF1GD32W515_S -FL02000 -FL12000 -FS08000000 -FS1C000000 -FP0($$Device:GD32W515PIQ6$Flash\GD32W515_NS.FLM) -FP1($$Device:GD32W515PIQ6$Flash\GD32W515_S.FLM) - - - 0 - JL2CM3 - -U69662772 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO7 -FD20000000 -FC2000 -FN1 -FF0GD32W515_NS.FLM -FS08000000 -FL0200000 -FP0($$Device:GD32W515PIQ6$Flash\GD32W515_NS.FLM) - - - 0 - DLGUARM - - - - 0 - DLGTARM - (6010=234,272,711,868,0)(6018=105,137,294,470,0)(6019=105,137,294,457,0)(6008=-1,-1,-1,-1,0)(6009=-1,-1,-1,-1,0)(6014=-1,-1,-1,-1,0)(6015=-1,-1,-1,-1,0)(6003=135,169,708,705,0)(6000=75,104,528,436,0) - - - 0 - ARMDBGFLAGS - - - - - - - 1 - 2 - 0x08000000 - 0 - - - - - 2 - 2 - 0x08007c00 - 0 - - - - 0 - - - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - - - - bootloader - 0 - 0 - 0 - 0 - - 1 - 1 - 1 - 0 - 0 - 0 - ..\..\source_ns\mbl_flash.c - mbl_flash.c - 0 - 0 - - - 1 - 2 - 1 - 0 - 0 - 0 - ..\..\source_ns\mbl_image.c - mbl_image.c - 0 - 0 - - - 1 - 3 - 1 - 0 - 0 - 0 - ..\..\source_ns\mbl_ns.c - mbl_ns.c - 0 - 0 - - - 1 - 4 - 1 - 0 - 0 - 0 - ..\..\source_ns\mbl_sys.c - mbl_sys.c - 0 - 0 - - - 1 - 5 - 1 - 0 - 0 - 0 - ..\..\source_ns\mbl_uart.c - mbl_uart.c - 0 - 0 - - - 1 - 6 - 1 - 0 - 0 - 0 - ..\..\source_ns\mbl_api.c - mbl_api.c - 0 - 0 - - - 1 - 7 - 4 - 0 - 0 - 0 - ..\..\..\ROM-EXPORT\symbol\rom_symbol_mbedtls_20200709 - rom_symbol_mbedtls_20200709 - 0 - 0 - - - 1 - 8 - 1 - 0 - 0 - 0 - ..\..\source_ns\mbl_qspi_flash.c - mbl_qspi_flash.c - 0 - 0 - - - - - gdm32 - 0 - 0 - 0 - 0 - - 2 - 9 - 2 - 0 - 0 - 0 - ..\..\platform\gdm32\armclang\mbl_startup_gdm32.s - mbl_startup_gdm32.s - 0 - 0 - - - 2 - 10 - 1 - 0 - 0 - 0 - ..\..\platform\gdm32\cmsis_core\mbl_system_gdm32.c - mbl_system_gdm32.c - 0 - 0 - - - 2 - 11 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_fmc.c - gd32w51x_fmc.c - 0 - 0 - - - 2 - 12 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_fwdgt.c - gd32w51x_fwdgt.c - 0 - 0 - - - 2 - 13 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_gpio.c - gd32w51x_gpio.c - 0 - 0 - - - 2 - 14 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_icache.c - gd32w51x_icache.c - 0 - 0 - - - 2 - 15 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_qspi.c - gd32w51x_qspi.c - 0 - 0 - - - 2 - 16 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_rcu.c - gd32w51x_rcu.c - 0 - 0 - - - 2 - 17 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_usart.c - gd32w51x_usart.c - 0 - 0 - - - 2 - 18 - 1 - 0 - 0 - 0 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_misc.c - gd32w51x_misc.c - 0 - 0 - - - - - ::CMSIS - 0 - 0 - 0 - 1 - - -
diff --git a/MBL/project/KEIL/Project_MBL_NS.uvprojx b/MBL/project/KEIL/Project_MBL_NS.uvprojx deleted file mode 100644 index 5e8c2a3..0000000 --- a/MBL/project/KEIL/Project_MBL_NS.uvprojx +++ /dev/null @@ -1,501 +0,0 @@ - - - - 2.1 - -
### uVision Project, (C) Keil Software
- - - - Target_GDM32 - 0x4 - ARM-ADS - 6090000::V6.9::.\ARMCLANG - 1 - - - GD32W515PIQ6 - GigaDevice - GigaDevice.GD32W51x_DFP.1.0.2 - http://gd32mcu.com/data/documents/pack/ - IRAM(0x20000000,0x70000) IRAM2(0x30000000,0x70000) IROM(0x08000000,0x0200000) IROM2(0x0C000000,0x0200000) CPUTYPE("Cortex-M33") FPU3(SFPU) DSP TZ CLOCK(12000000) ELITTLE - - - UL2V8M(-S0 -C0 -P0 -FD20000000 -FC1000 -FN2 -FF0GD32W515_NS -FS08000000 -FL02000 -FF1GD32W515_S -FS1C000000 -FL12000 -FP0($$Device:GD32W515PIQ6$Flash\GD32W515_NS.FLM) -FP1($$Device:GD32W515PIQ6$Flash\GD32W515_S.FLM)) - 0 - $$Device:GD32W515PIQ6$Device\Include\gd32w51x.h - - - - - - - - - - $$Device:GD32W515PIQ6$SVD\GD32W515Px.svd - 0 - 0 - - - - - - - 0 - 0 - 0 - 0 - 1 - - .\mbl_ns\Objects\ - mbl-ns - 1 - 0 - 0 - 1 - 1 - .\mbl_ns\Listings\ - 1 - 0 - 0 - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 0 - 0 - - - 0 - 0 - 0 - 0 - - - 1 - 0 - ..\mbl_afterbuild.bat $L @L KEIL $K - - 0 - 0 - 0 - 0 - - 0 - - - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 3 - - - 1 - - - - - - - SARMV8M.DLL - -MPU - TCM.DLL - -pCM33 - - - - 1 - 0 - 0 - 0 - 16 - - - - - 1 - 0 - 0 - 0 - 1 - 4099 - - 1 - BIN\UL2V8M.DLL - - - - - - 0 - - - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - "Cortex-M33" - - 0 - 0 - 0 - 1 - 1 - 0 - 0 - 2 - 1 - 1 - 8 - 1 - 0 - 0 - 0 - 4 - 4 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x70000 - - - 1 - 0x8000000 - 0x200000 - - - 0 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x0 - 0x0 - - - 1 - 0x8000000 - 0x200000 - - - 1 - 0xc000000 - 0x200000 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x0 - 0x0 - - - 0 - 0x20000000 - 0x70000 - - - 0 - 0x30000000 - 0x70000 - - - - - - 1 - 3 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 3 - 0 - 0 - 0 - 0 - 0 - 3 - 3 - 0 - 0 - 0 - 0 - 0 - - - PLATFORM_GDM32 - - ..\..\source_ns;..\..\platform;..\..\platform\gdm32;..\..\..\config;..\..\..\ROM-EXPORT\mbedtls-2.17.0-rom\include;..\..\..\ROM-EXPORT\platform;..\..\..\ROM-EXPORT\source;..\..\..\NSPE\Firmware\CMSIS\GD\GD32W51x\Include;..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Include - - - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - 0 - 0 - 0 - 0 - 1 - 0 - 0x00000000 - 0x20000000 - - ..\..\platform\gdm32\armclang\mbl_gdm32_ns.sct - - - --predefine="-DPLATFORM_GDM32" --keep=mbl_api - - - - - - - - bootloader - - - mbl_flash.c - 1 - ..\..\source_ns\mbl_flash.c - - - mbl_image.c - 1 - ..\..\source_ns\mbl_image.c - - - mbl_ns.c - 1 - ..\..\source_ns\mbl_ns.c - - - mbl_sys.c - 1 - ..\..\source_ns\mbl_sys.c - - - mbl_uart.c - 1 - ..\..\source_ns\mbl_uart.c - - - mbl_api.c - 1 - ..\..\source_ns\mbl_api.c - - - rom_symbol_mbedtls_20200709 - 4 - ..\..\..\ROM-EXPORT\symbol\rom_symbol_mbedtls_20200709 - - - mbl_qspi_flash.c - 1 - ..\..\source_ns\mbl_qspi_flash.c - - - - - gdm32 - - - mbl_startup_gdm32.s - 2 - ..\..\platform\gdm32\armclang\mbl_startup_gdm32.s - - - mbl_system_gdm32.c - 1 - ..\..\platform\gdm32\cmsis_core\mbl_system_gdm32.c - - - gd32w51x_fmc.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_fmc.c - - - gd32w51x_fwdgt.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_fwdgt.c - - - gd32w51x_gpio.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_gpio.c - - - gd32w51x_icache.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_icache.c - - - gd32w51x_qspi.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_qspi.c - - - gd32w51x_rcu.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_rcu.c - - - gd32w51x_usart.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_usart.c - - - gd32w51x_misc.c - 1 - ..\..\..\NSPE\Firmware\GD32W51x_standard_peripheral\Source\gd32w51x_misc.c - - - - - ::CMSIS - - - - - - - - - - - - - - - - - - -
diff --git a/MBL/project/KEIL/mbl.ini b/MBL/project/KEIL/mbl.ini deleted file mode 100644 index 03a97bd..0000000 --- a/MBL/project/KEIL/mbl.ini +++ /dev/null @@ -1,6 +0,0 @@ -//LOAD "..\\..\\..\\ROM-EXPORT\\symbol\\rom.axf" incremental -LOAD "..\\..\\..\\MBL\\project\\KEIL\\mbl\\Objects\\mbl.axf" incremental -LOAD "..\\..\\..\\PROT\\project\\KEIL\\secure_main\\Gdm32\\Objects\\prot.axf" incremental -LOAD "..\\..\\..\\NSPE\\Project\\WIFI_IOT\\KEIL\\nspe\\output\\nspe.axf" incremental - -RESET diff --git a/MBL/project/KEIL/mbl_ns.ini b/MBL/project/KEIL/mbl_ns.ini deleted file mode 100644 index 8d19c06..0000000 --- a/MBL/project/KEIL/mbl_ns.ini +++ /dev/null @@ -1,4 +0,0 @@ -LOAD "mbl_ns\\Objects\\mbl-ns.axf" incremental -LOAD "..\\..\\..\\NSPE\\Project\\WIFI_IOT\\KEIL\\wifi_iot\\output\\nspe.axf" incremental - -RESET diff --git a/MBL/source_ns/CMakeLists.txt b/MBL/source_ns/CMakeLists.txt index cbc73f5..bc2fe48 100644 --- a/MBL/source_ns/CMakeLists.txt +++ b/MBL/source_ns/CMakeLists.txt @@ -61,7 +61,14 @@ target_link_options(${TARGET_EXE} -Wl,-Map=${TAGET_PROJECT_DIR}/GCC/output/bin/${TARGET_EXE}.map ) -add_custom_command(TARGET ${TARGET_EXE} POST_BUILD - COMMAND ${TAGET_PROJECT_DIR}/mbl_afterbuild.bat ${TAGET_PROJECT_DIR}/GCC/output/bin ${TARGET_EXE} GCC \"\" - COMMENT "Building ${TARGET_EXE}" -) +if(CMAKE_HOST_UNIX) + add_custom_command(TARGET ${TARGET_EXE} POST_BUILD + COMMAND ${TAGET_PROJECT_DIR}/mbl_afterbuild.sh ${TAGET_PROJECT_DIR}/GCC/output/bin ${TARGET_EXE} GCC \"\" + COMMENT "Building ${TARGET_EXE}" + ) +elseif(CMAKE_HOST_WIN32) + add_custom_command(TARGET ${TARGET_EXE} POST_BUILD + COMMAND ${TAGET_PROJECT_DIR}/mbl_afterbuild.bat ${TAGET_PROJECT_DIR}/GCC/output/bin ${TARGET_EXE} GCC \"\" + COMMENT "Building ${TARGET_EXE}" + ) +endif() diff --git a/NSPE/Project/WIFI_IOT/build_date.sh b/NSPE/Project/WIFI_IOT/build_date.sh new file mode 100755 index 0000000..a8358bc --- /dev/null +++ b/NSPE/Project/WIFI_IOT/build_date.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +DIR=$1 + +echo "/* Do not change the content here, it's auto generated */" > ${DIR}/WIFI_IOT/common/_build_date.h +echo "#define BUILD_DATE \"$(date +"%Y/%m/%d %H:%M")\"" >> ${DIR}/WIFI_IOT/common/_build_date.h +echo "#define DATE_GENERATED" >> ${DIR}/WIFI_IOT/common/_build_date.h diff --git a/NSPE/Project/WIFI_IOT/nspe_afterbuild.sh b/NSPE/Project/WIFI_IOT/nspe_afterbuild.sh old mode 100644 new mode 100755 index 1e30ab7..b056e56 --- a/NSPE/Project/WIFI_IOT/nspe_afterbuild.sh +++ b/NSPE/Project/WIFI_IOT/nspe_afterbuild.sh @@ -1,44 +1,53 @@ -OUTPUT_PATH=$1 -TOOLKIT=$2 -TOOLKIT_PATH=$3 -"OUTPUT_PATH=%OUTPUT_PATH:/=\%" - -echo TOOLKIT=%TOOLKIT% -echo TOOLKIT_PATH=%TOOLKIT_PATH% - -set ROOT=%OUTPUT_PATH%\..\..\..\..\..\.. -set INDEX=0 -set OUTPUT_IMAGE_PATH=%ROOT%\scripts\images -set SREC_CAT=%ROOT%\scripts\imgtool\srec_cat.exe -set OUTPUT_FILE=nspe - -IF EXIST %OUTPUT_PATH%\..\nspe* del %OUTPUT_PATH%\..\nspe* - -if "%TOOLKIT%" == "KEIL" ( - # Generate txt for debug - %TOOLKIT_PATH%\ARM\ARMCC\bin\fromelf.exe --text -c -d --output=%OUTPUT_PATH%\..\%OUTPUT_FILE%.txt %OUTPUT_PATH%\%OUTPUT_FILE%.axf - - # Generate binary image - %TOOLKIT_PATH%\ARM\ARMCC\bin\fromelf.exe --bin --8x1 --bincombined --output=%OUTPUT_PATH%\..\nspe.bin %OUTPUT_PATH%\%OUTPUT_FILE%.axf -) -if "%TOOLKIT%" == "IAR" ( - # Generate ASM file - %TOOLKIT_PATH%\bin\ielfdumparm.exe %OUTPUT_PATH%\%OUTPUT_FILE%.axf --output %OUTPUT_PATH%\..\%OUTPUT_FILE%.asm --code - - # Generate binary image - %TOOLKIT_PATH%\bin\ielftool.exe %OUTPUT_PATH%\%OUTPUT_FILE%.axf --bin %OUTPUT_PATH%\..\%OUTPUT_FILE%.bin -) - -if "%TOOLKIT%" == "GCC" ( - arm-none-eabi-objdump -xS %OUTPUT_PATH%\%OUTPUT_FILE%.axf > %OUTPUT_PATH%\..\%OUTPUT_FILE%.txt - arm-none-eabi-objcopy -Obinary %OUTPUT_PATH%\%OUTPUT_FILE%.axf %OUTPUT_PATH%\..\%OUTPUT_FILE%.bin -) - -# Copy nspe.bin to the image path as ota image -copy %OUTPUT_PATH%\..\nspe.bin %OUTPUT_IMAGE_PATH%\image-ota.bin - -# concatenate mbl-ns.bin and nspe.bin -%SREC_CAT% %OUTPUT_IMAGE_PATH%\mbl-ns.bin -Binary -offset 0 %OUTPUT_PATH%\..\nspe.bin -Binary -offset 0xa000 -fill 0xFF 0x7FFC 0xA000 -o %OUTPUT_IMAGE_PATH%\image-all.bin -Binary -# Convert to HEX file -if exist %OUTPUT_IMAGE_PATH%\image-all.bin %SREC_CAT% %OUTPUT_IMAGE_PATH%\image-all.bin -Binary -offset 0x0C000000 -o %OUTPUT_IMAGE_PATH%\image-all.hex -Intel - +#!/bin/bash + +#set -x +#echo "Args: $@" + +OUTPUT_PATH=$1 +TOOLKIT=$2 +TOOLKIT_PATH=$3 +OUTPUT_PATH=${OUTPUT_PATH%/} +ROOT=$(realpath ${OUTPUT_PATH}/../../../../../..) + +TOOLKIT=${TOOLKIT} +TOOLKIT_PATH=${TOOLKIT_PATH} + +INDEX=0 +SREC_CAT=/usr/bin/srec_cat + +OUTPUT_FILE=nspe +OUTPUT_IMAGE_PATH=${ROOT}/scripts/images + +mkdir -p ${OUTPUT_PATH} +if [ -n "$(ls ${OUTPUT_PATH}/../nspe*)" ]; then + rm -rf ${OUTPUT_PATH}/../nspe* +fi + +if [ "${TOOLKIT}" == "KEIL" ]; then + # Generate txt for debug + ${TOOLKIT_PATH}/ARM/ARMCC/bin/fromelf.exe --text -c -d --output=${OUTPUT_PATH}/../${OUTPUT_FILE}.txt ${OUTPUT_PATH}/${OUTPUT_FILE}.axf + + # Generate binary image + ${TOOLKIT_PATH}/ARM/ARMCC/bin/fromelf.exe --bin --8x1 --bincombined --output=${OUTPUT_PATH}/../nspe.bin ${OUTPUT_PATH}/${OUTPUT_FILE}.axf +elif [ "${TOOLKIT}" == "IAR" ]; then + # Generate ASM file + ${TOOLKIT_PATH}/bin/ielfdumparm.exe ${OUTPUT_PATH}/${OUTPUT_FILE}.axf --output ${OUTPUT_PATH}/../${OUTPUT_FILE}.asm --code + + # Generate binary image + ${TOOLKIT_PATH}/bin/ielftool.exe ${OUTPUT_PATH}/${OUTPUT_FILE}.axf --bin ${OUTPUT_PATH}/../${OUTPUT_FILE}.bin +elif [ "${TOOLKIT}" == "GCC" ]; then + arm-none-eabi-objdump -xS ${OUTPUT_PATH}/${OUTPUT_FILE}.axf > ${OUTPUT_PATH}/../${OUTPUT_FILE}.txt + arm-none-eabi-objcopy -Obinary ${OUTPUT_PATH}/${OUTPUT_FILE}.axf ${OUTPUT_PATH}/../${OUTPUT_FILE}.bin +fi + +mkdir -p ${OUTPUT_IMAGE_PATH} +# Copy nspe.bin to the image path as ota image +cp -rf ${OUTPUT_PATH}/../nspe.bin ${OUTPUT_IMAGE_PATH}/image-ota.bin + +# concatenate mbl-ns.bin and nspe.bin +${SREC_CAT} ${OUTPUT_IMAGE_PATH}/mbl-ns.bin -Binary -offset 0 ${OUTPUT_PATH}/../nspe.bin -Binary -offset 0xa000 -fill 0xFF 0x7FFC 0xA000 -o ${OUTPUT_IMAGE_PATH}/image-all.bin -Binary + +# Convert to HEX file +if [ -e ${OUTPUT_IMAGE_PATH}/image-all.bin ]; then + ${SREC_CAT} ${OUTPUT_IMAGE_PATH}/image-all.bin -Binary -offset 0x0C000000 -o ${OUTPUT_IMAGE_PATH}/image-all.hex -Intel +fi diff --git a/NSPE/WIFI_IOT/bsp/trng.c b/NSPE/WIFI_IOT/bsp/trng.c index aa2e77d..6a7c756 100644 --- a/NSPE/WIFI_IOT/bsp/trng.c +++ b/NSPE/WIFI_IOT/bsp/trng.c @@ -38,7 +38,7 @@ OF SUCH DAMAGE. #include "bsp_inc.h" #include "debug_print.h" #include "trng.h" -#include "mbedtls\md5.h" +#include "mbedtls/md5.h" unsigned char btrng_seed = 1; static unsigned int randPool; /* Pool of randomness. */ diff --git a/NSPE/WIFI_IOT/common/_build_date.h b/NSPE/WIFI_IOT/common/_build_date.h deleted file mode 100644 index e8ef738..0000000 --- a/NSPE/WIFI_IOT/common/_build_date.h +++ /dev/null @@ -1,3 +0,0 @@ -/* Do not change the content here, it's auto generated */ -#define BUILD_DATE "2022/12/07 16:07:03" -#define DATE_GENERATED diff --git a/ROM-EXPORT/source/rom_export_mbedtls.h b/ROM-EXPORT/source/rom_export_mbedtls.h index 044f450..6df2911 100644 --- a/ROM-EXPORT/source/rom_export_mbedtls.h +++ b/ROM-EXPORT/source/rom_export_mbedtls.h @@ -35,25 +35,25 @@ OF SUCH DAMAGE. #ifndef __ROM_EXPORT_MBEDTLS_H__ #define __ROM_EXPORT_MBEDTLS_H__ -#include "mbedtls\md5.h" -#include "mbedtls\sha1.h" -#include "mbedtls\sha256.h" -#include "mbedtls\sha512.h" -#include "mbedtls\md.h" -#include "mbedtls\cipher.h" -#include "mbedtls\ssl_ciphersuites.h" -#include "mbedtls\dhm.h" -#include "mbedtls\ecdh.h" -#include "mbedtls\ecp.h" -#include "mbedtls\pk.h" -#include "mbedtls\ecp.h" -#include "mbedtls\x509_crt.h" -#include "mbedtls\bignum.h" -#include "mbedtls\ctr_drbg.h" -#include "mbedtls\ssl_ticket.h" -#include "mbedtls\ssl_cookie.h" -#include "mbedtls\base64.h" -#include "mbedtls\platform.h" -#include "mbedtls\memory_buffer_alloc.h" +#include "mbedtls/md5.h" +#include "mbedtls/sha1.h" +#include "mbedtls/sha256.h" +#include "mbedtls/sha512.h" +#include "mbedtls/md.h" +#include "mbedtls/cipher.h" +#include "mbedtls/ssl_ciphersuites.h" +#include "mbedtls/dhm.h" +#include "mbedtls/ecdh.h" +#include "mbedtls/ecp.h" +#include "mbedtls/pk.h" +#include "mbedtls/ecp.h" +#include "mbedtls/x509_crt.h" +#include "mbedtls/bignum.h" +#include "mbedtls/ctr_drbg.h" +#include "mbedtls/ssl_ticket.h" +#include "mbedtls/ssl_cookie.h" +#include "mbedtls/base64.h" +#include "mbedtls/platform.h" +#include "mbedtls/memory_buffer_alloc.h" #endif // __ROM_EXPORT_MBEDTLS_H__ \ No newline at end of file