MediaTek-Labs / mt3620_m4_software

mt3620_m4_driver
Other
32 stars 29 forks source link

FreeRTOS sample MT3620_RTApp_FreeRTOS_SPIM does not build #30

Closed JakeSays closed 3 years ago

JakeSays commented 4 years ago

The sample MT3620_RTApp_FreeRTOS_SPIM does not build due to improper use of fpu instructions.

Error: selected FPU does not support instruction -- `vstmdbeq r0!,{s16-s31}'

The issue is in mt3620_m4_software/MT3620_M4_BSP/FreeRTOS/portable/port.c, lines 445 and 467.

kevinwh-chou commented 4 years ago

Hi,

Have you tried below? If no, please give it a try and let me know if it works for you or not.

To build MediaTek FreeRTOS sample code, the GCC compiler flag should be modified to use FPU instructions. Copy “AzureSphereRTCoreToolchainVFP.cmake” from MediaTek sample code folder to Azure Sphere SDK install folder. (by default C:\Program Files (x86)\Microsoft Azure Sphere SDK\CMakeFiles)

kevinwh-chou commented 4 years ago

Hi,

If you use the latest sample code / driver from the Github, it doesn't necessarily require to copy that AzureSphereRTCoreToolchainMTK.cmake to the Azure Sphere SDK folder as the latest codebase has been updated to use the file from the same sample code folder.

So I would like to confirm if you use the latest software / driver, or have you done any modifications to the M4 BSP part? According to the internal testing result, MT3620_RTApp_FreeRTOS_SPIM is supposed to work fine, and there's no need to make changes.

JakeSays commented 4 years ago

I pulled latest from the repo, opened the project in visual studio code, and built. I didn't make any changes.

kevinwh-chou commented 4 years ago

Hi,

Got it, then it's strange, they should work fine. What's the Azure Sphere SDK version currently installed? 20.04, 20.07, or other?

JakeSays commented 4 years ago

@kevinwh-chou I'm on 20.07

kevinwh-chou commented 4 years ago

Hi,

May I know the Azure Sphere OS version of the device, I guess also 20.07 right?

Can you share the following files after trying to build the image?

  1. CMakeCache.txt (in out\ARM-Debug)
  2. CMakeOutput.log (in out\ARM-Debug\CMakeFiles)

Just in case, if you made any changes to the files, please do "Delete Cache" in Cmake Cache then generate cache again.