Include paths?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-08 4:06 AM
Hello guys,
I'm trying to use the sample project given in the MOOC, and I'm getting compilation errors.
The below is the error message.
../STM32_Cryptographic/legacy_v3/src/hash/legacy_v3_sha1.c:20:10: fatal error: hash/legacy_v3_sha1.h: No such file or directory
20 | #include "hash/legacy_v3_sha1.h"
I don't understand why I'm getting this despite adding the include path properly.
Am I missing something?
Regards,
Vmere.
- Labels:
-
Cryptography
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-08 4:54 AM
Look at the command just above the error, i.e. the gcc invocation with parameters. Is the path to hash/legacy_v3_sha1.h amongst the paths passed using -I in that line? Note, that if path is e.g. c:\aaa\bbb, then the compiler tries to open c:\aaa\bbb\hash\legacy_v3_sha1.h.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-08 5:20 AM
Hello, I checked as you said, and I'm able to open the folder. Frankly, I didn't type the include path. I used the options present to add the new folder.
arm-none-eabi-gcc "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F411xE -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I"C:/Users/BALAVIJ/STM32CubeIDE/workspace_1.9.0/FirmwareIntegrity/STM32_Cryptographic/include/hash" -I"C:/Users/BALAVIJ/STM32CubeIDE/workspace_1.9.0/FirmwareIntegrity/STM32_Cryptographic/include" -I"C:/Users/BALAVIJ/STM32CubeIDE/workspace_1.9.0/FirmwareIntegrity/STM32_Cryptographic/legacy_v3/include" -I"C:/Users/BALAVIJ/STM32CubeIDE/workspace_1.9.0/FirmwareIntegrity/STM32_Cryptographic/legacy_v3/include/hash" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.d" -MT"Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o"
../STM32_Cryptographic/legacy_v3/src/hash/legacy_v3_sha384.c:20:10: fatal error: hash/legacy_v3_sha384.h: No such file or directory
20 | #include "hash/legacy_v3_sha384.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-08 5:58 AM
Sorry, I'm unable to delete the answer.
But sometimes when I restart the workspace, it kind of rearranges it self.
can you see the STM32_Cryptographic in the root folder twice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-08-15 9:49 AM
Which MOOC tutorial are you following? Let's see if we can re-produce.
Looking at your screenshot with STM32_Cryptography/legacy_v3 it looks like there is some issue with "source folders" vs normal "folders" in your project... That may not at all be related to the problem you describe though. Just pointing out anomalies from your screenshot.
Have you verified that the files actually are physically available on your harddrive where the toolchain is looking for them?
