Arduino-FOC
Arduino-FOC copied to clipboard
[BUG] samd21_mcu.cpp file ignored, builds using generic_mcu.cpp instead. Renaming to stsamd21_mcu works.
Describe the bug I am using a qtpy_mo adafruit board. While building the binary samd21_mcu.cpp is used instead of generic.mcu.cpp.
Details
I soldered the swd pins and got my debugger working. As I step through the code when it calls _writeDutyCycle4PWM
. The debugger steps into the generic_mcu.cpp version. I spent a good amount of time looking at how the compiler decides to use the different files in the hardware_specific
folder. I suspect it's there is a file naming convention. And the Arduino documentation I found, was vague but seemed to say the same. I ended up looking at the klipper repo and saw the path has the atsamd
name. I changed the all the files to prefix them with st locally (e.g. stsamd21_mcu.cpp ) and now I can step through writeSAMDDutyCycle
. And my stepper is finally rotating as well!!!
I am happy to do any testing on this issue.
IDE you are using
- Platformio
Do you have the option
lib_archive = false
In your platformio.ini ?
I will try it. Thanks!
hey @arturohernandez10, did you have time to test this?
Disappeared?
I'm closing this issue, @arturohernandez10 if you still have it feel free to reopen it.