nnarain / cmake-avr-toolchain

cmake avr-gcc toolchain
10 stars 4 forks source link

Path and linking needs to be update #6

Closed jagprog5 closed 8 months ago

jagprog5 commented 2 years ago

Hello!

I have created a fork of this project here. In my attempt to use it here I have come across some confusions and difficulties. In particular, I think the pathing is wrong in FindArduino.cmake, and within my fork I have attempted to guess at how to update the paths. My guess is that Arduino people have updated their directories and this repo hasn't caught up.

My second issue is properly linking everything together. My project (above) will fail to link. This part I have not figured out.

CMakeFiles/avr_cross_compile-atmega328p.elf.dir/main.c.obj: In function `main':
/home/john/avr_cross_compile/main.c:4: undefined reference to `pinMode'
/home/john/avr_cross_compile/main.c:6: undefined reference to `digitalWrite'
/home/john/avr_cross_compile/main.c:7: undefined reference to `delay'
/home/john/avr_cross_compile/main.c:8: undefined reference to `digitalWrite'
/home/john/avr_cross_compile/main.c:9: undefined reference to `delay'
collect2: error: ld returned 1 exit status
CMakeFiles/avr_cross_compile-atmega328p.elf.dir/build.make:83: recipe for target 'avr_cross_compile-atmega328p.elf' failed
make[2]: *** [avr_cross_compile-atmega328p.elf] Error 1
CMakeFiles/Makefile2:109: recipe for target 'CMakeFiles/avr_cross_compile-atmega328p.elf.dir/all' failed
make[1]: *** [CMakeFiles/avr_cross_compile-atmega328p.elf.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

My question is, has the library paths also been changed in some way? How do I get my project to link, and is there any further fixes that should be implemented in this repo?

Thank you.

jagprog5 commented 2 years ago

@mxt3 pinging because you have a fork that is slightly ahead, and you might have insight.

jagprog5 commented 2 years ago

@ucayalifish same as above