Closed CHiPs44 closed 3 years ago
If this project is a HAL for HAGL graphics library then HAGL itself should not be a dependency. Instead in a project which uses HAGL and this HAL you should add them both as dependency. See for example the tuupola/pico_effects project.
If you include HAGL and fonts for the example then to avoid confusion I would put them into example/external/
folder.
OK, i'll do that!
Thanks!
@tuupola Hello,
The project is now cleaner, but it does not compile anymore:
chips@vilainpou:~/src/hagl_pico_vgaboard/example/build$ LANG=C make -j4
[ 1%] Performing build step for 'ELF2UF2Build'
[ 2%] Performing build step for 'PioasmBuild'
[ 4%] Built target bs2_default
[ 6%] Built target bs2_default_padded_checksummed_asm
[100%] Built target elf2uf2
[100%] Built target pioasm
[ 7%] No install step for 'ELF2UF2Build'
[ 8%] No install step for 'PioasmBuild'
[ 9%] Completed 'ELF2UF2Build'
[ 10%] Completed 'PioasmBuild'
[ 21%] Built target PioasmBuild
[ 21%] Built target ELF2UF2Build
[ 23%] Built target pico_scanvideo_scanvideo_pio_h
[ 23%] Built target pico_scanvideo_dpi_timing_pio_h
[ 24%] Linking CXX executable hagl_pico_vgaboard_example.elf
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: cannot find -lhagl_hal
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/hagl_pico_vgaboard_example.dir/build.make:1047: hagl_pico_vgaboard_example.elf] Error 1
make[1]: *** [CMakeFiles/Makefile2:1949: CMakeFiles/hagl_pico_vgaboard_example.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
And the .gitmodules
file was placed by GIT at root of project, not in example
directory.
After many tries and failures comparing CMakeLists.txt
with the one from pico_effects and others, i still encountered an error at linking time about -lhagl
not found.
I finally figured out HAGL itself needs PICO_SDK=1
to be really included in the project, so I added it to my CMakeLists.txt
.