-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation Fault when calling certain functions #174
Comments
Servos also cause segfault
Maybe the STM32 is refusing write to it's memory, but the flashing process is working. |
The equivalent in pre-refactor: https://github.com/kipr/libwallaby/blob/master/src/wallaby_p.cpp I had been assuming that this file was identical, which would mean that the surrounding code or hardware would have to be the issue, but this was actually changed quite a bit. Storing this for reference:
|
I don't really see any obvious issues. Possibly caused by the memset usage? I wouldn't have thought to use memset here so I'm gonna dig a bit more to see if there is a reason. Definition of spi_ioc_transfer struct: Maybe this is caused by delay_usecs or bits_per_word being set to 0? |
delay_usecs isn't relevant since we aren't modifying chip select. I think the bits_per_word being set to 0 might be problematic/ |
What line is the segfault happening on? You'll need to compile libwallaby with |
See discord for a potential fix. Haven't tried it, but that seems likely. |
This is on the refactor branch.
I get a segfault when trying to run a program containing a motor function.
It occurs when calling the function WombatDevice::transfer
This is the file those last functions are defined in.
https://github.com/kipr/libwallaby/blob/refactor/module/core/src/device/wombat/wombat_device.cpp
I thought maybe it could be something wrong with the STM32 since I had some troubles with that earlier.
But analog functions are working fine so the communication with STM32 is not broken.
The text was updated successfully, but these errors were encountered: