adafruit / u2if

USB to interfaces implementing MicroPython "machine" module functionalities on a computer.
Other
23 stars 10 forks source link

add pico-sdk as submodule; fix warnings #2

Closed dhalbert closed 3 years ago

dhalbert commented 3 years ago

Previous, with gcc9 and gcc10, compiled to faulty code that caused StreamedInterface::streamRxRead() to loop infinitely.

There were a couple of compiler warnings which I fixed, and I think that may have solved the problem. In particular, StreamBuffer::setSize() is called from StreamInterface::streamRxRead(), and setSize() was declared as returning a value even though it did not. (There was a similar declaration error in Pwm.h as well.)

@caternuson Could you try this again with gcc10, and test? I only looked at the assembly output, and the previous infinite loop is gone. It is still a compiler bug that this happened at all, though.

Also I added pico-sdk as a submodule to avoid some manual git steps.

caternuson commented 3 years ago

Neat. Are there any associated changes to the build steps provided in the README to go along with using the submodule? https://github.com/adafruit/u2if/blob/main/firmware/README.md

caternuson commented 3 years ago

@dhalbert Yes, this fixes it! Thanks! Let's make sure the docs are OK w.r.t. using a submodule and then we'll merge.

dhalbert commented 3 years ago

Neat. Are there any associated changes to the build steps provided in the README to go along with using the submodule? https://github.com/adafruit/u2if/blob/main/firmware/README.md

Yes, I should push fixes for that too.

caternuson commented 3 years ago

1 Is also merged in if you want to fetch those changes.

dhalbert commented 3 years ago

1 Is also merged in if you want to fetch those changes.

This is a non-conflicting merge, so it should be fine.